06-06-2025 10:57 AM - edited 06-06-2025 11:03 AM
@zou wrote:
ZLG-CAN driver and its wrapper VIs are widely used. It's unlikely the culprit.
That may be true but considering the OPs find that disabling calling that driver in his application would fix the crash, is a fairly strong indication to some problems in the driver or the way it is called.
It could be that the driver only misbehaves if called incorrectly but it would be a wrappers responsibility to prevent that from happening and returning an error instead. A LabVIEW VI is never supposed to crash no matter what stupid parameters or uses the user throws at it. That’s part of the impedance transformation any good wrapper is expected to do: Remove any chance for a user to make it crash by not exposing any form of C-isms to the user API!
And yes a default Import Library Wizard generated wrapper doesn’t do that as it can’t even start to guesstimate that the parameter bufLen is really associated with the parameter buffer or message and indicates the actual length of the parameter. Yet in LabVIEW an array or a string has an inherent length and any normal LabVIEW user is not used to have to even worry about them to be correct. And if they aren’t you get a runtime error or wrong data, not a crash.
06-06-2025 09:25 PM
I have two computers with two similar software installed, both using ZLG. Only one of them has that problem when the exe file is closed. I'll try to figure out the cause and then give feedback
07-09-2025 02:48 AM
reinstall labview ,error disappeared