View previous topic :: View next topic |
Author |
Message |
z00rg
Joined: 03 Jan 2006 Posts: 12
|
Posted: Mon May 08, 2006 4:36 pm Post subject: GDI Exception during drag & drop |
|
|
I get this exception
An unhandled exception of type 'System.Runtime.InteropServices.ExternalException' occurred in system.drawing.dll
Additional information: A generic error occurred in GDI+.
from the following file "DrawingUtilities.cs" in the method "CreateCursor" at line no 255, this is the exact line "return new Cursor(bitmap.GetHicon());"
this generally happens when i click a lot of times near the row header and try to drag and drop in very quick successions.
please help |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon May 08, 2006 10:19 pm Post subject: |
|
|
The full stack trace would be helpful. Are you dragging and dropping rows or column headers?
Can you generate this error on any of the standard sample projects? If not can you please email a sample project which illustrates the issue to support@infralution.com. _________________ Infralution Support |
|
Back to top |
|
|
Eric
Joined: 06 Oct 2005 Posts: 15 Location: Regensburg, Germany
|
Posted: Fri May 12, 2006 1:42 pm Post subject: |
|
|
I have this bug for some weeks already. I used r2.4 and updated to 2.5.2 and still have the pb.
It occurs after many drag'n drop in a tree, without I can notice exactly when -> not easy to reproduce.
For each tree in my application, I use a node object with an RowIcon property (of type Icon). In the tree where the bug came, the Icon element is set to null.
Then, in GetRowData, I simply made :
Code: | e.RowData.Icon = node1.RowIcon; |
Here the full stack trace: Quote: |
A generic error occurred in GDI+.
---------------------------------------------------------------------------
In file:
In method: Void Application_ThreadException(System.Object, System.Threading.ThreadExceptionEventArgs)
In line: 0
---------------------------------------------------------------------------
Stacktrace follows
---------------------------------------------------------------------------
at System.Drawing.Bitmap.GetHicon()
at Infralution.Controls.DrawingUtilities.CreateCursor(Image image, Single transparency, Int32 hotSpotX, Int32 hotSpotY, Cursor overlayCursor, Int32 overlayHotSpotX, Int32 overlayHotSpotY)
at Infralution.Controls.VirtualTree.RowWidget.SetDragCursors()
at Infralution.Controls.VirtualTree.RowWidget.DoDragDrop()
at Infralution.Controls.VirtualTree.RowWidget.OnMouseMove(MouseEventArgs e, Boolean enableDragSelect)
at Infralution.Controls.VirtualTree.RowWidget.OnMouseMove(MouseEventArgs e)
at Infralution.Controls.VirtualTree.CellWidget.OnMouseMove(MouseEventArgs e)
at Infralution.Controls.WidgetControl.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Infralution.Controls.BorderedControl.WndProc(Message& m)
at Infralution.Controls.VirtualTree.VirtualTree.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lpara |
Unfortunately, I cannot send you a sample project (not time to make it, and not allowed to send a part of the application where the tree is used) |
|
Back to top |
|
|
Eric
Joined: 06 Oct 2005 Posts: 15 Location: Regensburg, Germany
|
Posted: Fri May 12, 2006 3:38 pm Post subject: fast drag'n drop bugS |
|
|
I've tried the drag'n drop of your sample "ADO.NET Dataset Browser".
As it is, the bug does not come.
Then, I've open the sources, DataSetBrowserForm in VS Designer -> Edit VirtualTree -> Data Binding -> DataRow(orders):
Icon and ExpandedIcon properties: I've simply removed them (set to none).
And then, after some quick drag'n drop, this GDI+ exception occurs!!
Futhermore, another bug occurs (also in this sample) when the drag'n drop is done to a collapsed node. The destination node automatically expand, and it is then sometimes not possible to collapse it again (after collopased, it expand again automatically).
VirtualTree do not seem to like the "quick and dirty" drag'n drop test!!
PS: I am under VS2003, so I would like to see these bugs fixed on the next (last?) release for VirtualTree for 2003. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri May 12, 2006 11:07 pm Post subject: |
|
|
Thanks that gives us some more information to go on. We will take a look at it. We will continue supporting the 2003 compatible version of Virtual Tree with bug fixes even after the 2005 only version is released. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun May 14, 2006 11:16 pm Post subject: |
|
|
We have been able to replicate the GDI+ exception and have tracked down the source of problem. I haven't been able to replicate the issue with dropping to a collapsed node expanding it so that it can't be collapsed again. I suspect this may be a result of an earlier exception?
We should have a fix out for the GDI+ exception later today. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon May 15, 2006 7:23 am Post subject: |
|
|
We've encountered a few other issue when testing the next release. These mean the release will be delayed until Wednesday 18 May 06. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed May 17, 2006 2:39 am Post subject: |
|
|
Version 2.5.3 has now been released and fixes this issue. _________________ Infralution Support |
|
Back to top |
|
|
|