473,796 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Thr eadException +=
new System.Threadin g.ThreadExcepti onEventHandler
(Application_Th readException);
AppDomain.Curre ntDomain.Unhand ledException +=
new UnhandledExcept ionEventHandler
(CurrentDomain_ UnhandledExcept ion);

functions code:

private static void Application_Thr eadException (object sender,
System.Threadin g.ThreadExcepti onEventArgs e)
{
try
{
System.IO.Strea mWriter sw = new System.IO.Strea mWriter
("IpdRouting_DU MP.LOG", true);
sw.WriteLine(Sy stem.DateTime.N ow.ToShortDateS tring() + " @ " +
System.DateTime .Now.ToLongTime String() + ">\t" +
e.Exception.Sou rce + " /// " + e.Exception.Mes sage);
sw.Close();
}
catch
{
Application.Exi t();
}
}

private static void CurrentDomain_U nhandledExcepti on (object sender,
UnhandledExcept ionEventArgs e)
{
try
{
string message = e.ExceptionObje ct.ToString();
if(message.ToUp per().IndexOf(" THREADABORTEXCE PTION") == -1)
{
System.IO.Strea mWriter sw = new System.IO.Strea mWriter
("IpdRouting_Un handled.LOG", true);
sw.WriteLine (System.DateTim e.Now.ToShortDa teString () + " @
" +
System.DateTime .Now.ToLongTime String () + ">\t" +
message);
Exception ex = e.ExceptionObje ct as Exception;
if (ex != null)
{
sw.WriteLine (System.DateTim e.Now.ToShortDa teString () +
" @ " +
System.DateTime .Now.ToLongTime String () + ">\t" +
ex.StackTrace);
if (ex.InnerExcept ion != null)
sw.WriteLine (ex.InnerExcept ion.ToString ());
}
sw.Flush ();
sw.Close ();
}
}
catch
{
//Application.Exi t();
}
}

Application_Thr eadException is not triggered.
CurrentDomain_U nhandledExcepti on is triggered for both PC, with the same
following lines in file 'IpdRouting_Unh andled.LOG' (only hour is
different) :

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

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

<legacyNullRefe renceExceptionP olicy 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 4993
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.Thr eadException +=
new System.Threadin g.ThreadExcepti onEventHandler
(Application_Th readException);
AppDomain.Curre ntDomain.Unhand ledException +=
new UnhandledExcept ionEventHandler
(CurrentDomain_ UnhandledExcept ion);

functions code:

private static void Application_Thr eadException (object sender,
System.Threadin g.ThreadExcepti onEventArgs e)
{
try
{
System.IO.Strea mWriter sw = new System.IO.Strea mWriter
("IpdRouting_DU MP.LOG", true);
sw.WriteLine(Sy stem.DateTime.N ow.ToShortDateS tring() + " @ " +
System.DateTime .Now.ToLongTime String() + ">\t" +
e.Exception.Sou rce + " /// " + e.Exception.Mes sage);
sw.Close();
}
catch
{
Application.Exi t();
}
}

private static void CurrentDomain_U nhandledExcepti on (object sender,
UnhandledExcept ionEventArgs e)
{
try
{
string message = e.ExceptionObje ct.ToString();
if(message.ToUp per().IndexOf(" THREADABORTEXCE PTION") == -1)
{
System.IO.Strea mWriter sw = new System.IO.Strea mWriter
("IpdRouting_Un handled.LOG", true);
sw.WriteLine (System.DateTim e.Now.ToShortDa teString () + " @
" +
System.DateTime .Now.ToLongTime String () + ">\t" +
message);
Exception ex = e.ExceptionObje ct as Exception;
if (ex != null)
{
sw.WriteLine (System.DateTim e.Now.ToShortDa teString () +
" @ " +
System.DateTime .Now.ToLongTime String () + ">\t" +
ex.StackTrace);
if (ex.InnerExcept ion != null)
sw.WriteLine (ex.InnerExcept ion.ToString ());
}
sw.Flush ();
sw.Close ();
}
}
catch
{
//Application.Exi t();
}
}

Application_Thr eadException is not triggered.
CurrentDomain_U nhandledExcepti on is triggered for both PC, with the same
following lines in file 'IpdRouting_Unh andled.LOG' (only hour is
different) :

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

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

