Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic error (unable to reproduce consistantly) (Read 3913 times)
Bjorn
YaBB Newbies
*
Offline


Alfadata Technologies
Corporation

Posts: 33
Location: Alberta
Joined: Aug 14th, 2008
error (unable to reproduce consistantly)
Sep 15th, 2009 at 7:53pm
Print Post  
Sorry for the lameness / incompleteness, I cannot seem to reliably reproduce this issue and I am wondering if you have an idea that could help point me in the right direction.

I have a largish application that uses custom objects, and, when they are clicked on, they change color to show they are highlighted. Occasionally (apparently randomly as far as I can tell) when the user clicks on one of the links, shapenodes or tablenodes, the overview window crashes out (and is replace by a large red X) with this error:

System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawImage(Image image, Single x, Single y, Single width, Single height)
at MindFusion.Drawing.GdiGraphics.DrawImage(Image image, Single x, Single y, Single width, Single height)
at MindFusion.Diagramming.InternalUtils.x558cc83610335d8b(IGraphics x41347a961b838962, Image x4a6f8f599234ca5f, RectangleF x26545669838eb36e, ImageAlign x2e6580b48a110b1a, Single x4749942254829e39, PointF x6ed65a00e5541460, Single x9bdeb785c5aca5b5)

I have tried reproducing this in a simple application with no success, and even in my production application it only happens intermittantly and I have not been able to reproduce it consistantly. Have you seen this error or know what might cause it?

Thanks in advance for any advice!

Regards,

Bjorn
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: error (unable to reproduce consistantly)
Reply #1 - Sep 16th, 2009 at 6:06am
Print Post  
Could you enable the "when thrown" checkbox for "CLR exceptions" in the Debug/Exceptions settings form, and in the watch window check what values to the DrawImage arguments have? Isn't there more of this stack trace, showing which item class calls the DrawImage method?

Regards,
Stoyan
  
Back to top
 
IP Logged
 
Bjorn
YaBB Newbies
*
Offline


Alfadata Technologies
Corporation

Posts: 33
Location: Alberta
Joined: Aug 14th, 2008
Re: error (unable to reproduce consistantly)
Reply #2 - Sep 16th, 2009 at 2:49pm
Print Post  
Hello Stoyan,

Thank you for the prompt reply.

I have not been able to get this error to come up in test / debug yet. I have been having trouble narrowing down what causes it. So far I have only reports from customers (and I have witnessed it a couple times in production on a customer's machine). I will work on getting it to happen in debugging to see if I can get the parameters to the DrawImage call.

There is indeed more to the stack trace. Not sure why I neglected to paste it in the first time. Sorry about that. here is the complete trace (minus the "loaded assemblies" section).

System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawImage(Image image, Single x, Single y, Single width, Single height)
at MindFusion.Drawing.GdiGraphics.DrawImage(Image image, Single x, Single y, Single width, Single height)
at MindFusion.Diagramming.InternalUtils.x558cc83610335d8b(IGraphics x41347a961b838962, Image x4a6f8f599234ca5f, RectangleF x26545669838eb36e, ImageAlign x2e6580b48a110b1a, Single x4749942254829e39, PointF x6ed65a00e5541460, Single x9bdeb785c5aca5b5)
at MindFusion.Diagramming.ShapeNode.xeda13f64d938197c(IGraphics x41347a961b838962, RenderOptions xdfde339da46db651)
at MindFusion.Diagramming.ShapeNode.xc79d59e9288101bd(IGraphics x41347a961b838962, RectangleF xa6236fc5cd405c4e, Boolean x2f9dabff87b2168b, Brush xb45de92d01a0ec1f, Pen x9c79b5ad7b769b12, RenderOptions xdfde339da46db651)
at MindFusion.Diagramming.ShapeNode.Draw(IGraphics graphics, RenderOptions options)
at MindFusion.Diagramming.Diagram.x679ae26de3befa07(IGraphics x41347a961b838962, RectangleF xd0772cd9ac472b96, Boolean x979174172ae18db3)
at MindFusion.Diagramming.Diagram.Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, Boolean noModifiedItems)
at MindFusion.Diagramming.WinForms.Overview.x63073b9c25464bd6(IGraphics x4b101060f4767186)
at MindFusion.Diagramming.WinForms.Overview.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Also, I am on 5.3.1, we have not yet upgraded our application to 5.3.2. here is the loaded minfusion assembly versions

MindFusion.Diagramming.WinForms 5.3.1.23786
MindFusion.Diagramming 5.3.1.23784
MindFusion.Diagramming.WinForms.Overview 5.3.1.23788
MindFusion.Common 1.2.3475.22165
MindFusion.Graphs 1.0.0.0
MindFusion.Diagramming.WinForms.Ruler 5.3.1.23788
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: error (unable to reproduce consistantly)
Reply #3 - Sep 16th, 2009 at 3:42pm
Print Post  
Are you using the Overview in FitAll mode or with a very small scale factor? I think we had similar problems with calls to DrawString when the scale is very small, so now the Overview does not draw item labels at all when the scale is less than 1/100.
  
Back to top
 
IP Logged
 
Bjorn
YaBB Newbies
*
Offline


Alfadata Technologies
Corporation

Posts: 33
Location: Alberta
Joined: Aug 14th, 2008
Re: error (unable to reproduce consistantly)
Reply #4 - Sep 16th, 2009 at 5:21pm
Print Post  
Yes, the overview window is in fitall mode. It doesn't draw labels but it still seems to try to draw the custom images.

We also have:

Me.Overview1.DisplayBackground = False
Me.Overview1.DisplayBackgroundImage = False
Me.Overview1.DisplayShadows = False
Me.Overview1.DisplayText = False

I wonder if setting "displayImages" to false as well might work as a workarround? The images are really not large enough to display in the overview window generally anyway, so I could certainly change that setting in the next update and see if that helps with the issue.
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: error (unable to reproduce consistantly)
Reply #5 - Sep 16th, 2009 at 6:27pm
Print Post  
Yes, you could add a check if (overview.ScaleFactor < 5) then set DisplayImages to false. Let us know if the problem still happens then.
  
Back to top
 
IP Logged
 
Bjorn
YaBB Newbies
*
Offline


Alfadata Technologies
Corporation

Posts: 33
Location: Alberta
Joined: Aug 14th, 2008
Re: error (unable to reproduce consistantly)
Reply #6 - Sep 16th, 2009 at 8:10pm
Print Post  
will do.  Thanks again.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint