Problem when I stop my app in vb.net

  • Thread starter Thread starter AussieRules
  • Start date Start date
A

AussieRules

Hi,

When ever I run my app from within the vb.net ide, all goes fine, except
when I exit the app. I get the following error twice in a row.

When I select 'break' the Address of the problem is
'system.drawing.font.clone'
 
Hi Aussie,

It is a very little bit of information you supplied, but probably you try to
close a drawing object in a closing event that you already have deleted and
than probably something like a bitmap.dispose.

And something that not exist any more (disposed) has not to be closed.

But with this amount of code it is real gambling

When it is not copy your code from your close/closing event (first to a
notebook please and then back).

But it could be this?

Cor

"
When ever I run my app from within the vb.net ide, all goes fine, except
when I exit the app. I get the following error twice in a row.
When I select 'break' the Address of the problem is
'system.drawing.font.clone'
An unhandled exception of type 'System.NullReferenceException' occurred in
system.drawing.dll
Additional information: Object reference not set to an instance of an
object
 
* "AussieRules said:
When ever I run my app from within the vb.net ide, all goes fine, except
when I exit the app. I get the following error twice in a row.

When I select 'break' the Address of the problem is
'system.drawing.font.clone'

------------
An unhandled exception of type 'System.NullReferenceException' occurred in
system.drawing.dll

Additional information: Object reference not set to an instance of an object
-------------

Does the debugger show you the code that caused the error? Do _you_
clone font objects?
 
If you mean the assembler code, yes it does, and its pasted to the bottom of
this email.

None of my forms or the application have any code in the closed/unloading
events, and I do nothing with fonts at all.

I actually think it might be a third party component I am using, but they
are not helping at all, and saying that it must be my problem in my code(of
which there is none!)

The line that the debugger halts on is line 000000000043


00000000 83 EC 0C sub esp,0Ch

00000003 57 push edi

00000004 56 push esi

00000005 53 push ebx

00000006 55 push ebp

00000007 33 C0 xor eax,eax

00000009 89 44 24 14 mov dword ptr [esp+14h],eax

0000000d 8B F1 mov esi,ecx

0000000f 33 DB xor ebx,ebx

00000011 33 ED xor ebp,ebp

00000013 8B 05 30 36 DA 07 mov eax,dword ptr ds:[07DA3630h]

00000019 8B 00 mov eax,dword ptr [eax]

0000001b 89 44 24 10 mov dword ptr [esp+10h],eax

0000001f FF 76 0C push dword ptr [esi+0Ch]

00000022 8D 4C 24 18 lea ecx,[esp+18h]

00000026 8B D6 mov edx,esi

00000028 8B 05 74 31 DA 07 mov eax,dword ptr ds:[07DA3174h]

0000002e FF 10 call dword ptr [eax]

00000030 8D 44 24 14 lea eax,[esp+14h]

00000034 FF 70 04 push dword ptr [eax+4]

00000037 FF 30 push dword ptr [eax]

00000039 8D 4C 24 18 lea ecx,[esp+18h]

0000003d FF 15 B4 D5 D6 07 call dword ptr ds:[07D6D5B4h]

00000043 8B F8 mov edi,eax

00000045 8B DF mov ebx,edi

00000047 85 DB test ebx,ebx

00000049 74 12 je 0000005D

0000004b 8B CB mov ecx,ebx

0000004d FF 15 54 D6 D6 07 call dword ptr ds:[07D6D654h]

00000053 8B F8 mov edi,eax

00000055 8B CF mov ecx,edi

00000057 FF 15 F8 2D DA 07 call dword ptr ds:[07DA2DF8h]

0000005d B9 F8 B6 D6 07 mov ecx,7D6B6F8h

00000062 FF 15 A0 2D DA 07 call dword ptr ds:[07DA2DA0h]

00000068 8B F8 mov edi,eax

0000006a 0F B6 46 1C movzx eax,byte ptr [esi+1Ch]

0000006e 50 push eax

0000006f 0F B6 46 1D movzx eax,byte ptr [esi+1Dh]

00000073 50 push eax

00000074 8B 54 24 18 mov edx,dword ptr [esp+18h]

00000078 8B CF mov ecx,edi

0000007a FF 15 84 B7 D6 07 call dword ptr ds:[07D6B784h]

00000080 90 nop

00000081 8B EF mov ebp,edi

00000083 8B C5 mov eax,ebp

00000085 5D pop ebp

00000086 5B pop ebx

00000087 5E pop esi

00000088 5F pop edi

00000089 83 C4 0C add esp,0Ch

0000008c C3 ret
 
Hi "AussieRules"
I actually think it might be a third party component I am using, but they
are not helping at all, and saying that it must be my problem in my code(of
which there is none!)
So why do you not make a simple test project with only the third party
component on it.

If there is no other code, you are sure

Just a thought.

Cor
 
Tried that, and sadly it seems to be ok, when the project is a bare bones
basic one.
 
AussieRules said:
When ever I run my app from within the vb.net ide, all goes fine, except
when I exit the app. I get the following error twice in a row.

I don't know what "run my app" entails exactly. Just starting it and
stopping it? Let me suggest that you start small running just a little of
it to see if that works. If it does then try a little more, etc. until it
fails.

If your app opens and updates a database, loads images, prints reports,
etc., etc.. and then when you exit you get an error you haven't narrowed
down the number of places to look. I don't know of any better way to do it.

Tom
 
Back
Top