Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ncReset after ncCreateNotification causes crash. Is there a workaround?

I call multiple instances of ncCreateNotification on both Network Interface Objects and Objects. Afterwards, when I call ncReset(), the following appears:
"Unhandled exception in xxx.exe (NICANFRM.DLL) 0xC00000005; Access Violation.
I am using NI-CAN 2.0 on Windows 2000.
If I comment out the call to ncCreateNotification for the Object but leave the ncCreateNotification for the Network Interface Object alone, then ncReset works fine.
Is there a workaround for this problem?
0 Kudos
Message 1 of 3
(4,243 Views)
Are you disabling your notifications then closing all your objects before you call ncReset? If so, please write a simple program that shows the problem and post it and its spy capture.

NI Spy Tutorial
0 Kudos
Message 2 of 3
(4,243 Views)
I was closing all of the objects on the channel that I was resetting. However, I was not closing the objects on the other channel of the card. After closing the other objects, ncReset did not crash.

ncReset is typically used to recover from an error condition. It should be a safe operation to perform at any time; it especially should never result in a crash.
0 Kudos
Message 3 of 3
(4,243 Views)