LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Callback VI Not Working Causing Reserved and CTRL+Drag Issues

Solved!
Go to solution

I know convoluted title but I have three issues all around the same VI and I think the issues are related.  First I noticed that a Mouse Down Callback VI wasn't running on a .Net PictureBox.  I then noticed that I needed additional garbage collecting code to for the callback to be unreserved after it fails to fire.  And third, the wild card, my CTRL+Drag, and CTRL+ALT+Drag stop working in this VI for some reason at random times in random directions...Grrrr. 

 

Okay a video.  This video shows a new blank VI after closing and reopening LabVIEW.  Adding and removing space on the BD works as expected.  Then I add my Simple Event Callback.vi and see that dragging space and removing space works some of time times but some times it just undos the move and shows the front panel.  Then I run the VI showing that the Callback isn't ran (by clicking the object), then show that the additional garbage collection function is needed to unreserve the VI if I clicked the object and had no event generated.

 

https://www.screencast.com/t/s0hDFzhP7t

 

Please NI, please help me get back some of my sanity.  Assign a dozen CARs, tell me there are work around.  Windows 7 x64, LabVIEW 2017 32-bit.

0 Kudos
Message 1 of 7
(5,406 Views)

@Hooovahh wrote:

 First I noticed that a Mouse Down Callback VI wasn't running on a .Net PictureBox. 


The control is Disabled&Grayed out, so it doesn't accept any clicks Cat Happy

 

As for the rest of the issues, I can only confirm both weird behaviour of CTRL+Drag and reserved callback VI (I also backsaved it to LV 2015 SP1 - same problems present).

 

Ed. Unreserved callback VIs are known issue since LV 2013: http://www.ni.com/product-documentation/53586/en/#468139_by_Category

Message 2 of 7
(5,390 Views)
Solution
Accepted by topic author Hooovahh

Ok, I've been playing around with your VI for a little bit and this is what I have found.

 

1. Mouse Down Callback VI doesn't run - didn't run on my machine either. But if I make a new .Net PictureBox on the front panel and wire everything back up, it works. Edit: Nice find on the Disabled Control PiDi!

 

2. Unreserve callback vi - this behavior is reproduceable in the LabVIEW .NET Event Callback example, and in LabVIEW 2016. I would call NI Support to report this as a potential bug. I do not know if that is expected behavior or not. Edit: known issue as stated above.

 

3. CTRL+Drag not working - I deleted the block diagram bit by bit until this behavior stopped. I was left with the PictureBox. I opened up a new VI, put down a .NET container, then inserted a picture box - CTRL+Drag stopped working. I also reproduced this in LabVIEW 2016. I would definitely call NI Support to report this one. 

Eric H.
Senior Field Applications Engineer
NI
Message 3 of 7
(5,371 Views)

HOW DID THAT STUPID CONTROL GET DISABLED?...

 

Okay thank you both very much for pointing that out.  I saw that the unreserved callback was an issue but I thought it was an issue that had a CAR on it and was to be fixed at some point, guess I missed that this is a known issue.

 

Glad I'm not crazy on the CTRL+Drag.

0 Kudos
Message 4 of 7
(5,313 Views)

Definitely not crazy on the CTRL + Drag, I just replicated it as well on my end with the PictureBox control. Looks like a CAR to me, I'll get to filing that over here.  

 

Thanks for the tip and thorough testing, all!

 

 

Claire M.
Technical Support
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 5 of 7
(5,306 Views)

@Hooovahh wrote:

And third, the wild card, my CTRL+Drag, and CTRL+ALT+Drag stop working in this VI for some reason at random times in random directions...Grrrr. 


For what it's worth: minimizing the front panel seems to resolve this for me. That is, CTRL+drag on the block diagram works for me if the front panel is minimized.

Message 6 of 7
(5,259 Views)

Ooh, nice catch. Same thing for me, minimizing the front panel fixes the ctrl + drag. I updated the CAR with that info--speaking of, the number to look out for in patches and new releases is 681623.

 

Claire M.
Technical Support
National Instruments
Certified LabVIEW Developer
Message 7 of 7
(5,242 Views)