access violation using ljm.openS() on Windows 7 unless run as administrator | LabJack
 

access violation using ljm.openS() on Windows 7 unless run as administrator

10 posts / 0 new
Last post
MP Waters
MP Waters's picture
access violation using ljm.openS() on Windows 7 unless run as administrator

I just installed LabJack-217-12-20.exe and Python_LJM_2018_02_23. I'm trying to run the examples to talk to a T4 over USB or Ethernet. The openS() function fails as shown below unless I run it as an administrator.

  File "eReadName.py", line 11, in <module>
    handle = ljm.openS("T4", "ETHERNET", "10.5.0.61")  # T4 device, Any connection, Any identifier
  File "c:\Program Files\Python\lib\site-packages\labjack\ljm\ljm.py", line 312, in openS
    error = _staticLib.LJM_OpenS(deviceType.encode("ascii"), connectionType.encode("ascii"), identifier.encode("ascii"), ctypes.byref(cHandle))
OSError: exception: access violation reading 0x0000000000000002

Kipling seems to have the same problem. I had to run it as admin or it hangs on startup. Is there a way to use the LabJack library without running as admin?

LabJack Support
labjack support's picture
Thanks for reporting the

Thanks for reporting the issue. This issue also occurs in Windows 10 for non-admin users, and looks like a general Windows, non-admin issue. The current workaround is to run LabJack applications and Python as admin to prevent the error. We will look at this closer, but are in the midst of some other LJM work so it will likely be a couple weeks before we have anything further on this.

LabJack Support
labjack support's picture
I believe I've found a

I believe I've found a solution. I will release a new version of LJM that I expect will fix this issue for you and then I will update this thread. I expect that to happen tomorrow.

LabJack Support
labjack support's picture
I've uploaded LabJack-2018-03

I've uploaded LabJack-2018-03-12-beta.exe, which contains LJM 1.1802. Please try it.

https://labjack.com/support/software/installers/ljm

MP Waters
MP Waters's picture
We've been using 2018-03-12

We've been using 2018-03-12-beta for a few weeks and it seems to be working as expected without running as admin. Thank you for the quick fix!

LabJack Support
labjack support's picture
Thank you for reporting the

Thank you for reporting the issue. I'm glad to hear it's resolved.

GG
geli's picture
hello , I have the same issue

hello , I have the same issue. I use windows 10, labjackT7 pro.

I just installed LabJack-2019-15-20.exe and Python_LJM_2020_11_20. I'm trying to run the examples to talk to a T7 over USB.  The openS() function fails as shown below unless I run it as an administrator.

self.handle = ljm.openS("T7", "ANY", "ANY")  # T7 device, Any connection, Any identifier

reported error: exception: access violation reading 0x000000000111FFFF.

please, can you help me.

LabJack Support
labjack support's picture
Do you see a similar issue

Do you see a similar issue trying to open the device in Kipling?

In the Python script, does specifying the device type make a difference and what device type are you using?

As a starting point, you could run the older installer (mentioned above) at the following link. Does using this version make any difference?

https://labjack.com/sites/default/files/software/LabJack-2018-03-12_1.exe

GG
geli's picture
 

 

hello , I have the same issue. I use windows 10, labjackT7 pro.

Do you see a similar issue trying to open the device in Kipling?

=> yes I see the same issue trying to open the device in kipling.

In the Python script, does specifying the device type make a difference and what device type are you using?

=> self.handle = ljm.openS("T7", "ANY", "ANY")  # T7 device, Any connection, Any identifier

As a starting point, you could run the older installer (mentioned above) at the following link. Does using this version make any difference? https://labjack.com/sites/default/files/software/LabJack-2018-03-12_1.exe

=> nothing change

File Attachment: 
LabJack Support
labjack support's picture
Which connection type are you

Which connection type are you using? Also, what is the full error message you see running eReadName.py? What version of Python are you using?

The access violation error is vague and could be due to a number of different issues. Since the installer that resolved the previous issue in this thread did not resolve the issue for you, it  should be fairly safe to say that the cause is something different.

I am not able to reproduce this issue with our newer installers, so it may be difficult to track down. I would recommend that you:

  1. re-run the release installer LabJack-2019-05-20.exe if you are still on the old version
  2. Do a Windows update if there are updates available
  3. Restart your computer
  4. Power cycle the T7
  5. Try to connect the device in Kipling again.
  6. If you still cannot connect in Kipling and are using a USB connection, try the steps in our USB communication failure app note. If you are using an Ethernet or WiFi connection, see our network troubleshooting app note:
    https://labjack.com/support/app-notes/usb-communication-failure
    https://labjack.com/support/app-notes/basic-networking-troubleshooting