http://bugs.winehq.org/show_bug.cgi?id=34843
Bug #: 34843 Summary: Garmin BaseCamp 4.1.2 fails due to unimplemented gdiplus.GdipCreateRegionRgnData Product: Wine Version: 1.7.5 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: gdiplus AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
as the summary says...
Prerequisite: 'winetricks -q dotnet35' in 32-bit WINEPREFIX
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Garmin/BaseCamp ... $ wine ./BaseCamp.exe ... fixme:gdiplus:get_gdi_brush_color unhandled brush type 2 fixme:gdiplus:GdipCreateRegionRgnData (0x3dfb1bc, 336, 0x33e520): stub wine: Call from 0x7b83a8bf to unimplemented function msvcr90.dll.__CxxExceptionFilter, aborting ... --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/ec9a0d85705941e024c366a2f740a5f9e...
--- snip --- 571 GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRegion **region) 572 { 573 FIXME("(%p, %d, %p): stub\n", data, size, region); 574 575 *region = NULL; 576 return NotImplemented; 577 } --- snip ---
$ sha1sum BaseCamp_412.exe f48b8813dc7f92f1d4fe3a162c3428ed7095d529 BaseCamp_412.exe
$ du -sh BaseCamp_412.exe 51M BaseCamp_412.exe
$ wine --version wine-1.7.5-251-gbcf4ded
Regards
http://bugs.winehq.org/show_bug.cgi?id=34843
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |http://www.gawisp.com/perry | |/mapsource/BaseCamp_412.exe
http://bugs.winehq.org/show_bug.cgi?id=34843
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2013-11-28 23:08:06 CST --- Here is a reference to the (rejected) GdipCreateRegionRgnData implementation: http://www.winehq.org/pipermail/wine-patches/2013-November/128425.html
Probably still worth some testing.
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-11-30 06:16:51 CST --- Hello Dmitry,
thanks for the patch, it goes a little further:
--- snip --- ... 003b:trace:gdiplus:GdipGetRegionDataSize 0x631b890, 0x33e850 003b:trace:gdiplus:GdipGetRegionData 0x631b890, 0x3c4c9c8, 336, 0x33e850 003b:trace:gdiplus:GdipGetRegionDataSize 0x631b890, 0x33e7a8 003b:trace:gdiplus:GdipCreateRegionRgnData 0x3c4c9c8, 336, 0x33e850 003b:trace:gdiplus:GdipCreateRegion 0x33e850 003b:trace:gdiplus:GdipCreateRegion => 0x6704b48 003b:trace:gdiplus:GdipCreatePath (0, 0x33e6ec) 003b:fixme:gdiplus:read_element element type 0x1000000 is not supported 003b:trace:gdiplus:GdipDeleteRegion 0x6704b48 003b:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7eb1019e ip=7eb1019e tid=003b 003b:trace:seh:raise_exception info[0]=00000000 003b:trace:seh:raise_exception info[1]=00000000 003b:trace:seh:raise_exception eax=00000000 ebx=7eb70000 ecx=00000000 edx=7bceaa08 esi=0033e7a0 edi=0033eafc 003b:trace:seh:raise_exception ebp=0033e718 esp=0033e700 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010216 003b:trace:seh:call_stack_handlers calling handler at 0x3365373 code=c0000005 flags=0 003b:trace:seh:call_stack_handlers handler at 0x3365373 returned 1 003b:trace:seh:call_stack_handlers calling handler at 0x31d7fee code=c0000005 flags=0 003b:trace:seh:raise_exception code=80000100 flags=1 addr=0x7b83a8ef ip=7b83a8ef tid=003b 003b:trace:seh:raise_exception info[0]=7edb713c 003b:trace:seh:raise_exception info[1]=7edb74c2 wine: Call from 0x7b83a8ef to unimplemented function msvcr90.dll.__CxxExceptionFilter, aborting ... --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2013-12-01 00:56:02 CST --- (In reply to comment #2)
003b:trace:gdiplus:GdipGetRegionDataSize 0x631b890, 0x33e850 003b:trace:gdiplus:GdipGetRegionData 0x631b890, 0x3c4c9c8, 336, 0x33e850 003b:trace:gdiplus:GdipGetRegionDataSize 0x631b890, 0x33e7a8 003b:trace:gdiplus:GdipCreateRegionRgnData 0x3c4c9c8, 336, 0x33e850 003b:trace:gdiplus:GdipCreateRegion 0x33e850 003b:trace:gdiplus:GdipCreateRegion => 0x6704b48 003b:trace:gdiplus:GdipCreatePath (0, 0x33e6ec) 003b:fixme:gdiplus:read_element element type 0x1000000 is not supported
That's strange, type 0x1000000 (RegionDataRect) should be handled. Anyway, is there any special steps to reproduce this bug? Since there were no winetricks installed here, I downloaded one from the svn/trunk and made it download and install everything it asked for after 'winetricks -q dotnet35'. But running 'wine ./BaseCamp.exe' doesn't lead to any GdipCreateRegionRgnData calls, BaseCamp starts up normally. BaseCamp.exe and its dlls don't even import that symbol. Probably the actual call is made by some .net component? I also tried with latest available BaseCamp_424.exe, but it shows same behaviour.
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #4 from Anastasius Focht focht@gmx.net 2013-12-01 10:56:31 CST --- Hello Dmitry,
--- quote --- That's strange, type 0x1000000 (RegionDataRect) should be handled. Anyway, is there any special steps to reproduce this bug? Since there were no winetricks installed here, I downloaded one from the svn/trunk and made it download and install everything it asked for after 'winetricks -q dotnet35'. But running 'wine ./BaseCamp.exe' doesn't lead to any GdipCreateRegionRgnData calls, BaseCamp starts up normally. BaseCamp.exe and its dlls don't even import that symbol. Probably the actual call is made by some .net component? I also tried with latest available BaseCamp_424.exe, but it shows same behaviour. --- quote ---
my recipe is as follows:
-> start the app
-> optionally dismiss "getting started/welcome" dialog -> optionally dismiss "collect private data" dialog -> optionally dismiss "software update" dialog (either apply or later)
A map is displayed. Move the mouse cursor over this big blue waypoint sign (upwards pointed arrow) on the map. The crash can be even triggered by just hovering over it (or just click).
Regards
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #5 from Anastasius Focht focht@gmx.net 2013-12-01 11:18:19 CST --- Hello Dmitry,
--- quote --- BaseCamp.exe and its dlls don't even import that symbol. Probably the actual call is made by some .net component? --- quote ---
running this thing under managed debugger yields the following before the crash:
--- snip --- ... (2a.2b): CLR exception - code e0434f4d (first chance) ... OS Thread Id: 0x2b (0) ESP EIP 0033e974 7b83a8ef [HelperMethodFrame: 0033e974] 0033ea18 0fab889d System.Drawing.Region..ctor(System.Drawing.Drawing2D.RegionData) 0033ea2c 08fe0ab9 bc.OnscreenControl_t.UpdateControlVisibility() 0033ea3c 0fab8765 bc.OnscreenControl_t.HandleTick(System.Object, System.EventArgs) 0033ea44 0faf641f System.Windows.Forms.Timer.OnTick(System.EventArgs) 0033ea4c 08cb4028 System.Windows.Forms.Timer+TimerNativeWindow.WndProc(System.Windows.Forms.Message ByRef) 0033ea5c 08029d07 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr) 0033ecc4 02cd712b [NDirectMethodFrameStandalone: 0033ecc4] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 0033ecd4 087f645c System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32) 0033ed70 087de2a5 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 0033edb8 087ddffb System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 0033ede8 09009ec1 System.Windows.Forms.Application.Run(System.Windows.Forms.Form) 0033edfc 06954fd7 <Module>.main(System.String[]) 0033f2ac 06953e1f <Module>.mainCRTStartupStrArray(System.String[]) 0033f4fc 02df1b4c [GCFrame: 0033f4fc] (2a.2b): Unknown exception - code 80000100 (first chance) (2a.2b): Unknown exception - code 80000100 (first chance) (2a.2b): Unknown exception - code 80000100 (first chance) (2a.2b): Unknown exception - code 80000100 (first chance) (2a.2b): CLR exception - code e0434f4d (first chance) ... --- snip ---
The .NET Framework libs just pass the region data to gdiplus. The main assembly 'BaseCamp.exe' (32 MiB) refuses to load in ILSpy but fortunately some free old (pre-commercial) .NET Reflector 6 version can decompile it.
Looks like C++/CLI code compiled to CLR bytecode. I'll attach a snippet of the code that is used to create the region data.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #6 from Anastasius Focht focht@gmx.net 2013-12-01 11:19:34 CST --- Created attachment 46690 --> http://bugs.winehq.org/attachment.cgi?id=46690 managed app code to construct the region
http://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #7 from Dmitry Timoshkov dmitry@baikal.ru 2013-12-01 21:22:54 CST --- Created attachment 46696 --> http://bugs.winehq.org/attachment.cgi?id=46696 patch
Thanks for the instructions, I was able to reproduce the problem.
My patch failed to round input data to 4 when reading path types, I'm attaching new version of the patch which fixes that omission.
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
obviously still present as of Wine 1.7.43
Dmitry's patch is also available/included in Wine-Staging by default:
https://github.com/wine-compholio/wine-staging/blob/master/patches/gdiplus-G...
Regards
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com --- Dmitry, do you plan to send this patch?
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #10 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Nikolay Sivov from comment #9)
Dmitry, do you plan to send this patch?
The patch has been sent already.
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Dmitry Timoshkov from comment #10)
(In reply to Nikolay Sivov from comment #9)
Dmitry, do you plan to send this patch?
The patch has been sent already.
I can see take 2 here https://www.winehq.org/pipermail/wine-patches/2013-November/128425.html, but no take 3. Anyway, the question still stands, do you plan to send (or resend) same or improved version?
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #12 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Nikolay Sivov from comment #11)
I can see take 2 here https://www.winehq.org/pipermail/wine-patches/2013-November/128425.html, but no take 3. Anyway, the question still stands, do you plan to send (or resend) same or improved version?
I don't see much point in resending same patch again.
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #13 from Nikolay Sivov bunglehead@gmail.com --- Ok, good.
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
commit https://source.winehq.org/git/wine.git/commitdiff/0a15e163dbfcd568963465c9c5... improves the situation but still doesn't handle all region cases the app needs here.
--- snip --- ... 002d:trace:gdiplus:GdipGetRegionDataSize 0x5911690, 0x32ea2c 002d:trace:gdiplus:GdipGetRegionData 0x5911690, 0x340c6e8, 336, 0x32ea2c 002d:trace:gdiplus:GdipGetRegionDataSize 0x5911690, 0x32e9a8 002d:trace:gdiplus:GdipCreateRegionRgnData (0x340c6e8, 336, 0x32ea28) 002d:trace:gdiplus:GdipCreateRegion 0x32ea28 002d:trace:gdiplus:GdipCreateRegion => 0x5895e40 002d:fixme:gdiplus:read_element region element type 0x00000002 not supported 002d:trace:gdiplus:GdipDeleteRegion 0x5895e40 002d:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7eafd272 ip=7eafd272 tid=002d 002d:trace:seh:raise_exception info[0]=00000000 002d:trace:seh:raise_exception info[1]=00000000 002d:trace:seh:raise_exception eax=00000000 ebx=0032e980 ecx=00000000 edx=7bcf8a08 esi=0032ea14 edi=0032ecd4 002d:trace:seh:raise_exception ebp=0032e908 esp=0032e8f0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 002d:trace:seh:call_stack_handlers calling handler at 0x7a00a2e7 code=c0000005 flags=0 002d:trace:seh:call_stack_handlers handler at 0x7a00a2e7 returned 1 002d:trace:seh:call_stack_handlers calling handler at 0x79edc3bc code=c0000005 flags=0 002d:trace:seh:raise_exception code=80000100 flags=1 addr=0x7b845511 ip=7b845511 tid=002d 002d:trace:seh:raise_exception info[0]=7ed3f800 002d:trace:seh:raise_exception info[1]=7ed3fb04 wine: Call from 0x7b845511 to unimplemented function msvcr90.dll.__CxxExceptionFilter, aborting --- snip ---
Regards
https://bugs.winehq.org/show_bug.cgi?id=34843
--- Comment #15 from Nikolay Sivov bunglehead@gmail.com --- Committed as http://source.winehq.org/git/wine.git/?a=commit;h=a66d664505de9a79f7f4f07b93..., please retest.
https://bugs.winehq.org/show_bug.cgi?id=34843
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a66d664505de9a79f7f4f07b93c | |97a3d21ec3c54 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #16 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/a66d664505de9a79f7f4f07b93...
Thanks Dmitry
A Google maps like navigation tool (zoom, directional move) appears now when hovering over the blue waypoint sign.
Regards
https://bugs.winehq.org/show_bug.cgi?id=34843
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.46.
https://bugs.winehq.org/show_bug.cgi?id=34843
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.gawisp.com/perry |https://web.archive.org/web |/mapsource/BaseCamp_412.exe |/20141129035139/http://www. | |gawisp.com/perry/mapsource/ | |BaseCamp_412.exe
--- Comment #18 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20141129035139/http://www.gawisp.com/perry/mapso...
https://www.virustotal.com/gui/file/a27d5b9ac8d0d387e4a9dfff99766d9d26166fb5...
$ sha1sum BaseCamp_412.exe f48b8813dc7f92f1d4fe3a162c3428ed7095d529 BaseCamp_412.exe
$ du -sh BaseCamp_412.exe 51M BaseCamp_412.exe
Regards