http://bugs.winehq.org/show_bug.cgi?id=16187
Summary: Google Sketchup Layout crashes on startup Product: Wine Version: 1.1.9 Platform: PC URL: http://sketchup.google.com OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
"LayOut", which comes with Sketchup Pro, crashes on startup, just after it puts up the "Tip of the Day".
You have to do "winetricks dotnet20" to even get that far.
Installing gdiplus seems to make things worse; even after uninstalling it, layout crashes much sooner.
http://bugs.winehq.org/show_bug.cgi?id=16187
--- Comment #1 from Dan Kegel dank@kegel.com 2008-11-24 00:48:54 --- Created an attachment (id=17428) --> (http://bugs.winehq.org/attachment.cgi?id=17428) rzipped +relay,+seh log from before the RaiseException to the ExitProcess
http://bugs.winehq.org/show_bug.cgi?id=16187
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net 2008-12-19 18:36:53 --- Hello,
gdiplus bug: unsupported image stream codec requested.
--- snip --- ... 0032:Call ole32.CreateStreamOnHGlobal(00000000,00000001,0032d580) ret=00528955 ... 0032:Ret ole32.CreateStreamOnHGlobal() retval=00000000 ret=00528955 0032:Call gdiplus.GdipGetImageEncodersSize(0032d564,0032d568) ret=0052888f 0032:trace:gdiplus:GdipGetImageEncodersSize 0x32d564 0x32d568 0032:Ret gdiplus.GdipGetImageEncodersSize() retval=00000000 ret=0052888f ... 0032:Call gdiplus.GdipGetImageEncoders(00000001,0000004c,01014698) ret=005288af 0032:trace:gdiplus:GdipGetImageEncoders 1 76 0x1014698 0032:Ret gdiplus.GdipGetImageEncoders() retval=00000000 ret=005288af ... 0032:Call gdiplus.GdipSaveImageToStream(068da908,06af41a0,0032d584,00000000) ret=00528981 0032:trace:gdiplus:GdipSaveImageToStream 0x68da908 0x6af41a0 0x32d584 (nil) 0032:Ret gdiplus.GdipSaveImageToStream() retval=0000000d ret=00528981 ... 0032:Ret KERNEL32.SetLastError() retval=00000578 ret=79e74af7 0032:CALL gdiplus.GdipLoadImageFromStream(0568d0d0,0032d580) ret=0147a1d4 0032:RET gdiplus.GdipLoadImageFromStream() retval=00000002 ret=0147a1d4 --- snip ---
A default (invalid, see later comment) CLSID is passed which leads to:
GdipSaveImageToStream -> UnknownImageFormat
Due to unhandled image format, the stream parameter will be NULL which leads to:
GdipLoadImageFromStream -> InvalidParameter
and managed exception which goes by unhandled. The app's own crash hander finally catches it, hence the error dialog.
---
The real problem is actually not visible with trace, one has to debug through.
What really happens is that the app tries to resolve gdiplus image codec for specific MIME formats by looping through the list of encoders returned by GdipGetImageEncoders(). It compares the MIME type of each returned encoder entry to the given MIME. On match the class identifier of that encoder is used. The default (invalid) CLSID gets overwritten with the one found by successful lookup.
The MIME type for requested codec "bad guy" is actually "image/tiff". Wine's gdiplus misses encoders/decoders for various famous image formats. Maybe additional image formats support can be added by the use of libtiff (and libjpeg for jpeg stuff, ...).
FYI it also suffers from bug 13462
=================
--- snip --- Installing gdiplus seems to make things worse; even after uninstalling it, layout crashes much sooner. --- snip ---
A bit lengthy story which might deserve its own bugzilla bug but I will explain here ...
This app early binds to gdiplus.dll (using dllimports) while parts the .NET runtime also bind to gdiplus (manifest+activation context mechanism).
When you do the usual native gdiplus override (using winetricks gdiplus) you install/copy gdiplus.dll into system32 folder. With the installation of the .NET Framework another copy will be installed in private load path: C:\windows\Microsoft.NET\Framework\v2.0.50727\gdiplus.dll (due to installer winver w2k hack -> missing junction API).
When the app load time reference to gdiplus is resolved (explicit dll import), gdiplus is loaded from system32. Later when parts of the .NET runtime are initialized, another copy will be loaded by .NET from private load path "C:\windows\Microsoft.NET\Framework\v2.0.50727". This happens because .NET initially tries to load the SxS version using manifest/activation context and this fails because SxS version not present.
As fallback method, gdiplus library is directly loaded with private load path, resulting in another copy loaded with different base address. This fallback to private load path exists to prevent dll pollution from unknown/unwanted library version in system32. Result: two copies exist in memory with different base addresses.
Gdiplus API relies on Gdiplusstartup()/shutdown() being called, otherwise most of its API won't work and you see all sorts of side-effects/crashes. Try to call native gdiplus API before Gdiplusstartup() and you will see...
Now consider the following:
--- Scenario 1 (one gdiplus dll from SxS present in memory because of manifest/activation context/SxS):
When the app tries to use gdiplus API for the first time, .NET already initialized gdiplus (for itself) hence the app can successfully use the API too. Because of late .NET unload mechanism, the bug (scenario 3) goes unnoticed.
--- Scenario 2 (two gdiplus dlls present in memory, wine builtin + .NET native from private load path):
Because Wine doesn't employ gdiplus object tracking/reference counting (see comments in gdiplusstartup/shutdown) it doesn't impose restrictions when API can be called (like allocation, ..). The dll loaded by app will be used by app code while .NET will use the dll from private load path and call API on it. -> not really good but acceptable for now
--- Scenario 3 (two gdiplus dlls present in memory, wine native override from system32 + .NET native from private load path):
Both libraries are present in memory at different base addresses. The app will call API on the gdiplus loaded by itself and goes *boom* because it didn't explicitly call gdiplusstartup. .NET runtime will initialize its own loaded version and call API on it.
In short: Technically it's an g00gle application bug which is hidden in Windows due to scenario 1 but exposed in Wine due to scenario 3.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16187
--- Comment #3 from Dan Kegel dank@kegel.com 2008-12-19 18:50:31 --- Awesome analysis, thanks.
http://bugs.winehq.org/show_bug.cgi?id=16187
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |gdiplus
--- Comment #4 from Dan Kegel dank@kegel.com 2008-12-20 04:46:48 --- Changing category to gdiplus.
http://bugs.winehq.org/show_bug.cgi?id=16187
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Google Sketchup Layout |Google Sketchup Layout |crashes on startup |crashes on startup (needs | |TIFF encoding)
http://bugs.winehq.org/show_bug.cgi?id=16187
mimo titolindo mimotitolindo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mimotitolindo@gmail.com
--- Comment #5 from mimo titolindo mimotitolindo@gmail.com 2011-04-08 17:24:34 CDT --- About the solutions? this analysis is deep but I don't see the solution.
http://bugs.winehq.org/show_bug.cgi?id=16187
--- Comment #6 from Anastasius Focht focht@gmx.net 2011-04-09 14:51:27 CDT --- Hello,
--- quote --- About the solutions? this analysis is deep but I don't see the solution. --- quote ---
Well, work on TIFF image support has started recently (Wine's windowscodecs and gdiplus which uses windowscodecs). Unfortunately you will have to wait a bit, encoding part (which is needed here) is work in progress.
Most part of my analysis (comment #2) was to explain why native gdiplus makes things worse.
The "pro" installer can be directly downloaded here - without the Google registration garbage: http://dl.google.com/sketchup/GoogleSketchUpProWEN.exe
The following debug channels might be useful for tracking the state:
WINEDEBUG=+tid,+seh,+gdiplus,+wincodecs wine ./foo.exe
Regards
http://bugs.winehq.org/show_bug.cgi?id=16187
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Anastasius Focht focht@gmx.net 2011-04-11 14:47:00 CDT --- Hello,
that was some prompt response ;-)
The initial crash due to missing TIFF encoder was fixed by commits:
http://source.winehq.org/git/wine.git/?a=commit;h=e4986fc994074aa8bf74bb3410...
http://source.winehq.org/git/wine.git/?a=commit;h=0b75067c029862aa8163ec68d2...
http://source.winehq.org/git/wine.git/?a=commit;h=1544640763062e0ad8617fbdf2...
Good work!
File new bugs for additional issues encountered.
Regards
http://bugs.winehq.org/show_bug.cgi?id=16187
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2011-04-15 12:50:54 CDT --- Closing bugs fixed in 1.3.18.
http://bugs.winehq.org/show_bug.cgi?id=16187
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1544640763062e0ad8617fbdf2e | |1ff99771b78b7
https://bugs.winehq.org/show_bug.cgi?id=16187
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Google Sketchup Layout |Google Sketchup 7 Layout |crashes on startup (needs |crashes on startup (needs |TIFF encoding) |TIFF encoding) URL|http://sketchup.google.com |https://web.archive.org/web | |/20120726023942/http://dl.g | |oogle.com/sketchup/gsu7/PW- | |2-1-6860-EN.exe
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20120726023942/http://dl.google.com/sketchup/gsu...
Unfortunately the actual application version was never mentioned. Guessing from the comment dates it was most likely Google Sketchup 7.
https://web.archive.org/web/20210116133542/https://designerhacks.com/skp-dow...
I converted it to a nice ascii table:
====================================================================== Version | | | | Release | Developer ---------------------------------------------------------------------- Sketchup Make 2017 | Free | Windows | Mac | 11.07.16 | Trimble Sketchup Pro 2017 | Paid | Windows | Mac | 11.07.16 | Trimble Sketchup Make 2016 | Free | Windows | Mac | 11.17.15 | Trimble Sketchup Pro 2016 | Paid | Windows | Mac | 11.17.15 | Trimble Sketchup Make 2015 | Free | Windows | Mac | 11.04.14 | Trimble Sketchup Pro 2015 | Paid | Windows | Mac | 11.04.14 | Trimble Sketchup Make 2014 | Free | Windows | Mac | 02.28.14 | Trimble Sketchup Pro 2014 | Paid | Windows | Mac | 02.28.14 | Trimble Sketchup Make 2013 | Free | Windows | Mac | May 2013 | Trimble Sketchup Pro 2013 | Paid | Windows | Mac | May 2013 | Trimble Sketchup 8 | Free | Windows | Mac | Sep 2010 | Google Sketchup 8 Pro | Paid | Windows | Mac | Sep 2010 | Google Sketchup 7 | Free | Windows | Mac | Nov 2008 | Google Sketchup 7 Pro | Paid | Windows | Mac | Nov 2008 | Google Sketchup 6 | Free | Windows | Mac | Jan 2007 | Google Sketchup 5 | Free | Windows | -- | -- | Google Sketchup | Free | Windows | -- | Aug 2000 | @Last Software ======================================================================
(hope Bugzilla doesn't break the format)
Regards