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

How do I find where my application is crashing

Sorry if this difficult to understand but I'm pulling my hair out and could
do with some good ideas please...

I've developed an application which in .NET as a Windows service which is
simply crashing but with no signs/details on where the crash is occuring.
Please not that the crash is happening on the server and only when the
server is running on a Win2K3 host. App is developed as an N-Tier app
(client-processing-processing-data) with (.NET Remoting & DCOM for
communications). VS.NET 2003 with .NET Framework V1.1 (will be testing under
V1.1 SP1 'soon').

It's a rather complicated application with a few layers so I'll try to
explain as best I can.... Here are all the bits:
A) .NET Service (C#)
B) Business Logic for application (C#)
C) .NET wrapper for 3rd party library (C#)
D) .NET to C++ Interface layer for 3rd party library (Managed C++)
E) 3rd party library - DLL (C++ API)
F) Interop to company's legacy component
G) Legacy components (ATL/C++ DCOM)
H) Data layer supporting 3rd party DLL to legacy component (Mostly unmanaged
C++ but a little bit of Managed C++ is present for event propogation)
I) New GUI (C#)

I initiates a connection to A via B (configured via Remoting Configuration
file)
I initiates an operation to process some data.
B allocates a thread from a ManagedThreadPool - class downloaded (from
GotDotNet, MS written)
In that thread B loads E via C and D (B has no direct access to D)
E dynamically loads H (GetProcAddress calls)
H calls G for data when needed.
H generates events which are received/processed by B which if needed are
evented back to I

The problem is pinpointed to when I run a Release copy of H, the server will
usually 'stop' without warning. A debug version never shows this problem.
However, the problem I have is that the process just *stops*. No error, log,
dialog, or popup is generated at all! I've attached a Remote Debugger to the
image (albeit Release mode) and there are *no* exceptions caught. It starts
work and then all threads just stop. I note that the exit codes of the
threads are 0x502.

I've got exception handling in all the layers that I have source code to
(i.e. except the 3rd party and a bit of the legacy component). I've even
added a C->C++ exception translator (which helped find some issues we were
having a while back), the .NET/C# assemblies all have full exception
handling using the MS Application Block. We continue receive and record all
other errors - it's just this one occasion where it looks like it was a
process exit rather than a failure but this isn't expected at all!

If anyone could point me in a direction I'd very much appreciate it! Sorry
for the information overload!
Jul 21 '05 #1
1 2170
Hi,

Typically problems like this are caused by corruption somewhere that becomes
obvious when compiled as a Release build because of optimizations and
whatnot. Try reducing the compiler and linker optimization settings 1 by 1
if possible to find out whether a particular setting's breaking anything.
Failing that, are you able to by a third party analysis tool or something?
Debugging things like this is soul destroying, especially with the system
you're looking at. Can you isolate the offending subsystem? You may be able
to build a testbed to give it a work out, but you'll probably find that it
runs fine unless it's inconvenient for it to crash.

If you can isolate it down a bit, someone'll be able to guess why a certain
setting etc could be causing a problem.

Steve

"Adam Hearn" <ah****@nospam.com> wrote in message
news:eU**************@TK2MSFTNGP14.phx.gbl...
Sorry if this difficult to understand but I'm pulling my hair out and could do with some good ideas please...

I've developed an application which in .NET as a Windows service which is
simply crashing but with no signs/details on where the crash is occuring.
Please not that the crash is happening on the server and only when the
server is running on a Win2K3 host. App is developed as an N-Tier app
(client-processing-processing-data) with (.NET Remoting & DCOM for
communications). VS.NET 2003 with .NET Framework V1.1 (will be testing under V1.1 SP1 'soon').

It's a rather complicated application with a few layers so I'll try to
explain as best I can.... Here are all the bits:
A) .NET Service (C#)
B) Business Logic for application (C#)
C) .NET wrapper for 3rd party library (C#)
D) .NET to C++ Interface layer for 3rd party library (Managed C++)
E) 3rd party library - DLL (C++ API)
F) Interop to company's legacy component
G) Legacy components (ATL/C++ DCOM)
H) Data layer supporting 3rd party DLL to legacy component (Mostly unmanaged C++ but a little bit of Managed C++ is present for event propogation)
I) New GUI (C#)

I initiates a connection to A via B (configured via Remoting Configuration
file)
I initiates an operation to process some data.
B allocates a thread from a ManagedThreadPool - class downloaded (from
GotDotNet, MS written)
In that thread B loads E via C and D (B has no direct access to D)
E dynamically loads H (GetProcAddress calls)
H calls G for data when needed.
H generates events which are received/processed by B which if needed are
evented back to I

The problem is pinpointed to when I run a Release copy of H, the server will usually 'stop' without warning. A debug version never shows this problem.
However, the problem I have is that the process just *stops*. No error, log, dialog, or popup is generated at all! I've attached a Remote Debugger to the image (albeit Release mode) and there are *no* exceptions caught. It starts work and then all threads just stop. I note that the exit codes of the
threads are 0x502.

I've got exception handling in all the layers that I have source code to
(i.e. except the 3rd party and a bit of the legacy component). I've even
added a C->C++ exception translator (which helped find some issues we were
having a while back), the .NET/C# assemblies all have full exception
handling using the MS Application Block. We continue receive and record all other errors - it's just this one occasion where it looks like it was a
process exit rather than a failure but this isn't expected at all!

If anyone could point me in a direction I'd very much appreciate it! Sorry
for the information overload!

Jul 21 '05 #2

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

Similar topics

1
by: Tosch | last post by:
I have an application that uses to COM objects and does a complex file conversion between two different systems. When converting a large amout of files I'm experiencing a memory leak resulting in...
1
by: Adam Hearn | last post by:
Sorry if this difficult to understand but I'm pulling my hair out and could do with some good ideas please... I've developed an application which in .NET as a Windows service which is simply...
1
by: ankit | last post by:
I made a Cpp application wihich links with shared objects. But when I runs the application, it crashes surprisingly before entering into the main() control block. After trying with gdb I came to...
5
by: xoinki | last post by:
hi all, I have a very general question.. My program is crashing in a window procedure... the sample code is as follows.. return CallWindowProc(pccustgrid->m_wporiglistwndproc, hwnd,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.