473,498 Members | 891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem when I stop my app in vb.net

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'

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

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

What is happening, and how do I get around it ?

Thanks
Nov 20 '05 #1
6 1107
Cor
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
Nov 20 '05 #2
* "AussieRules" <so*****@nowhere.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
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

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eI**************@TK2MSFTNGP09.phx.gbl...
* "AussieRules" <so*****@nowhere.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4
Cor
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
Nov 20 '05 #5
Tried that, and sadly it seems to be ok, when the project is a bare bones
basic one.
"Cor" <no*@non.com> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
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

Nov 20 '05 #6
"AussieRules" <so*****@nowhere.com> wrote...
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


Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1163
by: christian | last post by:
Hi all, I've been trying to add the following values in a form, but I don't know how to do it: Start Stop WorkedHours SET UET Other Time TotalHours 08:00PM 04:00PM 8:00...
10
4809
by: james | last post by:
My app has a notify Icon, but after the app exits, the Icon is still visible, and then when I runthe app multiple times I get multiple icons so that my status bas keeps accumulating them to the...
2
2518
by: Stampede | last post by:
Hi guys 'n' girls, I want to use callback methods when using BeginInvoke on some events. So far no problem, but know I thought about what could happen (if I'm not completly wrong). Lets say an...
1
2380
by: Raveendra M | last post by:
Hi! I am working with ASP.NET application. In my page I am creating one Application Domain and in that domain I am calling my DLL. Using the methods of the dll. And unloading the Application...
4
2500
by: N. Demos | last post by:
Hello, I'm learning ASP.NET, and am having a strange problem with some example code from the book I'm using. The code increments and displays the value stored in a session variable when the "Add"...
4
2000
by: PiotrKolodziej | last post by:
hi I have a thread that downloades a file. Problem is : Not all files are beeing downloaded. I observed that only the small files are beeing downloaded correctly. I also cant download two files...
12
2267
by: Justin | last post by:
I can attach my code if anyone wants to see it however I'll try to ask my question with some mark up code first. I'm having a problem terminating my process while using DoEvents. For example: ...
15
2218
RMWChaos
by: RMWChaos | last post by:
In my ongoing effort to produce shorter, more efficient code, I have created a "chicken and egg" / "catch-22" problem. I can think of several ways to fix this, none of them elegant. I want my code...
0
3472
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
1
2506
by: raghudr | last post by:
Hi all, I am displaying a splash screen for which i have created a thread.Since my whole project is launched by windows service and that service will start automatically at the start of the...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.