|
Infralution Support Support groups for Infralution products
|
View previous topic :: View next topic |
Author |
Message |
bhofmann
Joined: 20 Aug 2007 Posts: 26
|
Posted: Thu Apr 24, 2008 4:47 pm Post subject: Crash when expanding a row |
|
|
Hello,
I'm joining the call stack of an exception that happened to a user of my application and that seem to be related to the virtual tree:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. ---> ApplicationThreadException: An unhandled exception occured
at Infralution.Controls.VirtualTree.Row.Reindex (System.Int32) in Row.cs:line 759
at Infralution.Controls.VirtualTree.Row.Reindex () in Row.cs:line 896
at Infralution.Controls.VirtualTree.Row.set_Expanded (System.Boolean) in Row.cs:line 205
at Infralution.Controls.VirtualTree.Row.Expand () in Row.cs:line 216
at Infralution.Controls.VirtualTree.RowWidget.ExpandRow () in RowWidget.cs:line 1471
at Infralution.Controls.VirtualTree.ExpansionWidget.OnMouseDown (System.Windows.Forms.MouseEventArgs) in ExpansionWidget.cs:line 148
at Infralution.Controls.WidgetControl.OnMouseDown (System.Windows.Forms.MouseEventArgs) in WidgetControl.cs:line 343
at Infralution.Controls.VirtualTree.VirtualTree.OnMouseDown (System.Windows.Forms.MouseEventArgs) in VirtualTree.cs:line 8508
at PHPEdit.Controls.VirtualTree.OnMouseDown (System.Windows.Forms.MouseEventArgs) in VirtualTree.cs:line 554
at System.Windows.Forms.Control.WmMouseDown (System.Windows.Forms.Message&, System.Windows.Forms.MouseButtons, System.Int32) in System.Windows.Forms:offset 142
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&) in System.Windows.Forms:offset 1181
at Infralution.Controls.BorderedControl.WndProc (System.Windows.Forms.Message&) in BorderedControl.cs:line 94
at Infralution.Controls.VirtualTree.VirtualTree.WndProc (System.Windows.Forms.Message&) in VirtualTree.cs:line 6879
at PHPEdit.Controls.VirtualTree.WndProc (System.Windows.Forms.Message&) in VirtualTree.cs:line 615
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage (System.Windows.Forms.Message&) in System.Windows.Forms:offset 0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message&) in System.Windows.Forms:offset 142
at System.Windows.Forms.NativeWindow.Callback (System.IntPtr, System.Int32, System.IntPtr, System.IntPtr) in System.Windows.Forms:offset 37
--- End of inner exception stack trace ---
at PHPEdit.Exceptions.ExceptionHandler.Application_ThreadException (System.Object, System.Threading.ThreadExceptionEventArgs) in ExceptionHandler.cs:line 323
at System.Windows.Forms.Application+ThreadContext.OnThreadException (System.Exception) in System.Windows.Forms:offset 43
at System.Windows.Forms.Control.WndProcException (System.Exception) in System.Windows.Forms:offset 6
at System.Windows.Forms.Control+ControlNativeWindow.OnThreadException (System.Exception) in System.Windows.Forms:offset 12
at System.Windows.Forms.NativeWindow.Callback (System.IntPtr, System.Int32, System.IntPtr, System.IntPtr) in System.Windows.Forms:offset 65
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW (System.Windows.Forms.NativeMethods+MSG&) in System.Windows.Forms:unknown location
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop (System.Int32, System.Int32, System.Int32) in System.Windows.Forms:offset 380
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner (System.Int32, System.Windows.Forms.ApplicationContext) in System.Windows.Forms:offset 478
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop (System.Int32, System.Windows.Forms.ApplicationContext) in System.Windows.Forms:offset 19
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) in System.Windows.Forms:offset 12
at PHPEdit.Program.Main (System.String[]) in Program.cs:line 52
Best regards,
Bastien Hofmann |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Apr 25, 2008 1:15 am Post subject: |
|
|
What version of Virtual Tree is the application using?
Is this exception happening repeatably?
Does your application use threads to update data in the tree?
Is your application handling GetChildren programmatically? Is so does the event handler potentially do something which may result in the tree being updated (either directly via UpdateRows or indirectly via a ListChanged notification from the data source)? _________________ Infralution Support |
|
Back to top |
|
|
bhofmann
Joined: 20 Aug 2007 Posts: 26
|
Posted: Fri Apr 25, 2008 9:59 am Post subject: |
|
|
Hello,
Thank you for your answer.
It was version 3.9.0.0 at the time of the crash, we have update to 3.10.0.0 since.
The exception has only be reported once by a user, so it's not repeatable easily.
I'm not accessing the tree by an other thread, at least not intentionnaly, the application contains many threads and I imagine it's possible that a tree gets updated by mistake as a side effect of another action, but I can't see what...
And we have overriden GetChildrenForRow, I'll have to check if we update the rows there, I'll let you know if I have more informations. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Apr 25, 2008 12:37 pm Post subject: |
|
|
Quote: | I'm not accessing the tree by an other thread, at least not intentionnaly, the application contains many threads and I imagine it's possible that a tree |
Any time there is a possibility that another thread could be calling Virtual Tree methods or properties then you should check the InvokeRequired property and call Invoke or BeginInvoke to ensure the correct thread is used. _________________ Infralution Support |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|