473,403 Members | 2,270 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,403 software developers and data experts.

Crash without dump file

Hi,

I am running an application on 74 PC (1 instance on each PC).
This morning, 2 applications crashes.
There were neither popup windows signaling it nor dump file created.
I only find in the event log an entry signaling a dotnet 2.0 runtime
error :

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 1000
Date: 5/05/2006
Time: 7:40:20
User: N/A
Computer: IPD51140
Description:
Faulting application ipdrouting.exe, version 2.0.13.29189, stamp
445a19fb, faulting module unknown, version 0.0.0.0, stamp 00000000,
debug? 0, fault address 0x00902190.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 00 70 00 70 00 6c 00 A.p.p.l.
0008: 69 00 63 00 61 00 74 00 i.c.a.t.
0010: 69 00 6f 00 6e 00 20 00 i.o.n. .
0018: 46 00 61 00 69 00 6c 00 F.a.i.l.
0020: 75 00 72 00 65 00 20 00 u.r.e. .
0028: 20 00 69 00 70 00 64 00 .i.p.d.
0030: 72 00 6f 00 75 00 74 00 r.o.u.t.
0038: 69 00 6e 00 67 00 2e 00 i.n.g...
0040: 65 00 78 00 65 00 20 00 e.x.e. .
0048: 32 00 2e 00 30 00 2e 00 2...0...
0050: 31 00 33 00 2e 00 32 00 1.3...2.
0058: 39 00 31 00 38 00 39 00 9.1.8.9.
0060: 20 00 34 00 34 00 35 00 .4.4.5.
0068: 61 00 31 00 39 00 66 00 a.1.9.f.
0070: 62 00 20 00 69 00 6e 00 b. .i.n.
0078: 20 00 75 00 6e 00 6b 00 .u.n.k.
0080: 6e 00 6f 00 77 00 6e 00 n.o.w.n.
0088: 20 00 30 00 2e 00 30 00 .0...0.
0090: 2e 00 30 00 2e 00 30 00 ..0...0.
0098: 20 00 30 00 30 00 30 00 .0.0.0.
00a0: 30 00 30 00 30 00 30 00 0.0.0.0.
00a8: 30 00 20 00 66 00 44 00 0. .f.D.
00b0: 65 00 62 00 75 00 67 00 e.b.u.g.
00b8: 20 00 30 00 20 00 61 00 .0. .a.
00c0: 74 00 20 00 6f 00 66 00 t. .o.f.
00c8: 66 00 73 00 65 00 74 00 f.s.e.t.
00d0: 20 00 30 00 30 00 39 00 .0.0.9.
00d8: 30 00 32 00 31 00 39 00 0.2.1.9.
00e0: 30 00 0d 00 0a 00 0.....

It is exactly the same on both PC (same .
stamp, same fault address).
I have no idea how to analyse this message.
Besides, I have no clue where to search.
I added the following code in my Main function to try to get some
informations from the source of the problem :

