LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class control greyed out

Solved!
Go to solution

@Darin.K wrote:

Kill them all and move on before they corrupt more of your code...


uio8Cxf

Message 21 of 29
(577 Views)

So it turns out the clipboard was holding onto a hidden copy of my test child class.  With the child class now truly nuked I do get many errors with the default data and a grayed out control (with one of the fifty shades).  Still no luck getting it to run so it still seems that something is truly messed up in those controls.

 

No change to my advice.  But if I had to guess I'd say the non-class default + child class shenanigans led to this issue.  I just wish I had your luck, something that had no business working was fine.  For me, it always seems like I have something that has no business being broken which is nonetheless unable to run.

Message 22 of 29
(565 Views)

I fully condone the nuclear option but a morbid fascination with the cause remains.....

 

Whatchagonnado?

Message 23 of 29
(555 Views)

@Darin.K wrote:

For me, it always seems like I have something that has no business being broken which is nonetheless unable to run.


I have that too. 

 

Probably because I assume things to just work. Even when using low level things, nested, reentrant, recursive, in (nested) subpanels, by reference, and in any\all of the combinations. It does most of the time, but definitively not always.

Message 24 of 29
(534 Views)

I'm fighting the same issue -- only I'm dealing with 100's of VIs that have been corrupted this way...I think the default data of the classes is holding on to old child classes that no longer exists after some library renaming, which in turn appears to be causing some load issues.

 

Annnyway....manually replacing everything was unpalatable, so I looked into scripting.

 

Turns out that I can get the class terminals to un-gray by simply updating their default values programmatically. I threw this in a quick-drop command for testing, but... will likely just run this logic on all VIs in my project...

_carl_0-1710878813017.png

 

0 Kudos
Message 25 of 29
(92 Views)

I haven't seen this for a few years.

 

Are you using a recent LV version?

0 Kudos
Message 26 of 29
(68 Views)

Using LabVIEW 23Q1, because, well, newer versions of LabVIEW (both 23Q3 and 24Q1) introduced an issue where building my application would crash LabVIEW...

 

As a follow-up...I did run a script to update all class constants and class controls/indicators with a default value equal to their data type -- and this worked magically.  The corruption I had been experiencing due to the grayed out items was resolved.  (Previously I would get a silent crash of LabVIEW when interacting with the impacted PPLs)

0 Kudos
Message 27 of 29
(62 Views)

@_carl wrote:

Using LabVIEW 23Q1, because, well, newer versions of LabVIEW (both 23Q3 and 24Q1) introduced an issue where building my application would crash LabVIEW...


Both issues could be related? E.g. classes are disabled because of an underlying problem, builds crash because of the same problem. Maybe the LV24 builds don't crash after this fix? Of course the fix might not have fixed the underlying problem (if there is one)...

 

I'm going to try a few real life projects in LV24Q1 soon... I'll keep this in mind.

 

I'd also suspect the class mutation history. Maybe the history holds a reference to an old class that's no longer available. Not sure if it works that way. It almost never hurts to clear the history though, so it would be one of the first things I'd try. I do it regularly anyway, to speed up load time and reduce code and exe size.

0 Kudos
Message 28 of 29
(54 Views)

This class corruptions I just dealt with were introduced as part of a recent refactoring effort, so I don't believe that to be the cause of newer versions of LabVIEW not building properly. (But I wouldn't be surprised if a similar corruption had happened in the past, so they could very well be related.)

 

As for clearing class mutation history, I had already tried that, but it didn't resolve the grayed out controls. (I too regularly run a script to clear out class mutation history for likely the same reasons as you...)

0 Kudos
Message 29 of 29
(43 Views)