From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW crashes when modifying OOP parent class private data control or typedef contained in that control

I've been seeing strange behaviour when I modify the private data control of a class, especially if it is a parent class.  It seems that those changes are not always propagated to all the VI's in the project.  This sometimes causes my project to crash with an exception error, or sometimes the problem is more subtle as it will simply write data to the wrong elements in the control (when bundling/unbundling).

 

I solve the problem by opening the typedef or class control by itself (i.e. not as part of the project), and then saving it.

 

The next time I open the project all problems are solved.  This is a difficult error to track down but I now know to keep a list of typedefs or class controls that I have modified (using subversion helps here), and then when this strange behaviour or crashes happen, I simply close the project and open each modified typedef or class outside of the project and save them individiually.

 

Anyone seen something like this too?

0 Kudos
Message 1 of 21
(3,397 Views)

I have not seen that and use classes a lot. What version of LV are we talking about? OS?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 21
(3,375 Views)
Ive seen it on 2012 and 2013.
0 Kudos
Message 3 of 21
(3,370 Views)

What Operating System?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 21
(3,364 Views)
I develop on windows 7.
0 Kudos
Message 5 of 21
(3,361 Views)

Hmmm.... Have not seen what you are describing -- though occasionally I will see a class that appears broken until I open it by itself outside the project.

 

  • How large is your application?
  • How many classes do you use?
  • How extensively do you use classes in the application?
  • Could you post a screen shot of your project and how things are arranged in it?
  • Does the problem seem to be related to any particular class or group of classes?
  • Have you tried mass-compiling your code?
  • Are the VIs set to separate the object code from the source?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 21
(3,357 Views)

I wouldn't say it is very large or special.  I do use a lot of data value references and variants and multiple class instances running on different core (on a quad core).  It doesn't seem to happen if I deploy the application to a RT target, but it does happen on Windows.

  • 40MB on disk, 64 typedefs, 500 vi's 
  • About 20 classes
  • All functionality and data are encapsulated in classes
  • Screenshot of top-level (doesn't really give away much does it?)
  • Untitled.png
0 Kudos
Message 7 of 21
(3,350 Views)

Well, the big difference is that I don't put everything in classes - negatively impacts readability . That may make a difference.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 21
(3,346 Views)
Thanks for the suggestion but I doubt that moving code from a class vi to a non-class vi will make a difference. I suspect it has more to do with the member data of classes than with the member functions and I say this because the problem normally happens when I modify a class control and never when I modify class vi's.
It must have something to do with the labview environment not propagating the control change to all the references to it in the project.
0 Kudos
Message 9 of 21
(3,341 Views)
That is certainly possible. Something I do a lot is create a "catalog" VI. It holds one instance of every top level VI. With this open changing datatypes can be much easier. Still, I have never seen LV not update typedefs.

If you nail-down the cause for sure let us know.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 21
(3,334 Views)