10-26-2006 12:05 PM
10-27-2006 02:42 PM
10-30-2006 09:12 AM
10-30-2006 11:13 AM
Jonothan -
I've written a command line utility in C using CVI 8.0.1 and we call it from a script that uses a C++ try /except block to catch any exceptions coming up off the CVI utility.
The utility is parsing a bunch of Word docs and soem binary file sets, was quickly put together, and occasionally tries to dereference an null pointer apparently when it encounters a malformed file set. Since it's nearly impossible to code to anticipate all of the goofy ways the file sets might be malformed, we just let it fault and try to catch the exception from the calling code.
BUT, when the exception occurs, we get a modal popup that has a CVI "RT" logo in the upper right hand corner, apparently the exception is being caught by the CVI RT? The popup hangs up the script, which is running unattended - there's no one there to click the close button on the modal popup. I don't think the CVI RT did this before - exceptions would get propogated back to the Windows environment and Windows would do the popup.
I would not expect this to happen. If the exception were allowed to propogate through the RT to the outer environment we would be able to catch it and handle it.
The best we can do now is set the Windows errormode to "2" in the registry to try and prevent any modal error popups from Windows or from an application. This seems to work on Win2K and WinXP SP1 but not WinXP SP2 for some reason.
Thanks,
Menchar
10-30-2006 01:52 PM
10-31-2006 03:01 PM
Jonathan -
Turns out this was a .NET thing - fellow worker had the .net development environment installed, and the development environmetn was what was catching the exception and doing the popup, not the CVI RT. What fooled us was the presence of the CVI rt icon, but then this is probably embedded in a dll and the exception handler was able to find and display it in the modal popup.
So we turned off the exception catching in the .net development environment and now the exceptions propogate up the call stack as we wanted, with no modal popups since we have the windows error mode set to "2".
Thanks for the support Jonothan.
Menchar