Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An unhandled exception.

22 views
Skip to first unread message

Tim P

unread,
Jul 30, 2002, 3:14:54 AM7/30/02
to
Can somebody please tell me what is going on, I get an unhandled
exception, it happens when press Cancel on a login screen I have made, I
don't know when it started, but maybe somebody have a solution!

Regards Tim P
Thanks her is the error

The error mess.
An Unhandled exception ot type 'System.InvalidOperationException'
occurred in mscorlib.dll

Additional Information: LocalDataStoreSlot storage has been freed.


And when I show disassembly I get this:

00000000 push ebp
00000001 mov ebp,esp
00000003 sub esp,20h
00000006 push edi
00000007 push esi
00000008 push ebx
00000009 mov esi,ecx
0000000b mov edi,edx
0000000d xor ebx,ebx
0000000f mov dword ptr [ebp-10h],0
00000016 xor ebx,ebx
00000018 mov ecx,dword ptr [esi+8]
0000001b mov edx,edi
0000001d cmp dword ptr [ecx],ecx
0000001f call FFF21830
00000024 mov ecx,edi
00000026 cmp dword ptr [ecx],ecx
00000028 call FFF22248
0000002d mov dword ptr [ebp-14h],eax
00000030 mov eax,dword ptr [ebp-14h]
00000033 mov dword ptr [ebp-10h],eax
00000036 cmp dword ptr [ebp-10h],0
0000003a jl 00000068
0000003c mov eax,dword ptr [ebp-10h]
0000003f mov edx,dword ptr [esi+4]
00000042 cmp eax,dword ptr [edx+4]
00000045 jl 00000050
00000047 xor eax,eax
00000049 pop ebx
0000004a pop esi
0000004b pop edi
0000004c mov esp,ebp
0000004e pop ebp
0000004f ret
00000050 mov eax,dword ptr [ebp-10h]
00000053 mov edx,dword ptr [esi+4]
00000056 cmp eax,dword ptr [edx+4]
00000059 jb 00000062
0000005b xor ecx,ecx
0000005d call 756874E7
00000062 mov eax,dword ptr [edx+eax*4+0Ch]
00000066 mov ebx,eax
00000068 mov ecx,edi
0000006a cmp dword ptr [ecx],ecx
0000006c call FFF221E0
00000071 and eax,0FFh
00000076 mov dword ptr [ebp-18h],eax
00000079 cmp dword ptr [ebp-18h],0
0000007d jne 000000AE
0000007f mov ecx,dword ptr ds:[01B732A4h]
00000085 call FFF7B000
0000008a mov dword ptr [ebp-1Ch],eax
0000008d mov ecx,2D7721Ch
00000092 call FCC9A610
00000097 mov dword ptr [ebp-20h],eax
0000009a mov edx,dword ptr [ebp-1Ch]
0000009d mov ecx,dword ptr [ebp-20h]
000000a0 call dword ptr ds:[02D7727Ch]
000000a6 mov ecx,dword ptr [ebp-20h]
000000a9 call 7573B388
000000ae mov eax,ebx
000000b0 pop ebx
000000b1 pop esi
000000b2 pop edi
000000b3 mov esp,ebp
000000b5 pop ebp
000000b6 ret

Adrian Platte [MS]

unread,
Jul 30, 2002, 7:07:26 AM7/30/02
to
Hi.

I'm not very good on reading IL (the same as the rest of
people here, I guess), so maybe some **VB** code could
help us to find what the problem is.

I also suggest you change your project to start from a
Sub Main instead of your main form, and add the following
code in order to set up a global exception handler for
your application, maybe that gives you a hint on what the
problem is.

Public Shared Sub Main()
'Set up a global exception hanlder
AddHandler Application.ThreadException, _
MyHandlerForUnhandledExceptions
'Run your main form
Application.Run(New MyMainForm())
End Sub
Public Shared Sub MyHandlerForUnhandledExceptions( _
ByVal sender As Object, _
ByVal e As System.Threading.ThreadExceptionEventArgs)
MessageBox.Show("Error: " & e.Exception.ToString(), _
"Unhandled error"
End Sub

Hope this helps,

Adrian

This posting is provided "AS IS" with no warranties, and
confers no rights.

>.
>

Tim P

unread,
Jul 31, 2002, 4:16:43 AM7/31/02
to
Thanks for the answer
I could not get it to work sow I just added this to you code AddressOf
MyHandlerForUnhandledExceptions the AddressOf, but I am not sure on what is
happening!! But not my exception isn't thrown can you tell me what is going
on? And what your exception is doing ?

Thanks
Tim Pedersen


"Adrian Platte [MS]" <apl...@online.microsoft.com> wrote in
news:2a2301c237b9$4975f5a0$b1e62ecf@tkmsftngxa04:

Tim P

unread,
Jul 31, 2002, 4:21:07 AM7/31/02
to
Okay sorry about the language errors.

Thanks for the answer
I could not get it to work sow I just added this to you code AddressOf
MyHandlerForUnhandledExceptions the AddressOf, but I am not sure on what is
happening!! But now my exception is not thrown can you tell me what is
going on? And what your exception is doing?

Thanks
Tim Pedersen

"Adrian Platte [MS]" <apl...@online.microsoft.com> wrote in
news:2a2301c237b9$4975f5a0$b1e62ecf@tkmsftngxa04:

> Public Shared Sub Main()

Bharat Patel [MS]

unread,
Aug 2, 2002, 11:54:42 AM8/2/02
to
Hi,

Look for Finalize event of the Form. From the error message, it seems like
the the finalize method of the form has been called and then some code
tries to execute on the same thread after the form has been garbage
collected. Try providing the code you have in the finalize event handlder
for this form and also provide some more information on how are you
starting your applicatin and what is the Startup form in this application.


Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.

Please reply to newsgroups only. Thanks.

0 new messages