LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW crashes silently when running (part of) my application

My crash dump is available, but not allowed to be attached, any solutions for how to do this? The dump seems to indicate there's a NUL-pointer dereference, which is causing LabVIEW to crash without even showing its error reporting window.

 

No idea where to begin; this happened after adding a single element to a 20-element typedef cluster within another typedef cluster which is the private data for a class. This all seems to be kosher.

 

Thoughts?

0 Kudos
Message 1 of 7
(2,581 Views)

Assuming that the crash dump indication of a nulll-pointer dereference is possibly at least partly correct, it would suggest there's something wrong in one or more VIs.  Which one, and where?  Would you like us to guess, or do you think that posting the code (which seems to be reproducibly producing this crash) would be helpful to us in finding, or fixing, the problem?  If you do post the code, you might consider posting both the "code that fails" and the "last-known code that works" ...

 

Bob Schor

0 Kudos
Message 2 of 7
(2,547 Views)

I guess it somehow tries to convert old data to new format.

Try to force recompile class VIs and caller VI - Ctrl+Shift+Click Run arrow.

Does it happen when running VI or opening VI in dev environment?

Are there any dynamic VI loads (by template that have not been updated for example)?

Is there manual data transformation from some generic form (string, variant, etc).

Will simple test vi that calls the class fail?

Can you delete that element from class data, will it make it work?

Message 3 of 7
(2,532 Views)

Just realized I never responded to this thread. Unfortunately the code is not mine to release, nor do I believe I'd be allowed to share without NDA's in place. Sorry about that! I tried full recompiles and many combinations of project closing and reopening, labview closing and reopening, etc. In the end, the version of the code (known checksum) that caused the crash reliably (always after a certain VI ran and a bunch of other VIs start in parallel) did not end up causing a crash after a clean reinstall of my LabVIEW version.

 

So, honestly, I'm stumped. Really hoping I can find a conclusive answer that's not "well why don't you just reinstall?" If any NI engineers or interested folk want the crash dumps, I'd be happy to provide!

0 Kudos
Message 4 of 7
(2,502 Views)

To answer the other questions:

 

I guess it somehow tries to convert old data to new format.

It's possible this is what happened, though I'm not sure *how*. I use the same machine, same labview version for everything. All of the clusters I use are typedef'ed, and theres nothing weird like "class being instantiated by loading XML data from text file" that could cause this.

 

Try to force recompile class VIs and caller VI - Ctrl+Shift+Click Run arrow.

Did this, crash still happened. Was hoping it was just a compiler issue...

 

Does it happen when running VI or opening VI in dev environment?

I tried to reproduce when running with Highlight Execution, and also with lots of probes and breakpoints, but was unable. I'm guessing this means it may have been a race condition of some kind, but a highly reproducible race condition.

 

Are there any dynamic VI loads (by template that have not been updated for example)?

Nothing dynamic in the sense of "open VI reference from runtime-generated string", nor any VI templates going on. The application consists of almost 2500 VIs, many of which are dynamically dispatched from parent classes.

Is there manual data transformation from some generic form (string, variant, etc).

There is. All of my queues and user events have a single variant for data fields, but everywhere I have a "variant to data", I also have appropriate error handling and logging. I didn't see anything anomalous about this in my logs, though.

 

Will simple test vi that calls the class fail?

Well, there are probably 10 different main class objects in this VI that run simultaneously (sort of like a bunch of queued message handlers). From what I could tell of basic testing, nothing was misbehaving, although I was only running simple unit tests, and not integration tests. Before I ran integration tests (they take a while), I reinstalled, and that fixed the problem.

 

Can you delete that element from class data, will it make it work?

Tried it, still crashed. Very strange, I know.

0 Kudos
Message 5 of 7
(2,500 Views)

Still no answer. Would appreciate some response wrt the crash dumps if anyone has the expertise to analyze.

0 Kudos
Message 6 of 7
(2,471 Views)

Have you tried going to support.ni.com and creating a Support Ticket?  Are you able to choose the "Phone" option for reporting your problem to NI?  If so, you'll get a helpful Application Engineer who can probably either explain the crash dump info to you or tell you how to send stuff to them so that they can examine it and help you find the problem.

 

Bob Schor

0 Kudos
Message 7 of 7
(2,466 Views)