LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows crashes when closing CVI after unplugging USB CAN device

I am using LabWindows/CVI version 8.5.1 (356), and the NI-USB 8473 High-Speed CAN device.  If I unplug the device while my application is running then it causes a STOP error in windows (aka "Blue Screen of Death").  The error message is either BAD_POOL_CALLER or PFN_LIST_CORRUPT.

I have narrowed the error down to the call to CloseCVIRTE().  If I remove the call then it happens on the closing bracket of my main function.  From other things I read I assume that when building a standalone executable the environment is initialized and closed around the application anyway.

 

We have several different NI-USB 8473 devices, and the issue occurs with all of them, and also occurs on many different computers.  I have attached a zip file that contains a project (along with output files) that reliably reproduces the issue.  The issue also occurs regardless of how the application is terminated - I can allow MAIN to end, use the debugger to stop execution, or terminate using the process explorer with identical results.  Any help would be appreciated.

0 Kudos
Message 1 of 3
(4,101 Views)

I assume you are using the latest drivers?

 

Even so, a lot of USB device drivers cause Windows to crash if the corresponding device is open in an application when it is unplugged. I would guess the 8473 driver is one of them. I would also suggest that the answer is not to unplug it whilst the device is open.

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 3
(4,083 Views)

Martin,

 

Thanks for the help - this has been plaguing us for nearly 2 years and it looks like they finally released a driver fix in August.  I guess I got tired of the obvious solution not working and stopped checking.  As for not unplugging it while the application is running.... I keep saying that in the release notes and people keep ignoring me, it's the darnedest thing.

 

Cheers,

-Robert

0 Kudos
Message 3 of 3
(4,076 Views)