LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading objects from a binary file works but crashes LabVIEW on exit

Solved!
Go to solution

I've been hunting for the source of some crashes on LabVIEW exit and I was finally able to track it down to this. In my application I wrap measurements into objects that I stream into a binary file during the inspection. In another application I read the file again to browse and analyze the measurements. All this seems to work just fine except that the reading part causes LabVIEW to crash once I close the IDE. Built applications don't report any crashes but I am afraid if it might still cause some instability or unexpected behaviour.

 

The snippet below represents the writing and reading scheme I use and with which I am able to reproduce the problem every time. I attached the project for testing it.

 

write_read_binary_objects.png 

 

Parts from the internal warning report:

 

#OSName: Windows 8.1 Pro N 
#AppName: LabVIEW
#Version: 13.0f2 32-bit

DWarn 0xEFBFD9AB: Disposing OMUDClass definition [LinkIdentity "Class 1.lvclass" [ My Computer] even though 1014 inflated data instances still reference it. This will almost certainly cause a crash next time we operate on one of them.

Possible path leak, unable to purge elements of base #0

 The full log is also attached.

 

Notes:

  • Remember: the reading works without any problems, the crash after LabVIEW exit is what I'm concerned about
  • Seems to only happen with classes/objects—not the default LabVIEW Object, though
  • Prepending array size or different byte orders make no difference
  • The writing is time critical, the reading is not, in case you wish to suggest other options

Has anyone else run into this? Should I be concerned for the built applications or can this be simply ruled as an IDE problem?

Download All
0 Kudos
Message 1 of 4
(3,075 Views)
Solution
Accepted by topic author vekkuli
Right off, if you say you can read and write lv objects, try casting your object as a lv object before saving it. The lv object is the ultimate parent of all classes.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 2 of 4
(3,040 Views)

You know what? That actually made a difference. I tried this, as you suggested:

write_read_binary_objects_lv_object.png 

...and no crash. Great idea, thank you!

0 Kudos
Message 3 of 4
(3,016 Views)

Small addition: it was enough to only Cast to More Specific Class after reading, i.o. write derived class and read LV Object data type.

0 Kudos
Message 4 of 4
(3,002 Views)