<legacyNullRefe renceExceptionP olicy 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.mach in AT dot.state.fl.us >
wrote in news:uN******** ******@TK2MSFTN GP03.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:
<legacyNullRefe renceExceptionP olicy 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(2 048);
Exception currentExc = null;
for (currentExc = (Exception)e.Ex ceptionObject; currentExc != null;
currentExc = currentExc.Inne rException) {
sb.AppendFormat ("0}\r\n{1}\r\n {2}",
currentExc.GetT ype().FullName,
currentEx .Message,
currentExc.Stac kTrace);
}

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.Thr eadException +=
| new System.Threadin g.ThreadExcepti onEventHandler
| (Application_Th readException);
| AppDomain.Curre ntDomain.Unhand ledException +=
| new UnhandledExcept ionEventHandler
| (CurrentDomain_ UnhandledExcept ion);
|
| functions code:
|
| private static void Application_Thr eadException (object sender,
| System.Threadin g.ThreadExcepti onEventArgs e)
| {
| try
| {
| System.IO.Strea mWriter sw = new System.IO.Strea mWriter
| ("IpdRouting_DU MP.LOG", true);
| sw.WriteLine(Sy stem.DateTime.N ow.ToShortDateS tring() + " @ " +
| System.DateTime .Now.ToLongTime String() + ">\t" +
| e.Exception.Sou rce + " /// " + e.Exception.Mes sage);
| sw.Close();
| }
| catch
| {
| Application.Exi t();
| }
| }
|
| private static void CurrentDomain_U nhandledExcepti on (object sender,
| UnhandledExcept ionEventArgs e)
| {
| try
| {
| string message = e.ExceptionObje ct.ToString();
| if(message.ToUp per().IndexOf(" THREADABORTEXCE PTION") == -1)
| {
| System.IO.Strea mWriter sw = new System.IO.Strea mWriter
| ("IpdRouting_Un handled.LOG", true);
| sw.WriteLine (System.DateTim e.Now.ToShortDa teString () + " @
| " +
| System.DateTime .Now.ToLongTime String () + ">\t" +
| message);
| Exception ex = e.ExceptionObje ct as Exception;
| if (ex != null)
| {
| sw.WriteLine (System.DateTim e.Now.ToShortDa teString () +
| " @ " +
| System.DateTime .Now.ToLongTime String () + ">\t" +
| ex.StackTrace);
| if (ex.InnerExcept ion != null)
| sw.WriteLine (ex.InnerExcept ion.ToString ());
| }
| sw.Flush ();
| sw.Close ();
| }
| }
| catch
| {
| //Application.Exi t();
| }
| }
|
| Application_Thr eadException is not triggered.
| CurrentDomain_U nhandledExcepti on is triggered for both PC, with the same
| following lines in file 'IpdRouting_Unh andled.LOG' (only hour is
| different) :
|
| 5/05/2006 @ 7:40:18> System.NullRefe renceException: Object reference not
| set to an instance of an object.
| 5/05/2006 @ 7:40:18>
|
| To be complete, I had a System.AccessVi olationExceptio n exception in
| previous crash. I added the following line in my config file in <runtime>
| Element :
|
| <legacyNullRefe renceExceptionP olicy 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******** ******@TK2MSFTN GP02.phx.gbl:
Remove this from your config file:
<legacyNullRefe renceExceptionP olicy 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(2 048);
Exception currentExc = null;
for (currentExc = (Exception)e.Ex ceptionObject; currentExc !=
null;
currentExc = currentExc.Inne rException) {
sb.AppendFormat ("0}\r\n{1}\r\n {2}",
currentExc.GetT ype().FullName,
currentEx .Message,
currentExc.Stac kTrace);
}

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.mach in AT dot.state.fl.us >
wrote in news:uN******** ******@TK2MSFTN GP03.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******** ******@TK2MSFTN GP02.phx.gbl:
Remove this from your config file:
<legacyNullRefe renceExceptionP olicy 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(2 048);
Exception currentExc = null;
for (currentExc = (Exception)e.Ex ceptionObject; currentExc !=
null;
currentExc = currentExc.Inne rException) {
sb.AppendFormat ("0}\r\n{1}\r\n {2}",
currentExc.GetT ype().FullName,
currentEx .Message,
currentExc.Stac kTrace);
}

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******** ******@TK2MSFTN GP02.phx.gbl:
Remove this from your config file:
<legacyNullRefe renceExceptionP olicy 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(2 048);
Exception currentExc = null;
for (currentExc = (Exception)e.Ex ceptionObject; currentExc !=
null;
currentExc = currentExc.Inne rException) {
sb.AppendFormat ("0}\r\n{1}\r\n {2}",
currentExc.GetT ype().FullName,
currentEx .Message,
currentExc.Stac kTrace);
}

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.Sync Root).
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******** ******@TK2MSFTN GP02.phx.gbl:

Remove this from your config file:
<legacyNullRefe renceExceptionP olicy 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(2 048);
Exception currentExc = null;
for (currentExc = (Exception)e.Ex ceptionObject; currentExc !=
null;
currentExc = currentExc.Inne rException) {
sb.AppendFormat ("0}\r\n{1}\r\n {2}",
currentExc.GetT ype().FullName,
currentEx .Message,
currentExc.Stac kTrace);
}

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.Sync Root).
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******** ******@TK2MSFTN GP02.phx.gbl:

