Solved

Stopping application exception popup windows

Posted on 2007-11-16
5
591 Views
Last Modified: 2013-12-14
Hi all,

I have an annoying issue which I am trying to resolve.
I am part of development team who have developed a framework for our developers to use which allows easy access to a grid computing platform.

The issue is as part of the framework it calls out to a development team supplied DLL, which sometimes issues an unhandeled exception generating a popup windows application error message box

"The instructions at xxx referenced memory at yyy. The memory can not be read, click ok to terminate the program"

This in itself is not the problem I have the development team identifying where the issue is and are fixing it. The problem I have is that when this type of issue occurs there is an impact o the framework.

Here are the details of what the framework does.

It is all written in C++ using visual studio 8 and using BOOST for the socket and thread handling, running on "lights out" MS Server 2003 boxes.

The main daemon listens on a TCP port for an incoming request
When a conversation starts the Main daemon starts a thread and passes the conversation to it, and goes back to listening
The child thread receives the request, and based on data within the request loads a DLL which contains the functionality needed for the request type
Once the DLL is loaded the child thread calls a given function inside the DLL
If the called DLL fails with an application error generating a popup the thread never ends until the message box is closed, and given the "lights out" nature of the server is anoying to say the least.

Because of the design this does not cause an issue to the main service which will spawn other threads but of course I have the issue of having the failed threads staying resident and the client not getting a response until the popup is closed

Simple question is….

How can I stop the popups?
With the exception of the obvious of not having any errors in the called DLL (For which I don’t have control).
I can offer guidelines to the developers on how their projects should be compiled, I have control of the server and can also go some way in dictating development standards so any options around compile flags or registry settings are options which could be in scope.
0
Comment
Question by:OnyxBlackstone
  • 2
5 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 20310172
I have to be the first to point out the obvious...

I had a similar situation with a U/I-less app.  All I did was wrap a
    try/catch(...)
exception handler around everything the DLL does.   It will only be called in the situations where the error is otherwise "unhandled" so it can take action appropriate for this unexpected situation (in my case, I performed a full "internal" shutdown and restart).  It should log the problem, of course -- providing as much info as possible for a post-mortem analysis.
0
 

Accepted Solution

by:
OnyxBlackstone earned 0 total points
ID: 20311201
Hi Dan,

The try/catch was there and trapped correctly once the popup was answered.

We have now found the solutions and its and easy one.

We needed to re-compile with the following flag

               /EHa
 
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 20311594
That relates to the compiler using the now-default synchronous exception-handling model for the compiled output code.

   /EH (Exception Handling Model)
   http://msdn2.microsoft.com/en-us/library/1deeycx5(VS.80).aspx
and
   Exception Handling: Default Synchronous Exception Model
   http://msdn2.microsoft.com/en-us/library/7f10tsf4(VS.80).aspx

That is useful information to have in the EE database.  I suggest that you post to Community Support that you have answered this yourself.  That will keep this thread in the database.   See: http://www.experts-exchange.com/help.jsp#hi70

0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20339045
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now