LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text input cursor freezes when clicking on the VI menu bar

Steps to reproduce:

 

 - Create a new VI;

 - Create a dummy free label on the front panel and keep the key focus, so that you have the blinking cursor inside the text; 

 - At the exact moment when the cursor is "on", left-click on the VI menu bar and hold for 1s;

 - The cursor is now frozen.

 

Precisions:

 - It happens with any Text object, either free or belonging to another object (as a Label, Caption, Array index, Control/Constant content…);

 - It happens for Texts on the front panel and on the block diagram;

 - It happens at edit-time and at run-time.

 

This may seem like a very minor problem, but since the Text object is one of the main building blocks of other LabVIEW objects, I thought it was worth mentioning it.

Of course, the most annoying case is at run-time when editing the content of a control.

 

Demo:

 

2023-05-08 00-46-15.gif

0 Kudos
Message 1 of 2
(690 Views)

This doesn't happen just with text, but seemingly anywhere where you have the cursor. I haven't checked with a recent version of LV. It should also be noted that this is purely a cosmetic issue of the caret not flashing and the editing functionality is not impacted by this.

 

My guess for what's happening is this: I'm guessing that when you start editing, there's a loop somewhere in charge of monitoring the state of the editing and of updating the display and that loop has a timeout, to stop if something goes wrong. Or this code is running in the UI thread and uses a variable to handle the blinking and if too much time has passed then it stops, etc.

 

LabVIEW has a concept called the root loop which is continuously running and that probably does something which resets the timeout. Interacting with the menu bar (apparently just holding down the mouse button inside the menu bar is enough, which I didn't know) pauses the root loop and causes the timeout to happen.

 

See these links, for instance:

https://www.genuen.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001Dd6ISAS&l=en-US


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(654 Views)