> Remove this from your config file:
> <legacyNullRefe renceExceptionP olicy 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(2 048);
> Exception currentExc = null;
> for (currentExc = (Exception)e.Ex ceptionObject; currentExc !=
> null;
> currentExc = currentExc.Inne rException) {
> sb.AppendFormat ("0}\r\n{1}\r\n {2}",
>
> currentExc.GetT ype().FullName,
> currentEx .Message,
> currentExc.Stac kTrace);
> }
>
> 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.Sync Root).
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 -
DisplayRoutingT ablePc: exception catched System.NullRefe renceException:
Object reference not set to an instance of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef
hWnd, Int32 Msg, IntPtr wParam, ListViewCompare Callback pfnCompare)
at System.Windows. Forms.ListView. Sort()
at System.Windows. Forms.ListView. InsertItems(Int 32 displayIndex,
ListViewItem[] items, Boolean checkHosting)
at System.Windows. Forms.ListView. ListViewNativeI temCollection.A dd
(ListViewItem value)
at System.Windows. Forms.ListView. ListViewItemCol lection.Add
(ListViewItem value)
at IpdRouting.Form Main.DisplayRou tingTablePc() in C:\Projects
\IpdRouting\Ipd Routing\FormMai n.cs:line 775
private void DisplayRoutingT ablePc ()
{
try
{
int hostsUp = 0;
listViewPc.Begi nUpdate ();
listViewPc.Item s.Clear ();
foreach (DictionaryEntr y de in
HostRouter.Curr ent.PcHosts)
{
PcHost pc = (PcHost) de.Value;
ListViewItem lvi = new ListViewItem
(pc.HostId.ToSt ring ());
lvi.SubItems.Ad d (pc.IpAddress.T oString ());
lvi.SubItems.Ad d (GetWatchDogAns werText (pc));
ListViewItem.Li stViewSubItem status;
if (pc.Message.Len gth <= 0)
status = lvi.SubItems.Ad d (pc.Status.ToSt ring
());
else
status = lvi.SubItems.Ad d (string.Format ("{0} -
{1}",
pc.Status.ToStr ing (), pc.Message));

if (pc.Status != HostStatus.Unde fined)
lvi.UseItemStyl eForSubItems = false;
switch (pc.Status)
{
case HostStatus.Host Up:
status.BackColo r = Color.LightGree n;
hostsUp++;
break;

case HostStatus.Host Down:
case HostStatus.Conn ectionFailed:
status.BackColo r = Color.Red;
break;

case HostStatus.Conn ectingStartUp:
case HostStatus.Conn ectingRouting:
case HostStatus.Conn ectingWatchDog:
status.BackColo r = Color.Orange;
break;
}
listViewPc.Item s.Add (lvi); // LINE 775
}

listViewPc.EndU pdate ();
labelPcCount.Te xt = "PC Count = " +
listViewPc.Item s.Count.ToStrin g ();
labelPcsUp.Text = "PC Up Count = " + hostsUp.ToStrin g ();
labelPcsUpG.Tex t = labelPcsUp.Text ;
}
catch (Exception ex)
{
if (_logger.IsErro rEnabled)
_logger.Error ("DisplayRoutin gTablePc: 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
2274
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 call stack (using the sos.dll) : =====================================
0
2421
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 Instance:DB2 Node:000 PID:3800(db2syscs.exe) TID:3864 Appid:*LOCAL.DB2.01F2C5171908 oper system services sqloEDUExceptionFilter Probe:55 Database:TDV8 ADM0501C A stack overflow exception has occurred. The DB2 instance has
6
10324
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 Instance:lzgneu Node:000 PID:1293(db2loggw (TELEMATX)) TID:1024 Appid:none data protection sqlpgwlp Probe:909 TailPage 0 does not match pagelsn 0023CEBF0FFB and firstlsn 0023CEBF8000
2
5567
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 brings the whole instance down and it has to be restarted. In addition the job seems to be stuck in the TOOLSDB as if I try to delete the backup job I get "The task is currently running". So I went to the command line and tried "db2 backup database...
5
3886
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 this error 0xFFFFF707. I have attached the related details. Any suggestions is much appreciated.
6
4805
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? Is there a way to get a stack trace of the crashing program (by the way, i'm new to C#.net, i have experience in (unmanaged) C++). Thanks in advance.
1
1568
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. Other than using the virtual store for some config information, it doesn't do anything fancy. The strange thing is that when the application is executed without an active internet connection, there is a crash in the application for some of our...
39
5873
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 ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
11
3053
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 and IE8. There is no issue when the controls are allowed to complete loading. Can you please tell me the best practice that handles this? Thanks.
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10242
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9061
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6800
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.