Quote Originally Posted by d_stranz View Post
I think the LabView GUI is Qt-based.
I used to think the same way, but the experts on NI forums told me that Qt is used only in a few toolkits, which I don't use currently. The rest of LV graphics is written in the core without external components.
Quote Originally Posted by d_stranz View Post
if you say that when your developer modified the code, the crash went away
Well, it was just an example of similar issue and there it was really linked to the threading issues. So my issue also might deal with it or not. But I checked out all the toolkit code and every block seems to be correct and properly configured. I have also compared the code with C examples from SICK and it matches. That's why I don't think that my code or toolkit code is the reason, but it's likely a bug in SICK's C wrapper.

Meanwhile I have found a workaround to the problem. I placed LoadLibrary( /* path to ICON library here */ ) call right before the camera(s) init. In the end of the code I'm not doing FreeLibrary. That makes LabVIEW to retain the DLL (and Qt lib's tied to it) from unloading on VI's close so it unloads only on process (exe) exit. No crash yet.

There is another workaround but it's kinda "nasty" - call ExitProcess(0) at the end, so all the threads receive their signals and finish normally. But it doesn't allow LabVIEW to do clean up work and is suitable only in exe variant (because I don't want to see LabVIEW closing when my program is stopped).

I'm not going to dig deeper because it takes a lot of free time and the things become more and more complex. On good terms the ICON C wrapper should be carefully debugged and rewritten if it's needed.

Thanks for the help.