What does this error mean?

P

Peter B

Hi!

I have an application that crashed, when performing a simple operation that
usually don't crash. What I usually need to do is to run a method that calls
CreateProcess in OpenNETCF.org WinAPI, which just is a wrapper to the native
CreateProcess method. The CreateProcess starts the peghelp.exe application
given a parameter to a help-file. It seemt that it is when this help-file
couldn't be found that the problem occurs, atleast this is the impression I
have... The problem is that it doesn't have to be instantly, the exceptions
are thrown sporadically (common with objectdisposed exception? ).

I have provided 2 call stacks from my exceptions belowand in both examples
below I am doing something completely different than calling the help
method, and in the second example I am not even working in the form where
the exception is thrown.

Crash information 1:
On the virge of going from one form (login) to another the application crash
with the following information:

An unhandled exception of type 'System.ObjectDisposedException' occurred in
System.Windows.Forms.dll

Call stack:
System.Windows.Forms.dll!AGL.MISC.HandleAr(AGL.PAL_ERROR ar =
InvalidHandle) + 0x55 bytes
System.Windows.Forms.dll!System.Windows.Forms.ComboBox._NativeClear() +
0x2f bytes

System.Windows.Forms.dll!System.Windows.Forms.ComboBox.ObjectCollection.Clea
rInternal() + 0xb bytes

System.Windows.Forms.dll!System.Windows.Forms.ComboBox.ObjectCollection.Clea
r() + 0x11 bytes
SIBSQLCE.exe!SIBSQLCE.TreeViewForm.InitCmbBoxProg() Line 621 C#
SIBSQLCE.exe!SIBSQLCE.TreeViewForm.Init() Line 602 C#
SIBSQLCE.exe!SIBSQLCE.LoginForm.Login() Line 725 C#
SIBSQLCE.exe!SIBSQLCE.LoginForm.lblLogin_Click(System.Object sender =
{SIBSQLCE.Controls.LoginControl}, System.EventArgs e = {System.EventArgs})
Line 812 C#

System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventAr
gs e = {System.EventArgs}) + 0x15 bytes
SIBSQLCE.exe!SIBSQLCE.Controls.ActionLabelControl.OnClick(System.EventArgs
e = {System.EventArgs}) Line 138 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.WnProc(int hwnThis =
3276877, AGL.Form.WM wm = WM_LMOUSEUP, int wParam = 43, int lParam = 11) +
0x22f bytes
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(int
hwnThis = 3276877, AGL.Form.WM wm = WM_LMOUSEUP, int wParam = 43, int lParam
= 11) + 0xb bytes
System.Windows.Forms.dll!AGL.EVL.EnterMainLoop(int hwnMain = 3211277)

System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows
..Forms.Form fm = {SIBSQLCE.LoginForm}) + 0x1a bytes
SIBSQLCE.exe!SIBSQLCE.LoginForm.Main() Line 133 + 0xa bytes C#


Crash information 2.
Here I wasn't even working in the form where the exception occured. The form
TreeViewForm seems to be updating some objects after an TreeView.AfterSelect
event. This is odd, how could I select a treenode when I'm not working the
form??? I have however been in the treeviewform earlier, but went back to
loginform. I wonder if the call stack missed a bunch of operations here....
Not sure the treeview information is of interest actually..

Call stack:
System.Windows.Forms.dll!AGL.MISC.HandleAr(AGL.PAL_ERROR ar =
InvalidHandle)
System.Windows.Forms.dll!System.Windows.Forms.Control.get_Text()
System.Windows.Forms.dll!System.Windows.Forms.Control.set_Text(string
value = "Stolpar: 0st")
SIBSQLCE.exe!SIBSQLCE.TreeViewForm.UpdateNumObjTexts() Line 1083 C#
SIBSQLCE.exe!SIBSQLCE.TreeViewForm.treeView1_AfterSelect(System.Object
sender = {System.Windows.Forms.TreeView},
System.Windows.Forms.TreeViewEventArgs e =
{System.Windows.Forms.TreeViewEventArgs}) Line 2092 C#

System.Windows.Forms.dll!System.Windows.Forms.TreeView.OnAfterSelect(System.
Windows.Forms.TreeViewEventArgs e =
{System.Windows.Forms.TreeViewEventArgs})
System.Windows.Forms.dll!System.Windows.Forms.TreeView.WnProc(int hwnThis
= 1245409, AGL.Form.WM wm = WM_TREEVIEW_SELCHANGED, int wParam = 0, int
lParam = 1311105)
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(int
hwnThis = 1245409, AGL.Form.WM wm = WM_TREEVIEW_SELCHANGED, int wParam = 0,
int lParam = 1311105)
System.Windows.Forms.dll!AGL.CTL.TreeNodeRemove(int htviRemove = 2359565)
System.Windows.Forms.dll!System.Windows.Forms.TreeNode._RemoveNative()
System.Windows.Forms.dll!System.Windows.Forms.TreeNode._RemoveNative()
System.Windows.Forms.dll!System.Windows.Forms.TreeNode._RemoveNative()
System.Windows.Forms.dll!System.Windows.Forms.TreeNode._RemoveNative()
System.Windows.Forms.dll!System.Windows.Forms.TreeNode._RemoveNative()
System.Windows.Forms.dll!System.Windows.Forms.TreeView.WnProc(int hwnThis
= 1245409, AGL.Form.WM wm = WM_DESTROY, int wParam = 0, int lParam = 0)
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(int
hwnThis = 1245409, AGL.Form.WM wm = WM_DESTROY, int wParam = 0, int lParam =
0)
System.Windows.Forms.dll!AGL.EVL.EnterMainLoop(int hwnMain = 3211277)

System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows
..Forms.Form fm = {SIBSQLCE.LoginForm})
SIBSQLCE.exe!SIBSQLCE.LoginForm.Main() Line 133 C#


If someone could explain the last (top) row I would be greatful!

I have searched the web for information on AGL.PAL_ERROR without success.

I even have a try-catch statement around Application.Run but the exception
still isn't caught. Is it possible to get a more comprehensive callstack
than found in the VS IDE? Can I add verbose output?

thanks,

Peter
 
A

Alex Yakhnin [MVP]

Few questions:

Do you have these crashes if you don't use CreateProcess ?

Do you have any other then UI threads running in your app?
 
P

Peter B

Since this error seems to be hard to pin-point I can't be 100% sure but I'm
99% sure that they are in some way related. It also seems like the use of
Dialog forms (ShowDialog) that call CreateProcess makes the crash even more
certain.

If I open a showdialog form, call CreateProcess from it and THE HELP-FILE I
am trying to open DOESN'T EXIST, there is a much higher probability (it may
even be required) that the app will crash.

The last exception I caught, what does first chance exception mean?
A first chance exception of type 'System.ObjectDisposedException' occurred

I don't have any other threads running. The parts that use other threads are
not activated during my tests.
thanks,

Peter

Alex Yakhnin said:
Few questions:

Do you have these crashes if you don't use CreateProcess ?
 
P

Peter B

I think it all comes down to some improper handling of form.ShowDialog(),
form.Show(), DialogResult and form.Close()

Investigating a bit further...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top