Hi team,
I encountered an issue where my PC crashed while developing my custom application using the thorlabs_xa Python package.
To debug, I used an AI assistant to analyze the logs and generate a detailed report. See below for details.
Summary
When our application opens a connection to a controller over USB (the TLMC_Open
call), the whole computer occasionally crashes and restarts — not just our
program. It does not happen every time; the same connection step usually works,
but every so often opening a device takes the entire PC down.
Environment
- thorlabs_xa Python package: 1.2.1.27471
- Bundled native XA API DLL: ProductVersion 1.7.14.27471 (the DLL shipped
inside the Python package)
- OS: Windows 11 Pro (build 10.0.26200)
- Connection: USB
- Controller:
- Serial numbers: 104465124 (main), 104465125 (X) and 104465126 (Y)
- Controller model: BBD302
- Controller FW: 1.1.12
- Stage model: MLS203
- Powered USB hub or direct connection: direct connection
What happens
- During the initial open of a device (TLMC_Open), the PC sometimes freezes
and reboots on its own.
- Our software installs a handler that writes a log file for normal program
crashes. For these events nothing is written — the machine goes down before
anything can be saved. To us this looks like a low-level/driver-level fault
rather than an error our program could catch or handle.
When it happens
- Only during connecting (opening the device).
- It has never happened while moving, homing, reading status, or closing a
device — only at the open step.
- It is intermittent: most of the time opening the two devices works fine and
the system runs for many minutes without trouble.
A possible pattern (not confirmed)
- It seems more likely on the first open right after the controller has been in
an unusual state — for example shortly after a previous session ended badly,
or after the controller was just powered on. In one case the API took about 23
seconds just to start up before the crash, which may suggest the USB connection
was already struggling at that moment.
Steps to reproduce (best effort)
- Connect stage controller over USB.
- Open both axis devices with TLMC_Open in the default operating mode.
- Repeat connect/disconnect cycles over a normal working session.
- Occasionally, an open step crashes and restarts the whole PC.
Questions
- Is this a known issue with TLMC_Open over USB on these controllers?
- Is there a recommended way to open devices more safely (for example a
different operating mode, a settling delay, or a health check before opening)?
- Any logs or diagnostic info you'd like us to collect to help track this down?
Hi team,
I encountered an issue where my PC crashed while developing my custom application using the thorlabs_xa Python package.
To debug, I used an AI assistant to analyze the logs and generate a detailed report. See below for details.
Summary
When our application opens a connection to a controller over USB (the TLMC_Open
call), the whole computer occasionally crashes and restarts — not just our
program. It does not happen every time; the same connection step usually works,
but every so often opening a device takes the entire PC down.
Environment
inside the Python package)
What happens
and reboots on its own.
crashes. For these events nothing is written — the machine goes down before
anything can be saved. To us this looks like a low-level/driver-level fault
rather than an error our program could catch or handle.
When it happens
device — only at the open step.
the system runs for many minutes without trouble.
A possible pattern (not confirmed)
an unusual state — for example shortly after a previous session ended badly,
or after the controller was just powered on. In one case the API took about 23
seconds just to start up before the crash, which may suggest the USB connection
was already struggling at that moment.
Steps to reproduce (best effort)
Questions
different operating mode, a settling delay, or a health check before opening)?