473,769 Members | 3,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ManagedThreadPo ol - 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 2210
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******** ******@TK2MSFTN GP14.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 ManagedThreadPo ol - 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
1572
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 my application eating hundreds of MBs of memory and not releasing it. This again results in a system being very unstable and my application finally crashing. What is the best way to figure out which component is eating up the memory? I have...
1
288
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 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...
1
2089
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 know it is crashing while reading symbols from a library. GDB says something like Reading symbols from /utran/hmsDO/lib/linux/debug/libNcdd.so...Segmentation fault and it core dumps. This binary is not part o my project, given by someone else....
5
1963
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, message, wparam, lparam); this is a window procedure for a listbox.. sometimes it is crashing while editing the listbox.. actually this listbox is a part of customized grid.. if a user presses tab then he can navigate thru the grid.. and edit.
0
9586
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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
10043
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
9990
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
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5298
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
3956
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
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.