11-24-2010 01:31 PM
I cannot figure out why I am getting the error in the output window when my LabWindows UI ends:
WARNING!!! 'should not have an exception in CleanupForReuse' Line 389 in function in file .\teengine\sqcontxt.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:07
*********************************************************
All references to PropertyObjects were released properly.
*********************************************************
This happens if I do a TSUIConst_CommandKind_BreakAll at some point:
TSUI_ApplicationMgrGetCommand(gMainWindow.applicationMgr, &errorInfo,TSUIConst_CommandKind_BreakAll,0,&cmd);
TSUI_CommandExecute(cmd,&errorInfo,VFALSE);
if (cmd)
CA_DiscardObjHandle(cmd);
If I don't do the TSUIConst_CommandKind_BreakAll and just TSUIConst_CommandKind_TerminateAll (using the same procedure as above) there is no error message.
Any ideas?
Thanks,
Ronnie
11-29-2010 03:52 PM
Hi Ronnie,
This is not a common warning to run into. What context are you using these functions in? Is there anything particular about your application that might be important to diagnose this? These functions are typically used for debugging puposes, is that what you are doing?
Also, this is just a warning, is it causing your application to behave unexpectedly, or are you able to ignore the warning?
11-29-2010 04:06 PM - edited 11-29-2010 04:10 PM
Hi D Biel,
I am running a sequence using the Batch process model with several sockets. When I have more than one socket it responds in the way described above if I terminate the process using:
TS_EngineTerminateAll
However the problem seems to go away if I use instead:
TSUI_ApplicationMgrGetCommand(gMainWindow.applicationMgr,&errorInfo,TSUIConst_CommandKind_TerminateAll,0,&cmd);
TSUI_CommandExecute(cmd,&errorInfo,VFALSE);
Unfortunately, if I do a BreakAll followed by a resume, I get the following WARNING!! messages (I think one for each execution) when I eventually stop:
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
WARNING!!! 'Unexpected exception occurred in destructor.' Line 249 in function Execution::Dispose in file .\teengine\exec.cpp
Compilation Date: Nov 3 2009 Compilation Time: 06:11:36
*********************************************************
All references to PropertyObjects were released properly.
*********************************************************
(Edit - Smileys in the posting above are not from me and are added after posting)
11-30-2010 05:45 PM
I'm a bit confused. Your first post said you get the 'should not have an exception in CleanupForReuse' warning, while your second post says you get the 'Unexpected exception occurred in destructor.' warning. Is this a different situation now?
Does the function behave normally despite this warning?
11-30-2010 06:05 PM - edited 11-30-2010 06:07 PM
I mentioned in the post that I was able to get the warning message to go away if I used a different way of sending the TerminateAll command:
TSUI_CommandExecute instead of TS_EngineTerminateAll
However I had since discovered that I get exceptions being thrown as a result of doing a Halt and Resume - and I cannot get rid of these by following the same procedure (using TSUI_CommandExecute). Note the exceptions are thrown when TestStand exits - not at the moment I do the Halt and Resume. But they are the reason for these exceptions since they do not occur on Exit if I do not do them.
"Does the function behave normally despite this warning?". These are exceptions. Yes - but it's when I Exit the Operator Interface that LabWindows gives me the bottom line of how TestStand cleaned up. Clearly in this case something is not quite right in the TestStand code, since the exceptions are thrown (despite the fact that "All references to PropertyObjects were released properly").
12-01-2010 05:56 PM
Hey Ronnie,
I would like to investigate this error in detail. Could you post either your code, or a portion of your code that demonstrates this error.
12-17-2010 02:19 PM
Ronnie -
Would it be possible for you to provide an example UI that demonstrates the warnings/errors you mentioned above? I would like to determine if this is a bug so that we can fix it in a future version of TestStand. Please let me know.
12-20-2010 03:52 PM
Believer,
I tried to reproduce this, but never received the warnings you did. I tried running breakall, resumeall, and terminateall in every configuration I could come up with, but never received any warnings. Could you be a little more specific in describing how you are using these functions? Your code, or some sample code that demonstrates this would be very helpful.
12-22-2010 07:41 AM