http://bugs.winehq.org/show_bug.cgi?id=31032
Bug #: 31032 Summary: Ragnarok download manager shows a .NET exception on start (GdipLoadImageFromStream stream clone fails) Product: Wine Version: 1.5.7 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,
bug 30987 talks about a problem with builtin gdiplus and Mono. Actually with .NET Framework 2.0 it fails too.
The issue (regression) is:
http://source.winehq.org/git/wine.git/commitdiff/9e12bc0175f6a65ee45ebce1ca5...
(gdiplus: Create a copy of the source stream when loading an image.)
Mono still suffered after partial revert so these might not be related hence I made an extra one.
With MS .NET 2.0 there is a managed backtrace shown in console.
--- snip --- Unhandled Exception: System.ArgumentException: Parameter is not valid. at System.Drawing.Image.get_FrameDimensionsList() at System.Drawing.ImageAnimator.CanAnimate(Image image) at System.Drawing.ImageAnimator.ImageInfo..ctor(Image image) at System.Drawing.ImageAnimator.Animate(Image image, EventHandler onFrameChangedHandler) at System.Windows.Forms.ButtonBase.Animate(Boolean animate) at System.Windows.Forms.ButtonBase.Animate() at System.Windows.Forms.ButtonBase.set_Image(Image value) at FilesDownloader.MainForm.InitializeComponent() at FilesDownloader.MainForm..ctor() at FilesDownloader.Program.Main() --- snip ---
Actually it's the result of problem happening earlier. Using a managed debugger this backtrace is more likely the culprit:
--- snip --- (2a.2b): CLR exception - code e0434f4d (first chance) ... OS Thread Id: 0x2b (0) ESP EIP 0033e3d4 7b8394f7 [HelperMethodFrame: 0033e3d4] 0033e478 7ae3a024 System.Drawing.Internal.GPStream.NotImplemented() 0033e480 7adfefa5 System.Drawing.Internal.GPStream.Clone() 0033e670 79f1ef33 [GCFrame: 0033e670] 0033e7c8 79f1ef33 [ComMethodFrame: 0033e7c8] 0033e918 79f1ef33 [NDirectMethodFrameSlim: 0033e918] System.Drawing.SafeNativeMethods+Gdip.GdipLoadImageFromStream(IStream, IntPtr ByRef) 0033e928 7ae088ab System.Drawing.Image.InitializeFromStream(System.IO.Stream) 0033e95c 7ae085a8 System.Drawing.Image..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext) 0033e99c 7ae0a336 System.Drawing.Bitmap..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext) ... 0033f034 794458a4 System.Resources.ResourceManager.GetObject(System.String, System.Globalization.CultureInfo, Boolean) 0033f058 79445809 System.Resources.ResourceManager.GetObject(System.String) 0033f05c 02b7096f FilesDownloader.MainForm.InitializeComponent() 0033f2f0 02b70270 FilesDownloader.MainForm..ctor() 0033f300 02b70090 FilesDownloader.Program.Main() --- snip ---
Trace log:
--- snip --- 002b:Call gdiplus.GdipLoadImageFromStream(038a0030,0032e944) ret=0036a110 ... 002b:Call KERNEL32.RaiseException(e0434f4d,00000001,00000001,0032e30c) ret=79f97065 002b:trace:seh:raise_exception code=e0434f4d flags=1 addr=0x7b8394f7 ip=7b8394f7 tid=002b 002b:trace:seh:raise_exception info[0]=80004001 002b:trace:seh:raise_exception eax=7b826491 ebx=7b8b06b0 ecx=80004001 edx=0032e208 esi=0032e2ec edi=0032e260 002b:trace:seh:raise_exception ebp=0032e248 esp=0032e1e4 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000287 002b:trace:seh:call_stack_handlers calling handler at 0x79f9a3c8 code=e0434f4d flags=1 002b:trace:seh:call_stack_handlers handler at 0x79f9a3c8 returned 1 002b:trace:seh:call_stack_handlers calling handler at 0x7a3197d4 code=e0434f4d flags=1 ... 002b:trace:gdiplus:GdipCreateStreamOnFile ((null), 2147483648, 0x32e7c8) 002b:Ret gdiplus.GdipLoadImageFromStream() retval=00000002 ret=0036a110 --- snip ---
The commit can't be cleanly reverted but just restoring old behaviour in GdipLoadImageFromStream() gets the app to work again.
Regards
http://bugs.winehq.org/show_bug.cgi?id=31032
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |http://www.ragnarokeurope.c | |om/includes/files/ROManager | |.exe Blocks| |28682 Regression SHA1| |9e12bc0175f6a65ee45ebce1ca5 | |19eac6f5ca501 Severity|normal |minor
--- Comment #1 from Anastasius Focht focht@gmx.net 2012-06-26 17:15:43 CDT --- Hello,
filling fields.
'winetricks -q gdiplus' works around.
$ wine --version wine-1.5.7-114-gd079b66
$ du -sh ROManager.exe 1.2M ROManager.exe
$ sha1sum ROManager.exe cc0f63408d9ee46cd864a56bdd7b2372806d48f9 ROManager.exe
Regards
http://bugs.winehq.org/show_bug.cgi?id=31032
--- Comment #2 from Vincent Povirk madewokherd@gmail.com 2012-06-26 17:23:41 CDT --- Probably should AddRef the stream instead of cloning it.
http://bugs.winehq.org/show_bug.cgi?id=31032
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |dmitry@baikal.ru
http://bugs.winehq.org/show_bug.cgi?id=31032
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=31032
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31033
http://bugs.winehq.org/show_bug.cgi?id=31032
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2012-06-27 00:35:52 CDT --- (In reply to comment #2)
Probably should AddRef the stream instead of cloning it.
Thanks Vincent, this looks like it's supposed to be implemented, I sent patch with a test case: http://www.winehq.org/pipermail/wine-patches/2012-June/115581.html
http://bugs.winehq.org/show_bug.cgi?id=31032
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |computergeoffrey@zoho.com
--- Comment #4 from Anastasius Focht focht@gmx.net 2012-06-27 03:16:54 CDT --- *** Bug 31035 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=31032
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |174b74bab29e5c83ab8a8d50d0b | |43b6fd1a13b53 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #5 from Austin English austinenglish@gmail.com 2012-06-28 14:17:36 CDT --- http://source.winehq.org/git/wine.git/commitdiff/174b74bab29e5c83ab8a8d50d0b...
fixes this with native dotnet20. Mono is still broken though.
http://bugs.winehq.org/show_bug.cgi?id=31032
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spoon0042@hotmail.com
--- Comment #6 from Anastasius Focht focht@gmx.net 2012-06-30 12:57:33 CDT --- *** Bug 31081 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=31032
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2012-07-03 14:14:34 CDT --- Closing bugs fixed in 1.5.8.