LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Crashes when Right-clicking on Classes in Block Diagram

Solved!
Go to solution

I've recently moved my codebase over to a PPL-based architecture, and generally things are working pretty well. However... several times a day, I'll right-click on a class in a block diagram, and LabVIEW will just hang and not recover.

 

This right-click could be on a for loop terminal with the intention of turning it into a shift register, it could be on a VI terminal with the intention of creating a control, etc. Basically, any right-click on anything that is a class constant, wire, or terminal.

 

It doesn't seem consistent either -- I've seen scenarios where sometimes I'm able to right-click on a specific class just fine, and the next time I run LabVIEW I'm not able to.

 

The inheritance tree for my classes does span multiple levels of PPLs -- so I do have to wonder if this is tied to the parent class temporarily being "broken" because one of it's children has a broken run arrow as I'm working on it. Just a hypothesis.

 

LabVIEW 2023 Q1. Anyone experienced the same issue?  Any suggestions for getting around it?

0 Kudos
Message 1 of 4
(991 Views)

@_carl wrote:

right-click on anything that is a class constant, wire, or terminal.

 

 


I have no crash (working not much with PPLs), but would like to put here a note that NI has changed something on right-click logic (in "bad" direction). I noticed and observed, that the first right click caused noticeable delay and popup menu appeared much slower than in previous versions. I have seen this first time in LV2023 and now in 2024Q1 as well. Under "first right mouse click" I mentioned - LabVIEW fresh started, VI just opened and this is really first click.

 

Today I checked what happened under the hood with Process Monitor from SysInternals. This disaster looks just crazy (right click performed at the beginning of this gif, and menu appeared at the end):

RMC1b.gif

 

In the background immediately after the first click the LabVIEW walking through whole LVAddons folder and all nested subfolders multiple times without no reason, as result nearly 400K events logged! It is not a very big deal as long as I am at the office, where I have Xeon W-2245 @ 3.9 GHz, but at home, where I have only i7-3740QM, it takes 10-15-20 seconds from click to appearance depending on overall CPU load. The second and further clicks caused no problem, the menu appeared nearly immediately, because the only probes are loaded as expected:

RMC2b.gif

 

Theoretically you can try to do same experiment, then the entries close to the crash may tell you what going wrong. It is quite simple with Process Monitor, you need only setup Filter at the beginning to include LabVIEW-only activities:

Screenshot 2024-03-26 17.29.27.png

Theoretically you can also explore crash dump if created, but usually this not explains much about very internal LabVIEW crashes. In ideal case try to strip down your code and create "minimal" project where this behavior is reproducible, then may be this gets fixed someday by NI.

Message 2 of 4
(954 Views)
Solution
Accepted by _carl

Go to your LabVIEW edition's folder, then this series of subfolders:

LabVIEW 2023\resource\plugins\PopupMenus\edit time panel and diagram

 

In there you will find a bunch of files or directories ending in ".LLB". In LabVIEW 2021 there are 30 of them, and could be more in 2023.

 

Every single time you right-click on something, LabVIEW iterates through all of these folders, running the VI inside the folder that matches the folder name minus the extension, i.e. in "Explore SubVI.llb" it will run "Explore SubVI.vi".  Each of these files runs so that LabVIEW constructs the appropriate right-click menu options for you to see on that particular object or set of objects you have right-clicked on.

 

What is likely happening is that one or more of those is doing something that causes a hang.  I don't know which one specifically it might be for sure, though since you only have problems with classes I would suspect it's something related to that.  I have LV 2021 and there's one named "Class Methods Shortcut Palette.llb" that I would be immediately suspicious of.  You could try moving that and any other LLB from the directory that you find suspect to another location temporarily, and see if the problem goes away. 

 

You could even try moving all of them just to see if that fixes the problem, and then move them back one by one when you notice one missing that you would like to have back.

 

If you're really dedicated to finding the problem instead of just fixing it, you could add logging to those VIs and see which one was last logged when you get a hang the next time.

Message 3 of 4
(929 Views)

@Kyle97330 wrote:

Go to your LabVIEW edition's folder, then this series of subfolders:

LabVIEW 2023\resource\plugins\PopupMenus\edit time panel and diagram

 

In there you will find a bunch of files or directories ending in ".LLB". In LabVIEW 2021 there are 30 of them, and could be more in 2023.

 

Every single time you right-click on something, LabVIEW iterates through all of these folders, running the VI inside the folder that matches the folder name minus the extension, i.e. in "Explore SubVI.llb" it will run "Explore SubVI.vi".  Each of these files runs so that LabVIEW constructs the appropriate right-click menu options for you to see on that particular object or set of objects you have right-clicked on.

 

What is likely happening is that one or more of those is doing something that causes a hang.  I don't know which one specifically it might be for sure, though since you only have problems with classes I would suspect it's something related to that.  I have LV 2021 and there's one named "Class Methods Shortcut Palette.llb" that I would be immediately suspicious of.  You could try moving that and any other LLB from the directory that you find suspect to another location temporarily, and see if the problem goes away. 

 

You could even try moving all of them just to see if that fixes the problem, and then move them back one by one when you notice one missing that you would like to have back.

 

If you're really dedicated to finding the problem instead of just fixing it, you could add logging to those VIs and see which one was last logged when you get a hang the next time.


Well...you nailed it!  I zipped up the "Class Methods Shortcut Palette.llb" folder, and...no more crash.

 

I actually rely on that menu a decent amount...but... I value stability more.  Going to just leave this disabled until I have time to investigate more...

Message 4 of 4
(915 Views)