LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal runtime error: Unknown source position...

I've created a simple project (discretes_test.c) that is supposed to work as a simple test driver. The file under test (ri1260.c) is supposed to be linking up with a .dll file and a .lib file attached to discretes.h. Each of which are in the same directory as the project. When I comment out the call to the discretes.h function in ri1260.c everything works fine because its not doing anything but if I leave it in I get Fatal runtime error: Unknown source position, thread id 0x.... : A non-debuggable thread caused a "general protection" fault at address ... Any ideas would be helpful!

 

 Thanks,

 

Julissa

 

0 Kudos
Message 1 of 5
(4,078 Views)

Julissa:

 

Was the DLL you're trying to call from ri1260.c developed in CVI?

 

If it was, try debugging that project with your projects executable set as the External Process.  See the CVI help on Debugging DLLs for more info.

0 Kudos
Message 2 of 5
(4,067 Views)

ri1260.c and the associated dll is the cvi driver for a racal vxi mux card.  While it has been a few years since I have worked with it I remember this driver being and absolute nightmare.  We spent many hours stepping though the code to try and correct various issues.  I know we found our cards did not return the correct ID string that the driver was expecting so we had fiddle with that.  There were other issues that generated faults when we tried to close the session to the device and then re-open it.  The best solution was to power cycle the chassis if you ever needed to close the driver out.   After months of problems, in the end we tossed the equipment and installed a mux from another vendor.  I can not think of another instrument that caused as much trouble for us as this one.

 

Best of luck.

0 Kudos
Message 3 of 5
(4,063 Views)
The .dll and .lib files were created in Visual Studio. The two are just included in the CVI project and they are known to work just fine.
0 Kudos
Message 4 of 5
(4,053 Views)

Are you able to call functions in other Visual Studio DLL files?

Where did you get the .h file for the VS DLL?  Is there maybe a problem with the calling convention?

 

0 Kudos
Message 5 of 5
(4,017 Views)