Access Violation when streaming digital inputs on 64 bits windows. | LabJack
 

Access Violation when streaming digital inputs on 64 bits windows.

3 posts / 0 new
Last post
frans.joseph.lamain
frans.joseph.lamain's picture
Access Violation when streaming digital inputs on 64 bits windows.

I am currently using a UE9 to stream digital inputs in a c# application.

When my application is compiled as "any cpu" and run on a 64 bits OS I get an Access Violation on this line:
LJUD.eGet(ue9.ljhandle, LJUD.IO.GET_STREAM_DATA, LJUD.CHANNEL.ALL_CHANNELS, ref numScansRequested, adblData)

When I compile it as x86, the software works. However, this is not an option due to other dependencies.
I am collecting data for channel 193, but also tested for channel 1 with the same result.

I am using version 3.46

Please let me know if there is any other information that I can provide.

Kind Regards,

Frans-Joseph Lamain

LabJack Support
labjack support's picture
Please use the LJUD.eGetPtr

Please use the LJUD.eGetPtr call instead which should help the issue in your 64-bit application. eGet is not 64-bit safe when passing arrays and this is documented further here:

https://labjack.com/support/datasheets/ue9/high-level-driver/function-re...

Currently the C# examples have not been updated to use the eGetPtr call.

frans.joseph.lamain
frans.joseph.lamain's picture
Thanks for the help. I have

Thanks for the help. I have gotten it to work now.

I also had to change LJUD.AddRequest() to LJUD.AddRequestPtr() to make everything reliable.