LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Popup window with .net control slow to close, affecting main window

Solved!
Go to solution

I am making an application from which the user can choose to open several non-modal popup windows. The popup windows contain a .net control in them. I believe because of this control the window takes a couple of seconds to close. This is not a problem if it happens "in the background", but the main window freezes while any popup window is closing. 

 

The popup window VIs are reentrant and are opened using Open VI Reference with option 0x80 and Start Asynchronous Call.

 

Is there something I can do to improve this?

 

 

0 Kudos
Message 1 of 27
(3,170 Views)

I found the issue. I was closing the type specifier VI Refnum, which I apparently should not be doing.

 


0 Kudos
Message 2 of 27
(3,137 Views)

Actually I now found that closing the VI only helped with the hanging of the application while waiting for the popup window VI to close. The VI however actually did not close, but was kept in memory until application closed. I also tried using Run VI invoke node method to start the popup VI, but the entire application still hangs for a bit when closing the popup VI. 

0 Kudos
Message 3 of 27
(3,011 Views)

Can you post the popup-vi?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 27
(3,006 Views)
Also, what .net control are you using?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 27
(2,994 Views)

Generally it feels like you need to manage and close/kill the .net ref in that VI to avoid waiting until the garbage collection does it.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 27
(2,982 Views)

I am using third party commercial charting control LightningChart Ultimate (www.arction.com). I have attached a simple example. The delay/hang with this VI is shorter than my bigger more complex VI (which can take around 10 seconds to close), but I cannot post that VI. You will need to download and install trial version of the control to test this.

0 Kudos
Message 7 of 27
(2,973 Views)

I looked at that some 6 months ago, and looking at the C# reference code, don't you need a Invoke->Dispose before closing the ref?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 27
(2,965 Views)

It seems explicitly disposing doesn't make any difference. 

0 Kudos
Message 9 of 27
(2,952 Views)

Hello Roger,

 

Did you ever experience that NI LabVIEW complains that some methods are not available with the trial version?

It does seem that the trial version (version .NET4) I downloaded predates the version you are using.

 

If you can help me with getting it to a runnable state at my side, then I might be able to help you further troubleshoot it.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 10 of 27
(2,921 Views)