basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
558 stars 207 forks source link

Cannot import pypylon.pylon on Windows when running as system account #52

Open ronaldsipkema opened 5 years ago

ronaldsipkema commented 5 years ago

As part of a CI workflow we had tests trying to import pypylon.pylon, which crashed the interpreter. I had no success trying to recreate the crash until I ran my command line as the system user (using sysinternals psexec: psexec -i -s cmd.exe); our CI agent also runs as the system user. Simply starting the python interpreter and calling 'import pypylon.pylon' crashes the interpreter process. Attaching a debugger showed an uncaught exception:

Unhandled exception at 0x00007FFE2D7AA388 in python.exe: Microsoft C++ exception: GenICam_3_0_Basler_pylon_v5_0::RuntimeException at memory location 0x00000000009DDEA0.

The last (non c runtime or kernel) call on the stack was to Log_MD_VC120_v3_0_Basler_pylon_v5_0.dll!00007ffe0cf6261d()

Anyway, not sure if this is a pypylon thing or Pylon in general, and also not sure if this is a major issue, but it seems things do not work as expected when run using a system user account. Note that there was no Pylon software installed on the system where this crashed (it's a test server).

thiesmoeller commented 3 years ago

@ronaldsipkema is this still an issue? We've reproduces the behaviour .... but found no root cause.

ronaldsipkema commented 3 years ago

@ronaldsipkema is this still an issue? We've reproduces the behaviour .... but found no root cause.

I'm not really affected by this issue at the moment; I usually do not run as a system user. Regarding the cause: not really possible for me to determine (without debugging symbols), but my guess would be that it has something to do with file system access rights and logging (since the last call on the stack was from Log_MD_VC120_v3_Basler-pylon_v5_0.dll.