[Mono-bugs] [Bug 343342] New: [Regression] InvOpEx in GDIPlus. CheckStatus from ImageAnimator.CanAnimate on attached image

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 21 10:50:40 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=343342

           Summary: [Regression] InvOpEx in GDIPlus.CheckStatus from
                    ImageAnimator.CanAnimate on attached image
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at ximian.com
          Found By: ---


Created an attachment (id=184250)
 --> (https://bugzilla.novell.com/attachment.cgi?id=184250)
Image that causes the exception

The attached icon causes:
[[
Unhandled Exception: System.InvalidOperationException: The operation is invalid
[GDI+ status: Win32Error]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00229] in
D:\cygwin\usr\src\mono\mcs\class\System.Drawing\System.Drawing\gdipFunctions.cs:236 
  at System.Drawing.Image.GetFrameCount (System.Drawing.Imaging.FrameDimension
dimension) [0x00017] in
D:\cygwin\usr\src\mono\mcs\class\System.Drawing\System.Drawing\Image.cs:342 
  at (wrapper remoting-invoke-with-check) System.Drawing.Image:GetFrameCount
(System.Drawing.Imaging.FrameDimension)
  at System.Drawing.ImageAnimator.CanAnimate (System.Drawing.Image image)
[0x00008] in
D:\cygwin\usr\src\mono\mcs\class\System.Drawing\System.Drawing\ImageAnimator.cs:106 
  at System.Windows.Forms.ToolStripItem.BeginAnimation () [0x00000] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ToolStripItem.cs:1759 
  at System.Windows.Forms.ToolStripItem.set_Image (System.Drawing.Image value)
[0x00037] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ToolStripItem.cs:466 
  at StripControlsSample.MainForm.InitializeComponent () [0x00000] 
  at StripControlsSample.MainForm..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) StripControlsSample.MainForm:.ctor ()
  at StripControlsSample.Program.Main () [0x00000] 
]]

The icon is from the sample code in the book "Windows Forms 2.0 Programming,"
by Chris Sells and Michael Weinhardt, sources available from
http://www.sellsbrothers.com/writing/wfbook/

That samples have icons on their menu items, where the icons are base64
embedded in the project's .resx file.

Because of this fault the samples can't be run on Mono.  The icon can be loaded
by the sample when run on MSFT, by MSIE and FF.

Using the code from bug 342733 one sees:
[[
$ mono ImageAnimateCan.exe newToolStripMenuItem
Unhandled Exception: System.InvalidOperationException: The operation is invalid
[GDI+ status: Win32Error]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
  at System.Drawing.Image.GetFrameCount (System.Drawing.Imaging.FrameDimension
dimension) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Drawing.Image:GetFrameCount
(System.Drawing.Imaging.FrameDimension)
  at System.Drawing.ImageAnimator.CanAnimate (System.Drawing.Image image)
[0x00000]
  at Program.Main (System.String[] args) [0x00000]
]]

On Mono 1.2.5 (Win32) that code outputs:  ImageAnimator.CanAnimate: False

I extracted the icon from the resx file by adding the following to the
InitializeComponent method of the ./ch02_Forms/MDIApplicationSample sample.
[[
System.Drawing.Image foo = this.newToolStripMenuItem.Image;
foo.Save("newToolStripMenuItem");
]]


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list