random crash when breaking constraints
both on Windows and Linux, when the SQL command sent breaks the database’s constraint, we get a LabVIEW crash
we get this both in built app and source code
Comments (5)
-
reporter -
repo owner Sorry about that. I made a classic LabVIEW-programmer-working-with-C mistake of assuming a dead refnum is harmless. A dead pointer in a C dll is not harmless, and can’t be safely acted on.
Another possible fix is to return a default PQ Result Object after calling the Clear.vi. The default Object has a zero-value “null” pointer, and so is safe. But your method (of leaving it undestroyed) is fine.
-
repo owner BTW, kudo this Idea, as it would allow a much safer way of wrapping pointer-based dlls like this: with a DVR wrapper that has a cleanup callback. That would make the PQ objects behave like other LabVIEW Refnums.
-
reporter i think it’s already cleared here :
-
reporter for the record, here’s link to the idea : https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Means-to-register-a-DVR-cleanup-callback-fior-use-when-DVR/idi-p/3838744
- Log in to comment
this is what we did to fix this bug