From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6501: System.AccessViolationException

We recently upgraded our C# software from .net 3.5 to 4.0. Since then, on a few computers, we are getting a System.AccessViolationException error. The problem is intermittent and appears on both Windows 7 and Xp. Below is a partial stack trace from the Windows Event Viewer. Has anyone ever seen this? These systems have been working reliably for many years.

I've tried re-installing the NI-DAQ software, upgrading to 9.5.1 and re-installing the .net framework. To get the system functioning again a hardware re-boot is required.

 

Any suggestions on how to correct this would be greatly appreciated.

 

System Details:

** OS full name:                          Microsoft Windows XP Professional sp3
** OS platform:                            Win32NT
** OS 32 or 64 bit:                       32 Bit
** OS version:                              5.1.2600.196608
** CLR version:                            4.0.30319.1
** CPU speed:                             2992 MHz (Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz), 2992 MHz (Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz)
** Total physical memory:             3547 MB
** Available physical memory:       2547 MB
** Total virtual memory:                 2047 MB
** Available virtual memory:           1687 MB
** Free disk space on C:               219910 MB

** NI-DAQ version                         9.3 and 9.5

** I\O Device                                USB-6501

Application: ProGo.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at <Module>._STL.basic_string<unsigned short,_STL::char_traits<unsigned short>,_STL::allocator<unsigned short> >.__dtor(_STL.basic_string<unsigned short,_STL::char_traits<unsigned
   at NationalInstruments.DAQmx.Internal.DigitalSingleChannelWriterImpl.WriteSingleSampleSingleLine(Boolean, Boolean)
   at NationalInstruments.DAQmx.DigitalSingleChannelWriter.WriteSingleSampleSingleLine(Boolean, Boolean)
   at PhonakGroup.ProGo.Pic.PicTwo.SetProgrammingDeviceState(PhonakGroup.ProGo.Pic.PowerState, PhonakGroup.ProGo.Pic.ProgrammerDevice)

 

for the complete stack trace see attached.

0 Kudos
Message 1 of 2
(4,329 Views)

Hi Stevagorn,

 

When is this error occuring? Also, what environment is your program in? If possible, try to recreate it in LabVIEW.

 

Just to make sure it's not an issue with the hardware, can you communicate with the 6501 in MAX? 

Josh Y.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(4,308 Views)