01-04-2018 04:30 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
01-04-2018 05:06 PM - edited 01-04-2018 05:13 PM
@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
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
01-04-2018 05:30 PM - edited 01-04-2018 05:35 PM
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.
01-05-2018 08:47 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-05-2018 09:28 AM
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!
01-08-2018 08:22 AM
@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.
01-09-2018 08:57 AM
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.