Application.ThreadException +=
new System.Threading.ThreadExceptionEventHandler
(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler
(CurrentDomain_UnhandledException);

functions code:

private static void Application_ThreadException (object sender,
System.Threading.ThreadExceptionEventArgs e)
{
try
{
System.IO.StreamWriter sw = new System.IO.StreamWriter
("IpdRouting_DUMP.LOG", true);
sw.WriteLine(System.DateTime.Now.ToShortDateString () + " @ " +
System.DateTime.Now.ToLongTimeString() + ">\t" +
e.Exception.Source + " /// " + e.Exception.Message);
sw.Close();
}
catch
{
Application.Exit();
}
}

private static void CurrentDomain_UnhandledException (object sender,
UnhandledExceptionEventArgs e)
{
try
{
string message = e.ExceptionObject.ToString();
if(message.ToUpper().IndexOf("THREADABORTEXCEPTION ") == -1)
{
System.IO.StreamWriter sw = new System.IO.StreamWriter
("IpdRouting_Unhandled.LOG", true);
sw.WriteLine (System.DateTime.Now.ToShortDateString () + " @
" +
System.DateTime.Now.ToLongTimeString () + ">\t" +
message);
Exception ex = e.ExceptionObject as Exception;
if (ex != null)
{
sw.WriteLine (System.DateTime.Now.ToShortDateString () +
" @ " +
System.DateTime.Now.ToLongTimeString () + ">\t" +
ex.StackTrace);
if (ex.InnerException != null)
sw.WriteLine (ex.InnerException.ToString ());
}
sw.Flush ();
sw.Close ();
}
}
catch
{
//Application.Exit();
}
}

Application_ThreadException is not triggered.
CurrentDomain_UnhandledException is triggered for both PC, with the same
following lines in file 'IpdRouting_Unhandled.LOG' (only hour is
different) :

5/05/2006 @ 7:40:18> System.NullReferenceException: Object reference not
set to an instance of an object.
5/05/2006 @ 7:40:18>

To be complete, I had a System.AccessViolationException exception in
previous crash. I added the following line in my config file in <runtime>
Element :

<legacyNullReferenceExceptionPolicy enabled = "1">

9 PC use unmanaged code to handle serial COM ports and never crash !
The 65 other PC don't use unmanaged code and some crash !

Is it possible to get a stack trace when my application crash ?

Sorry for this long message.

Thanks in advance.

I
May 5 '06 #1
9 4975
Hi,

Compile it in debug mode and deploy the .pdb files .

Additionally you can not handle the event and the framework will dump the
stacktrace in the console
so an alternative method could be run the program from the prompt and see
the message you are getting.

As per your description it seems that you have some problem in your managed
code. you are accesing a member of an instance that is null
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
Hi,

I am running an application on 74 PC (1 instance on each PC).
This morning, 2 applications crashes.
There were neither popup windows signaling it nor dump file created.
I only find in the event log an entry signaling a dotnet 2.0 runtime
error :

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 1000
Date: 5/05/2006
Time: 7:40:20
User: N/A
Computer: IPD51140
Description:
Faulting application ipdrouting.exe, version 2.0.13.29189, stamp
445a19fb, faulting module unknown, version 0.0.0.0, stamp 00000000,
debug? 0, fault address 0x00902190.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 00 70 00 70 00 6c 00 A.p.p.l.
0008: 69 00 63 00 61 00 74 00 i.c.a.t.
0010: 69 00 6f 00 6e 00 20 00 i.o.n. .
0018: 46 00 61 00 69 00 6c 00 F.a.i.l.
0020: 75 00 72 00 65 00 20 00 u.r.e. .
0028: 20 00 69 00 70 00 64 00 .i.p.d.
0030: 72 00 6f 00 75 00 74 00 r.o.u.t.
0038: 69 00 6e 00 67 00 2e 00 i.n.g...
0040: 65 00 78 00 65 00 20 00 e.x.e. .
0048: 32 00 2e 00 30 00 2e 00 2...0...
0050: 31 00 33 00 2e 00 32 00 1.3...2.
0058: 39 00 31 00 38 00 39 00 9.1.8.9.
0060: 20 00 34 00 34 00 35 00 .4.4.5.
0068: 61 00 31 00 39 00 66 00 a.1.9.f.
0070: 62 00 20 00 69 00 6e 00 b. .i.n.
0078: 20 00 75 00 6e 00 6b 00 .u.n.k.
0080: 6e 00 6f 00 77 00 6e 00 n.o.w.n.
0088: 20 00 30 00 2e 00 30 00 .0...0.
0090: 2e 00 30 00 2e 00 30 00 ..0...0.
0098: 20 00 30 00 30 00 30 00 .0.0.0.
00a0: 30 00 30 00 30 00 30 00 0.0.0.0.
00a8: 30 00 20 00 66 00 44 00 0. .f.D.
00b0: 65 00 62 00 75 00 67 00 e.b.u.g.
00b8: 20 00 30 00 20 00 61 00 .0. .a.
00c0: 74 00 20 00 6f 00 66 00 t. .o.f.
00c8: 66 00 73 00 65 00 74 00 f.s.e.t.
00d0: 20 00 30 00 30 00 39 00 .0.0.9.
00d8: 30 00 32 00 31 00 39 00 0.2.1.9.
00e0: 30 00 0d 00 0a 00 0.....

It is exactly the same on both PC (same .
stamp, same fault address).
I have no idea how to analyse this message.
Besides, I have no clue where to search.
I added the following code in my Main function to try to get some
informations from the source of the problem :

Application.ThreadException +=
new System.Threading.ThreadExceptionEventHandler
(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException +=
new UnhandledExceptionEventHandler
(CurrentDomain_UnhandledException);

functions code:

private static void Application_ThreadException (object sender,
System.Threading.ThreadExceptionEventArgs e)
{
try
{
System.IO.StreamWriter sw = new System.IO.StreamWriter
("IpdRouting_DUMP.LOG", true);
sw.WriteLine(System.DateTime.Now.ToShortDateString () + " @ " +
System.DateTime.Now.ToLongTimeString() + ">\t" +
e.Exception.Source + " /// " + e.Exception.Message);
sw.Close();
}
catch
{
Application.Exit();
}
}

private static void CurrentDomain_UnhandledException (object sender,
UnhandledExceptionEventArgs e)
{
try
{
string message = e.ExceptionObject.ToString();
if(message.ToUpper().IndexOf("THREADABORTEXCEPTION ") == -1)
{
System.IO.StreamWriter sw = new System.IO.StreamWriter
("IpdRouting_Unhandled.LOG", true);
sw.WriteLine (System.DateTime.Now.ToShortDateString () + " @
" +
System.DateTime.Now.ToLongTimeString () + ">\t" +
message);
Exception ex = e.ExceptionObject as Exception;
if (ex != null)
{
sw.WriteLine (System.DateTime.Now.ToShortDateString () +
" @ " +
System.DateTime.Now.ToLongTimeString () + ">\t" +
ex.StackTrace);
if (ex.InnerException != null)
sw.WriteLine (ex.InnerException.ToString ());
}
sw.Flush ();
sw.Close ();
}
}
catch
{
//Application.Exit();
}
}

Application_ThreadException is not triggered.
CurrentDomain_UnhandledException is triggered for both PC, with the same
following lines in file 'IpdRouting_Unhandled.LOG' (only hour is
different) :

5/05/2006 @ 7:40:18> System.NullReferenceException: Object reference not
set to an instance of an object.
5/05/2006 @ 7:40:18>

To be complete, I had a System.AccessViolationException exception in
previous crash. I added the following line in my config file in <runtime>
Element :

<legacyNullReferenceExceptionPolicy enabled = "1">

9 PC use unmanaged code to handle serial COM ports and never crash !
The 65 other PC don't use unmanaged code and some crash !

Is it possible to get a stack trace when my application crash ?

Sorry for this long message.

Thanks in advance.

I

May 5 '06 #2
"Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin AT dot.state.fl.us>
wrote in news:uN**************@TK2MSFTNGP03.phx.gbl:
Hi,

Compile it in debug mode and deploy the .pdb files .

Additionally you can not handle the event and the framework will dump
the stacktrace in the console
so an alternative method could be run the program from the prompt and
see the message you are getting.

As per your description it seems that you have some problem in your
managed code. you are accesing a member of an instance that is null


OK thanks a lot for this very quick answer.
I will try and let you know the results.
May 5 '06 #3
Remove this from your config file:
<legacyNullReferenceExceptionPolicy enabled = "1">

Enumerate over the exception object in your UE handler get the exception
message and stacktrace and dump the contents to a log file or the eventlog.
...
StringBuilder sb = new StringBuilder(2048);
Exception currentExc = null;
for (currentExc = (Exception)e.ExceptionObject; currentExc != null;
currentExc = currentExc.InnerException) {
sb.AppendFormat("0}\r\n{1}\r\n{2}",
currentExc.GetType().FullName,
currentEx .Message,
currentExc.StackTrace);
}

Willy.

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
| Hi,
|
| I am running an application on 74 PC (1 instance on each PC).
| This morning, 2 applications crashes.
| There were neither popup windows signaling it nor dump file created.
| I only find in the event log an entry signaling a dotnet 2.0 runtime
| error :
|
| Event Type: Error
| Event Source: .NET Runtime 2.0 Error Reporting
| Event Category: None
| Event ID: 1000
| Date: 5/05/2006
| Time: 7:40:20
| User: N/A
| Computer: IPD51140
| Description:
| Faulting application ipdrouting.exe, version 2.0.13.29189, stamp
| 445a19fb, faulting module unknown, version 0.0.0.0, stamp 00000000,
| debug? 0, fault address 0x00902190.
|
| For more information, see Help and Support Center at
| http://go.microsoft.com/fwlink/events.asp.
| Data:
| 0000: 41 00 70 00 70 00 6c 00 A.p.p.l.
| 0008: 69 00 63 00 61 00 74 00 i.c.a.t.
| 0010: 69 00 6f 00 6e 00 20 00 i.o.n. .
| 0018: 46 00 61 00 69 00 6c 00 F.a.i.l.
| 0020: 75 00 72 00 65 00 20 00 u.r.e. .
| 0028: 20 00 69 00 70 00 64 00 .i.p.d.
| 0030: 72 00 6f 00 75 00 74 00 r.o.u.t.
| 0038: 69 00 6e 00 67 00 2e 00 i.n.g...
| 0040: 65 00 78 00 65 00 20 00 e.x.e. .
| 0048: 32 00 2e 00 30 00 2e 00 2...0...
| 0050: 31 00 33 00 2e 00 32 00 1.3...2.
| 0058: 39 00 31 00 38 00 39 00 9.1.8.9.
| 0060: 20 00 34 00 34 00 35 00 .4.4.5.
| 0068: 61 00 31 00 39 00 66 00 a.1.9.f.
| 0070: 62 00 20 00 69 00 6e 00 b. .i.n.
| 0078: 20 00 75 00 6e 00 6b 00 .u.n.k.
| 0080: 6e 00 6f 00 77 00 6e 00 n.o.w.n.
| 0088: 20 00 30 00 2e 00 30 00 .0...0.
| 0090: 2e 00 30 00 2e 00 30 00 ..0...0.
| 0098: 20 00 30 00 30 00 30 00 .0.0.0.
| 00a0: 30 00 30 00 30 00 30 00 0.0.0.0.
| 00a8: 30 00 20 00 66 00 44 00 0. .f.D.
| 00b0: 65 00 62 00 75 00 67 00 e.b.u.g.
| 00b8: 20 00 30 00 20 00 61 00 .0. .a.
| 00c0: 74 00 20 00 6f 00 66 00 t. .o.f.
| 00c8: 66 00 73 00 65 00 74 00 f.s.e.t.
| 00d0: 20 00 30 00 30 00 39 00 .0.0.9.
| 00d8: 30 00 32 00 31 00 39 00 0.2.1.9.
| 00e0: 30 00 0d 00 0a 00 0.....
|
| It is exactly the same on both PC (same .
| stamp, same fault address).
| I have no idea how to analyse this message.
| Besides, I have no clue where to search.
| I added the following code in my Main function to try to get some
| informations from the source of the problem :
|
| Application.ThreadException +=
| new System.Threading.ThreadExceptionEventHandler
| (Application_ThreadException);
| AppDomain.CurrentDomain.UnhandledException +=
| new UnhandledExceptionEventHandler
| (CurrentDomain_UnhandledException);
|
| functions code:
|
| private static void Application_ThreadException (object sender,
| System.Threading.ThreadExceptionEventArgs e)
| {
| try
| {
| System.IO.StreamWriter sw = new System.IO.StreamWriter
| ("IpdRouting_DUMP.LOG", true);
| sw.WriteLine(System.DateTime.Now.ToShortDateString () + " @ " +
| System.DateTime.Now.ToLongTimeString() + ">\t" +
| e.Exception.Source + " /// " + e.Exception.Message);
| sw.Close();
| }
| catch
| {
| Application.Exit();
| }
| }
|
| private static void CurrentDomain_UnhandledException (object sender,
| UnhandledExceptionEventArgs e)
| {
| try
| {
| string message = e.ExceptionObject.ToString();
| if(message.ToUpper().IndexOf("THREADABORTEXCEPTION ") == -1)
| {
| System.IO.StreamWriter sw = new System.IO.StreamWriter
| ("IpdRouting_Unhandled.LOG", true);
| sw.WriteLine (System.DateTime.Now.ToShortDateString () + " @
| " +
| System.DateTime.Now.ToLongTimeString () + ">\t" +
| message);
| Exception ex = e.ExceptionObject as Exception;
| if (ex != null)
| {
| sw.WriteLine (System.DateTime.Now.ToShortDateString () +
| " @ " +
| System.DateTime.Now.ToLongTimeString () + ">\t" +
| ex.StackTrace);
| if (ex.InnerException != null)
| sw.WriteLine (ex.InnerException.ToString ());
| }
| sw.Flush ();
| sw.Close ();
| }
| }
| catch
| {
| //Application.Exit();
| }
| }
|
| Application_ThreadException is not triggered.
| CurrentDomain_UnhandledException is triggered for both PC, with the same
| following lines in file 'IpdRouting_Unhandled.LOG' (only hour is
| different) :
|
| 5/05/2006 @ 7:40:18> System.NullReferenceException: Object reference not
| set to an instance of an object.
| 5/05/2006 @ 7:40:18>
|
| To be complete, I had a System.AccessViolationException exception in
| previous crash. I added the following line in my config file in <runtime>
| Element :
|
| <legacyNullReferenceExceptionPolicy enabled = "1">
|
| 9 PC use unmanaged code to handle serial COM ports and never crash !
| The 65 other PC don't use unmanaged code and some crash !
|
| Is it possible to get a stack trace when my application crash ?
|
| Sorry for this long message.
|
| Thanks in advance.
|
| I
May 6 '06 #4
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:us**************@TK2MSFTNGP02.phx.gbl:
Remove this from your config file:
<legacyNullReferenceExceptionPolicy enabled = "1">

Enumerate over the exception object in your UE handler get the
exception message and stacktrace and dump the contents to a log file
or the eventlog. ..
StringBuilder sb = new StringBuilder(2048);
Exception currentExc = null;
for (currentExc = (Exception)e.ExceptionObject; currentExc !=
null;
currentExc = currentExc.InnerException) {
sb.AppendFormat("0}\r\n{1}\r\n{2}",
currentExc.GetType().FullName,
currentEx .Message,
currentExc.StackTrace);
}

Willy.


OK I will try.
Thanks a lot.
May 8 '06 #5
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
"Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin AT dot.state.fl.us>
wrote in news:uN**************@TK2MSFTNGP03.phx.gbl:
Hi,

Compile it in debug mode and deploy the .pdb files .

Additionally you can not handle the event and the framework will dump
the stacktrace in the console
so an alternative method could be run the program from the prompt and
see the message you are getting.

As per your description it seems that you have some problem in your
managed code. you are accesing a member of an instance that is null


OK thanks a lot for this very quick answer.
I will try and let you know the results.


No more information with the debug version :-(
May 10 '06 #6
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.72:
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:us**************@TK2MSFTNGP02.phx.gbl:
Remove this from your config file:
<legacyNullReferenceExceptionPolicy enabled = "1">

Enumerate over the exception object in your UE handler get the
exception message and stacktrace and dump the contents to a log file
or the eventlog. ..
StringBuilder sb = new StringBuilder(2048);
Exception currentExc = null;
for (currentExc = (Exception)e.ExceptionObject; currentExc !=
null;
currentExc = currentExc.InnerException) {
sb.AppendFormat("0}\r\n{1}\r\n{2}",
currentExc.GetType().FullName,
currentEx .Message,
currentExc.StackTrace);
}

Willy.


OK I will try.
Thanks a lot.


It doesn't help, I got no stack trace and no inner exception :-(

May 10 '06 #7
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.72:
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:us**************@TK2MSFTNGP02.phx.gbl:
Remove this from your config file:
<legacyNullReferenceExceptionPolicy enabled = "1">

Enumerate over the exception object in your UE handler get the
exception message and stacktrace and dump the contents to a log file
or the eventlog. ..
StringBuilder sb = new StringBuilder(2048);
Exception currentExc = null;
for (currentExc = (Exception)e.ExceptionObject; currentExc !=
null;
currentExc = currentExc.InnerException) {
sb.AppendFormat("0}\r\n{1}\r\n{2}",
currentExc.GetType().FullName,
currentEx .Message,
currentExc.StackTrace);
}

Willy.


OK I will try.
Thanks a lot.


It doesn't help, I got no stack trace and no inner exception :-(


I am using 4 Hashtables internally (kind of business objects).
Each enumeration, Add or Remove is surrounded by a lock
(hashtable.SyncRoot).
To display these datas in GUI, each object has a static member that returns
the Hashtable using the Clone () method.
Then the GUI enumerate this cloned hashtable, without lock this time.
Is it the correct way of using and displaying Hashtables ?

Any help would be greatly appreciated.
Thanks in advance.

May 10 '06 #8
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.72:
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:us**************@TK2MSFTNGP02.phx.gbl:

Remove this from your config file:
<legacyNullReferenceExceptionPolicy enabled = "1">

Enumerate over the exception object in your UE handler get the
exception message and stacktrace and dump the contents to a log
file or the eventlog. ..
StringBuilder sb = new StringBuilder(2048);
Exception currentExc = null;
for (currentExc = (Exception)e.ExceptionObject; currentExc !=
null;
currentExc = currentExc.InnerException) {
sb.AppendFormat("0}\r\n{1}\r\n{2}",
currentExc.GetType().FullName,
currentEx .Message,
currentExc.StackTrace);
}

Willy.
OK I will try.
Thanks a lot.


It doesn't help, I got no stack trace and no inner exception :-(


I am using 4 Hashtables internally (kind of business objects).
Each enumeration, Add or Remove is surrounded by a lock
(hashtable.SyncRoot).
To display these datas in GUI, each object has a static member that
returns the Hashtable using the Clone () method.
Then the GUI enumerate this cloned hashtable, without lock this time.
Is it the correct way of using and displaying Hashtables ?

Any help would be greatly appreciated.
Thanks in advance.


I found an invalid casting.
I add many try/catch.
Now, it seems there is no more crash.
But still, every night, 1 or 2 PC displayed a popup window signaling that a
problem occured and that the application must be closed.
My application is still running but will be closed if the user click the OK
button.
Is it possible to prevent this window from displaying until I find the bug
?
Can I analyse the event log message reporting a dotnet runtime error ?

Thanks in advance.
May 10 '06 #9
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.72:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.72:

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:us**************@TK2MSFTNGP02.phx.gbl:

> Remove this from your config file:
> <legacyNullReferenceExceptionPolicy enabled = "1">
>
> Enumerate over the exception object in your UE handler get the
> exception message and stacktrace and dump the contents to a log
> file or the eventlog. ..
> StringBuilder sb = new StringBuilder(2048);
> Exception currentExc = null;
> for (currentExc = (Exception)e.ExceptionObject; currentExc !=
> null;
> currentExc = currentExc.InnerException) {
> sb.AppendFormat("0}\r\n{1}\r\n{2}",
>
> currentExc.GetType().FullName,
> currentEx .Message,
> currentExc.StackTrace);
> }
>
> Willy.
>

OK I will try.
Thanks a lot.

It doesn't help, I got no stack trace and no inner exception :-(


I am using 4 Hashtables internally (kind of business objects).
Each enumeration, Add or Remove is surrounded by a lock
(hashtable.SyncRoot).
To display these datas in GUI, each object has a static member that
returns the Hashtable using the Clone () method.
Then the GUI enumerate this cloned hashtable, without lock this time.
Is it the correct way of using and displaying Hashtables ?

Any help would be greatly appreciated.
Thanks in advance.


I found an invalid casting.
I add many try/catch.
Now, it seems there is no more crash.
But still, every night, 1 or 2 PC displayed a popup window signaling
that a problem occured and that the application must be closed.
My application is still running but will be closed if the user click
the OK button.
Is it possible to prevent this window from displaying until I find the
bug ?
Can I analyse the event log message reporting a dotnet runtime error ?

Thanks in advance.


Last precision, I found this Exception catched in my main form :

2006-05-10 06:54:26,076 [IpdRouting main ] ERROR IpdRouting -
DisplayRoutingTablePc: exception catched System.NullReferenceException:
Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.SendMessa ge(HandleRef
hWnd, Int32 Msg, IntPtr wParam, ListViewCompareCallback pfnCompare)
at System.Windows.Forms.ListView.Sort()
at System.Windows.Forms.ListView.InsertItems(Int32 displayIndex,
ListViewItem[] items, Boolean checkHosting)
at System.Windows.Forms.ListView.ListViewNativeItemCo llection.Add
(ListViewItem value)
at System.Windows.Forms.ListView.ListViewItemCollecti on.Add
(ListViewItem value)
at IpdRouting.FormMain.DisplayRoutingTablePc() in C:\Projects
\IpdRouting\IpdRouting\FormMain.cs:line 775
private void DisplayRoutingTablePc ()
{
try
{
int hostsUp = 0;
listViewPc.BeginUpdate ();
listViewPc.Items.Clear ();
foreach (DictionaryEntry de in
HostRouter.Current.PcHosts)
{
PcHost pc = (PcHost) de.Value;
ListViewItem lvi = new ListViewItem
(pc.HostId.ToString ());
lvi.SubItems.Add (pc.IpAddress.ToString ());
lvi.SubItems.Add (GetWatchDogAnswerText (pc));
ListViewItem.ListViewSubItem status;
if (pc.Message.Length <= 0)
status = lvi.SubItems.Add (pc.Status.ToString
());
else
status = lvi.SubItems.Add (string.Format ("{0} -
{1}",
pc.Status.ToString (), pc.Message));

if (pc.Status != HostStatus.Undefined)
lvi.UseItemStyleForSubItems = false;
switch (pc.Status)
{
case HostStatus.HostUp:
status.BackColor = Color.LightGreen;
hostsUp++;
break;

case HostStatus.HostDown:
case HostStatus.ConnectionFailed:
status.BackColor = Color.Red;
break;

case HostStatus.ConnectingStartUp:
case HostStatus.ConnectingRouting:
case HostStatus.ConnectingWatchDog:
status.BackColor = Color.Orange;
break;
}
listViewPc.Items.Add (lvi); // LINE 775
}

listViewPc.EndUpdate ();
labelPcCount.Text = "PC Count = " +
listViewPc.Items.Count.ToString ();
labelPcsUp.Text = "PC Up Count = " + hostsUp.ToString ();
labelPcsUpG.Text = labelPcsUp.Text;
}
catch (Exception ex)
{
if (_logger.IsErrorEnabled)
_logger.Error ("DisplayRoutingTablePc: exception
catched " +
ex);
}
}
May 10 '06 #10

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

Similar topics

0
by: roni | last post by:
hi. i have application written in vb.net + managed c++ dll that call also to unmanaged c++ function. the application crash. i open the dump file of the crash with WinDbg and that's is the...
0
by: richardshen | last post by:
My DB2 V8 SP5 WSE crash on Windows 2003 with the following msg in db2diag.log. Any idea? Looks like I need set stackreserver, what is the suggested value for that? 2004-03-05-12.20.46.299000 ...
6
by: Burkhard Schultheis | last post by:
As I wrote last week, we have a problem with a DB2 V8 on Linux. Here is what is in db2diag.log during online backup: Starting a full database backup. 2004-04-01-02.33.54.760164 ...
2
by: Mike | last post by:
Greetings, Having a major problem here. running version 8.2 on win2003 server. The problem I am having is backing up a database seems to get to the last part of the backup and then fails. This...
5
by: NG | last post by:
Hi, We are having DB2-V7.2 DB on AIX 5.2 machine. Recently we upgraded our system to fixpack 13 and activated activate AIX asynchronous IO function. Our DB is going to crash recovery with...
6
by: bjornms | last post by:
The application i build in C#.net is crashing once a month. I can't reproduce the crash. Is there a way to track down where the program crashes, without putting logging everywhere in the code?...
1
by: Alex | last post by:
Hello everybody, I've been working for days on a "twilight zone" bug and I can't make any sense of it. This is in an application that was developped on XP and that was modified to handle Vista....
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.