473,396 Members | 1,707 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,396 software developers and data experts.

Unhandled Exception Handler

We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:

EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.

This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?

The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.

So, do I need to add the handler to the Sub Main or in the class
library?

Sep 14 '07 #1
5 1689
If things run okay manually, then to me it points to something in how the
scheduler is handling things. What are you using for a scheduler?
<za***@construction-imaging.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:

EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.

This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?

The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.

So, do I need to add the handler to the Sub Main or in the class
library?

Sep 14 '07 #2
On Sep 14, 12:08 pm, "Nobody" <trin...@nobody.comwrote:
If things run okay manually, then to me it points to something in how the
scheduler is handling things. What are you using for a scheduler?
The builtin Windows Scheduler in the Control Panel.
>
<za...@construction-imaging.comwrote in message

news:11**********************@57g2000hsv.googlegro ups.com...
We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:
EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.
This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?
The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.
So, do I need to add the handler to the Sub Main or in the class
library?
Sep 14 '07 #3
Carefull ithe win scheduler will kill apps if they run longer than X time by
default...
Check the settings tab.

Schneider

<za***@construction-imaging.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
On Sep 14, 12:08 pm, "Nobody" <trin...@nobody.comwrote:
>If things run okay manually, then to me it points to something in how the
scheduler is handling things. What are you using for a scheduler?

The builtin Windows Scheduler in the Control Panel.
>>
<za...@construction-imaging.comwrote in message

news:11**********************@57g2000hsv.googlegr oups.com...
We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:
EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.
This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?
The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.
So, do I need to add the handler to the Sub Main or in the class
library?

Sep 14 '07 #4
Just a guess--I would investigate user permissions or script disabling
on the problem computer.

Mark Lincoln

On Sep 14, 11:08 am, za...@construction-imaging.com wrote:
We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:

EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.

This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?

The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.

So, do I need to add the handler to the Sub Main or in the class
library?

Sep 15 '07 #5
Since nobody seems to have actually answered your question...
Double click "My Project" and on the 'Application Tab' click the 'View
Application Events' button. On the dropdown list under the tab, select
'MyApplication Events' and on the dropdown list to the right, select
'UnhandledException' event. Add your code to the sub it generates.

--
Terry
"za***@construction-imaging.com" wrote:
We have an application in use at several dozen of our customers. At
one customer site, it behaves strangely. The same application runs
three times with three different config files passed to it on the
command line. I have a BAT file that runs the application thussly. I
then have the BAT file scheduled to run as a scheduled task. The task
runs fine manually, but when it runs on the schedule, each invocation
of the application in the BAT file dies with an exception that is
getting logged in the Application EventLog. It is a very cryptic
message:

EventType clr20r3, P1 udm.exe, P2 1.0.71.0, P3 46d48a47, P4
system.windows.forms, P5 2.0.0.0, P6 4333aefa, P7 47f1, P8 96, P9
system.invalidoperationexception, P10 NIL.

This means nothing to me. I did some research with Google and didn't
turn up much that was particularly useful to me. One suggestion I
think may help is to add an Unhandled Exception handler to the app so
that I might be able to get a better message in the event log, but I
am wondering just where in the code should I put it?

The application is a Windows Application that has a Sub Main as the
startup object. If there are command line switches, the main form is
not even shown. Whether the main form is shown or not, the actual work
the application does is done by a class library.

So, do I need to add the handler to the Sub Main or in the class
library?

Sep 15 '07 #6

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

Similar topics

4
by: Frank | last post by:
Hi, I made a handler for unhandled errors. But before that is executed, VB.NET gives me the standard error window. In VB6 there was a setting (errortrapping) about handling errors in the design...
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: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can...
1
by: Chris Dunaway | last post by:
I have a Windows forms app which is started from a sub Main. In Sub main I have this line: AddHandler System.AppDomain.CurrentDomain.UnhandledException, AddressOf...
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: Mike Binks | last post by:
I wish to make sure all unhandled exceptions (UE) are handled by a central handler. For primary thread UEs, this may be done by string exceptionText; ...
1
by: Bob | last post by:
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple app and found that it was easier to implement unhandled exception management tah it was in Vs2003 (vb.net) You can, if you...
15
by: Mark Lewis | last post by:
I have a weird error trapping problem. When running the IDE everything works fine but not when running in an EXE I get the Unhandled Exception Error message box intead of the one in my Try....Catch...
4
by: bg_ie | last post by:
Hi, I have the following Program.cs - namespace TestFrameworkApplication { static class Program { /// <summary> /// The main entry point for the application.
10
by: Penelope Dramas | last post by:
Hello, I am using following code to handle unhandled exceptions in Windows Forms. Shared Sub Main() Dim GlobalExceptionHandler As New GlobalExceptionHandler AddHandler...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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
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,...

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.