LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

panel resize event bug?

I had a look again at my example and indeed it DOES lock if I set the event case to NOT lock the UI until completed.  I had totally missed this setting in my testing.  My VI posted was actually set to lock the UI until finished, so I suppose the behaviour was as expected.  Turning off the UI Lock still freezes the VI however, so I have to agreewith TonP on the difference between the two problems.

 

Shane.
0 Kudos
Message 11 of 20
(2,060 Views)

Hi,

 

I have filed a CAR (Corrective Action Request) so that R&D can take a look at the issue. The CAR number is #134531.

 

Best regards, 

0 Kudos
Message 12 of 20
(2,018 Views)

Well that's a bit unexpected because I got a mail back saying that it was an "uncomfortable Error" and that I should do a complete uninstall and re-install of all NI products on my computer.

 

Funnily enough, that didn't solve the problem.

 

So is this officially a bug? 

 

Shane. 

0 Kudos
Message 13 of 20
(2,015 Views)

Hi,

 

it may very well be that other engineers have looked through the matter more thoroughly. Since I didn't personally find anything directly related to what you have described and was able to reproduce the problem, I thought it best to file a CAR and to see what comes of it, since to me it is unclear whether it is 'expected' behaviour or not.

Message 14 of 20
(1,989 Views)

I appreciate having a CAR for it.  Thanks.

 

I seriously believe it's a bug.

 

Shane. 

0 Kudos
Message 15 of 20
(1,980 Views)

tst wrote:

However, I think I also agree with Ton that this is probably not a bug.


True, this is not a bug.  Event Structures can be confusing at times Smiley Happy, and we have tried to document the common Event Structure questions in the LabVIEW Help...

 

Avoid Using an Event Structure Outside a Loop 

 

LabVIEW can generate events even when no Event structure is waiting to handle them. Because the Event structure handles only one event each time it executes, place the Event structure in a While Loop that terminates when the VI is no longer interested in events to ensure that an Event structure handles all events that occur.

 

Caution  If no Event structure executes to handle an event and front panel locking is enabled, the user interface of the VI becomes unresponsive. If this occurs, click the Abort button to stop the VI. You can disable front panel locking by right-clicking the Event structure and removing the checkmark from the Lock front panel until the event case for this event completes checkbox in the Edit Events dialog box. You cannot turn off front panel locking for filter events.

 

For example, in the following block diagram, the Event structure is outside the While Loop and front panel locking is enabled for the numeric Value Change case.

If you change the value of the numeric control, an event occurs. The Event structure executes once and handles the Value Change event. If you change the value of the numeric control again, another event occurs, and the user interface locks because front panel locking is enabled. The Event structure already executed once, and because it is not inside a While Loop, it is unable execute again to handle the second event. If you click the stop Boolean control to stop the While Loop and the VI, the VI cannot stop because the block diagram still has not handled the second event, and LabVIEW does not process the event when you click the stop Boolean control until the block diagram handles that event. You can avoid this behavior by placing the Event structure inside the While Loop.

Event structures begin waiting for events as soon as the VI runs. For example, if you configure two Event structures within the same Sequence structure to wait for a mouse click on the same front panel object, both Event structures execute as soon as the event occurs for the first time. If you want the second Event structure to execute the second time the event occurs, do not use a Sequence structure. Instead, place one Event structure inside a For Loop that you configure to execute twice.

 

See all: Caveats and Recommendations when Using Events in LabVIEW

 

Cheers!

Chris Bolin
LabVIEW Partner Program, CLA
Message 16 of 20
(1,876 Views)

If you go back to the examples quoted earlier, the panel was locking even when the option to lock the UI was not selected.

 

In that case it's not expected behaviour.  Locking when the UI lock option is selected I now understand, but when the UI lock option is not selected, why then should the UI lock up?

 

Shane.

Message 17 of 20
(1,852 Views)

Hey Shane!

 

I looked at both "Freezes.vi" and "UI Locking Bug.vi", and I can't get panel to lock without that option checked,  Just let me know what you were seeing, and we should be able to sort it out.  Cheers!

Chris Bolin
LabVIEW Partner Program, CLA
Message 18 of 20
(1,821 Views)
Problem seems to be solved on LV 8.6 on Mac.
 
I was seeing a lock using "Freezes.vi" when the pane event was set to not block the UI, but it seems to be OK now.
 
Maybe I had a corrupted LV installation?
 
Shane. 
0 Kudos
Message 19 of 20
(1,800 Views)

I am not seeing the bug on LabVIEW 8.6  ( I have seen it on 8.5).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 20 of 20
(1,796 Views)