LabVIEW Project Providers

cancel
Showing results for 
Search instead for 
Did you mean: 

Freezing UI in tools provider

Solved!
Go to solution

Hi everyone,

I encountered a strange issue while creating custom tools menu item. When I launch given item from tools menu, the VI, which is supposed to act as UI loads, then freezes. I tried to debug it, but here lies the problem: when I insert a breakpoint into code of given UI, after unpausing it, everything runs as supposed. So, I thought that timing might be issue, or race conditions might occur during initialization. However, when I tried to insert breakpoint to different place during the entire initialization phase, it still worked well. It didn`t matter where it was, as long as it was executed. It appears to me, that aside from pausing the VI, breakpoint does some stuff, which prevents given VI from freezing. Any suggestions would be most welcome.

0 Kudos
Message 1 of 5
(1,231 Views)

This doesn't surprise me, but I don't know exactly what would cause something like this.  Two ideas I can think of are

1) Try using DETT with the private contexts token to debug your code.

2) Try forcing your GUI VI to run in the main application instance

 

Also check out this old post which may have some details in it to help: https://forums.ni.com/t5/LabVIEW-Project-Providers/Calling-a-VI-out-of-PPF-in-the-VI-s-project-conte...

 

Good luck, 

--David_L, CLA

0 Kudos
Message 2 of 5
(1,219 Views)
Solution
Accepted by topic author Rashek

I actually played around a little bit, and found out that there was a different issue: I set my UI to "Show front panel when called" through node setup from main VI, however, when I instead switched that setting off and set on setting with the same name in VI properties > window appearance, it works fine now and VI isn´t freezing anymore. It is strange though, because I would expect these two settings to act exactly the same, since they claim to do the same stuff.

Message 3 of 5
(1,210 Views)

A lot of stuff doesn't make sense when called in the Project Provider, so it doesn't surprise me that weird things like this happen.  Glad you were able to figure it out though!

0 Kudos
Message 4 of 5
(1,198 Views)

Actually, I've got the same issue first - VI was frozen at startup Open. Then I've checked other examples of project provider, and changed it in a way, that invoke node FP.Open was called without connected VI Reference. It started to open normally then, but now I can't close the interface... Seems, that invoke node FP.Close does not make any effect... This is really weird...

0 Kudos
Message 5 of 5
(848 Views)