ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
02-11-2011 02:01 AM
Norbert B a écrit :
When asking about the memory and handles, i was up to the point: do you explicitly open them or do they open implicitly e.g. by using the DLL?
Do you unload components (e.g. DLL) on purpose before unloading the subVI?
Can you pinpoint the issue to a certain subvi used in your dynamical loaded vi?
thanks,
Norbert
Hi Norbert,
Nothing is done explicitly.
The behavior is the same in the development environnement and the EXE.
Here is the very complex (!) last state of the dynamically called VI :
If a breakpoint is inserted in this state, everything behaves like expected until the breakpoint. Then LV "freezes" for the mentionned delay when the VI terminates.
After all my unsuccessful trials, I have no more ideas ! Therefore, I was forced to display an annoying "Please wait" dialog box during this very long unloading. I really hope that this unpleasant dialog will disappear very soon from the code !
Many thanks for your help and your time
02-11-2011 02:49 AM
Since we have no access to your code, we can only guess on reasons and give only general hints on optional improvements.
First of all: You can/should contact your local NI branch for support. You will have to send in the code for analysis.
Secondly, you can try to unload things you use in your dynamic vi explicitly during execution (so before "shutdown"). Here you can find some infos how this is done with DLLs.
And a little question "from aside":
Using dynamic calls in a LV application is suggested if memory usage is an issue. Is this the case in your application?
If not, you better use static subvis because calling VIs dynamically will result in an overhead (loading and, in your case the painful part, unloading!).
hope this helps,
Norbert
05-09-2011 03:59 AM - edited 05-09-2011 04:02 AM
Thanks to this discussion I could finally resolve the annoying delay when closing my application !
After reconfiguring some of the reentrant VIs to the non default Share clones between instances option,
the number of handles of my application decreased drastically and the delay when closing the application (with 4 instances of the quite large dynamically called VI with a hierarchy of more than 800 sub-VIs, several reentrant) falled from more than 2 minutes to less than 10 seconds !
So I would like to express my gratitude to the poster of the message and to the people who participated in the debate. Thank you very much for sharing your knowledge on NI's forums !