i have a frustrating problem by integrating a PS4224 USB-Scope with the actual SDK by using Qt.
I need the PS4224 in a complex measurement equipment including other Peripherals as well (PowerSupply with USB, Meilhaus ME4660 PCI, some UART conencted peripherals, Peak CAN Interface).
My Test Application for the PS4224 uses the dll provided with the SDK. I have written a picoscope class with three methods, to open/close and to get the Unit Info strings.
The dll is successfully loaded by QLibrary support. Opening and closing the unit works even correctly.
The Problem: My method to read the 5 unit info strings, implemented as shown in the example, crashes by a SIGSEGV - Segmentation fault (from Windows OS) the THIRD access of ps4000GetUnitInfo().
So if i start my for() loop with an index of 2 reading up to <5 it crashes as well the THIRD access if index is incremented to 4.
My Application does not crash, if i reduce the access to ps4000GetUnitInfo() to 2 times. With this Limitation, i ca trigger my method endlessly by a test button without crashing ???
Has anyone had something strange as well and can provide me a hint where to go on searching to fix this behaviour ?
I had a similar failure during integrating a Peak CAN Dongle where i used QTimer to poll my read method to get all queued data until it is read completely. This App was near stable after i removed the while(until_data_read_completely) and accessed the dll function only once per method call.
I do not understand why i can call the dll function 1-2 times and if more, this SIGSEGV Stop comes from Windows?
Hope you can help - much thanks,