473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

unhandled exception in unknown module

In a VB .NET app, I am dynamically changing a form's menu. While stress
testing the code in the IDE, I got intermittent exceptions thrown: "An
unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module". In the debugger, I click on Break and get "There is no
source code available for the current location".

There have been posts in these newsgroups about unhandled exceptions of
various kinds in unknown code. One post suggested SP1 for framework 1.1 was
the problem, and that is what I am running. (FYI, I'm using XP Pro 5.1 SP2
Build 2600, and I'm not calling Application.EnableVisualStyles.) Also, I'm
aware of the chinese characters issue, and that is not my problem. Also, my
problem occurs only in the IDE - my stress tests run fine when I run the exe
outside the IDE (debug version both in IDE and standalone exe).

So, these are my questions:
1. Does MS acknowledge a problem in this area?
2. Is there a consensus view of the state of this problem?
All responses are welcome, but before posting a flip response to #2, please
review previous related postings. Search MSDN Newsgroups for "unhandled
exception unknown module".

Finally, I think I could create a small size .NET VB app that exhibits the
problem, but it would take some effort. Maybe responses to this posting will
make the effort unnecessary.

Nov 22 '05 #1
1 2828
Here is a trivially small illustration of the problem.
1. Create a new VB Windows Application Project
2. Add a KeyPress event
3. Paste the body of the KeyPress event below into your KeyPress event
handler
4. Run the program in the IDE
5. Hit m, repeat at beep, a few repeats may be needed to raise an exception
6. Run the exe standalone outside the IDE, and no exceptions will be thrown.

The problem is intermittent, and that is why there is a for loop.
I know this code is pointless - I whittled down some working code to get the
smallest possible illustration of the problem.

My KeyPress event handler follows:

Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
' illustrate the 'unhandled exception in unknown module' problem
' in the ide, hit m, at beep repeat until an exception is thrown
' execution outside the ide does not throw any exceptions
Select Case e.KeyChar
Case "m"
Dim mm As MainMenu
For i As Integer = 1 To 1000 ' the problem is intermittent
mm = New MainMenu
Next
Beep()
End Select
End Sub

Nov 22 '05 #2

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

Similar topics

1
by: AMercer | last post by:
In a VB .NET app, I am dynamically changing a form's menu. While stress testing the code in the IDE, I got intermittent exceptions thrown: "An unhandled exception of type...
3
by: Lou | last post by:
I can't track down this exception. If anyone has any ideas, please pass them on. I've been trying to kill this bug for days now. An unhandled exception of type 'System.NullReferenceException'...
5
by: Dave Stewart | last post by:
I recently wrote my first Vb.net application, or at least my first complex app since moving up from vb6. When run from the VS.NET IDE, the program shows no errors and runs fine. When the output exe...
5
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by...
5
by: Sam Loveridge | last post by:
Hi All. I'm hoping someone can point me in the direction of a solution to unhandled exceptions in MDI child forms causing the application to crash. I've found various articles describing a...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
3
by: NickP | last post by:
Hi there, Im experiencing an unhandled exception that seems to be impossible for me to catch. I am launching an assembly of mine from within another assembly using the Process object. Once the...
10
by: John Nagle | last post by:
Here are three network-related exceptions. These were caught by "except" with no exception type, because none of the more specific exceptions matched. This is what a traceback produced: 1....
2
by: bevis | last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you...
0
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post by:
Hi everybody, I'm working on my application for appr. 2 years and now suddenly I got an System.TypeInitializationException in one of my global modules. The error is thrown at the first call of a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.