LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Application hangs on 2nd run

I have a workspace with two projects in it. One is a DLL I am writing, the other is a EXE for testing the DLL. On the first run in debug mode, everthing works fine. But on the second run, the application hang after calling RunUserInterface. The GUI for the EXE appears, but the DLL is supposed to show a debug_panel and this never happens. I'm not sure what kind of problem I am debugging here.

Jon
0 Kudos
Message 1 of 3
(2,978 Views)
Hey Jon,
 
Most likely the issue has to do with some reference or object that is being opened on the first run without being closed.  First, look through your code for any references that are not being closed appropriately.  Then what I would recommend is to try a sort of binary search debugging procedure.  That is, start by commenting your code to reach a very small, simple program that pretty much does very basic functionality (open panel, discard panel, etc).  If this works, slowly uncomment code until you reach that point where you realize what reference is not being closed. 
 
Hope this advice helps!
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 2 of 3
(2,953 Views)
In fact you're right... When the DLL shuts down, (DLL_PROCESS_DETACH), I use the opportunity to dereference all the memory structure I had created, but I forgot to call DiscardPanel on the debug panel I had created in Memory.... an easy fix

Thanx for pointing me in the right direction
Cheers!
0 Kudos
Message 3 of 3
(2,937 Views)