Orca pipeline
12 results today 24 agents on 1 worker Admin

Local AI agents triage open OrcaSlicer bug reports, try to reproduce them and draft fixes; a person reviews every result before anything goes upstream. An independent experiment, read only.

Queue / #18184

#18184New

Windows UI deadlock after a Python printer agent starts a print

Agent answer

Triage: skipped (cannot reproduce on this machine).

The thread-safety defect is genuine and source-confirmed: the print-status callback runs on the worker/network thread and calls ctl.clear_percent() (PrintJob.cpp:485) and ctl.show_error_info() (PrintJob.cpp:712, SendJob.cpp:410). Those go straight to the ProgressIndicator (BoostThreadWorker.hpp:143/150) and on to wx widget methods such as m_cancelbutton->Hide() (BBLStatusBarPrint.cpp:190), rather than being marshalled through the existing call_on_main_thread queue.

However the reported freeze cannot be reproduced here: it requires (1) an external Python printer agent (U1 Control 0.31.1) holding the Python GIL, (2) a Snapmaker U1 reachable over LAN/Moonraker, and (3) a Windows-specific circular wait between the UI thread (waiting on the GIL) and the worker (blocked in NtUserShowWindow). This headless Linux container has no printer, no network printer devices, no printer agent, and no Windows UI/GIL path, so the hang is not reproducible on Linux with the app, CLI, or a unit test. The fix itself (route clear_percent, show_error_info, and update_print_error_info onto the main-thread worker queue) is platform-agnostic and worth doing, but this is a Windows + hardware/agent-dependent bug for triage purposes.

Cause

Cross-thread UI calls: BoostThreadWorker::clear_percent()/show_error_info() (BoostThreadWorker.hpp:143,150) invoke the ProgressIndicator directly from the worker thread, reaching wx widget calls (e.g. BBLStatusBarPrint::clear_percent() m_cancelbutton->Hide() at BBLStatusBarPrint.cpp:190) from PrintJob.cpp:485 / SendJob.cpp:410 and update_print_error_info() from PrintJob.cpp:507-513, instead of queueing via call_on_main_thread.

Triage summary

Windows UI/GIL deadlock: a worker-thread print-status callback calls wx widget methods (clear_percent/show_error_info) directly, contending with the UI thread that is waiting on the Python GIL.

Issue text on GitHub

Is this issue reproducible in the latest nightly build?

  • [x] I have checked the latest nightly build and the issue is still reproducible

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

OrcaSlicer Version

2.6.0-dev build 973eff5c70 Locally built Windows clang-cl/Ninja build, based on upstream main and including additional local U1-related changes. This is not an official nightly build.

Regression compared to a previous version

Unknown. I began noticing the freeze in recent builds, particularly after sending multiple jobs during one OrcaSlicer session. The relevant worker-thread UI call predates these builds; I have not identified a specific regression or a last known-good version.

Operating System (OS)

Windows

OS Version

Windows 11, 64-bit, build 26300

Additional system information

CPU: Intel Core i7-8700K
Memory: 32 GB
OrcaSlicer: local Release build with clang-cl and Ninja
Python printer agent: U1 Control 0.31.1
Printer connection: LAN / Moonraker

Printer

Snapmaker U1, connected over LAN using the U1 Control Python printer agent, version 0.31.1.

How to reproduce

  1. On Windows, enable “Use printer agents instead of print hosts.”
  2. Configure a Snapmaker U1 with the U1 Control Python printer agent.
  3. Slice and send a job to the printer using OrcaSlicer’s Print dialog.
  4. Once the printer is available again, slice and send another job in the same OrcaSlicer session.
  5. Intermittently, after the printer starts the second job, the “Send print job” dialog stops responding at 75%. OrcaSlicer remains unresponsive.

The multiple-job sequence is an observation, not a guaranteed minimal reproducer. The printer had already received and started the job when the captured hang occurred.

Actual results

Gui Freezes stuck on the "Sending" screen - OrcaSlicer eventually needs to be killed and restarted to free

image

Expected results

Job finishes successfully and continues

Project file & Debug log uploads

The application froze rather than exiting, so the diagnostic evidence is a manually captured process dump and debugger thread stacks.

A full memory dump can be privately provided if requested

Checklist of files to include

  • [ ] Log file
  • [ ] Project file

Anything else?

A Windows debugger capture of the hung process shows the following wait cycle:

UI thread:
SelectMachineDialog::on_timer
→ DeviceManager::get_my_machine
→ DeviceManager::get_current_printer_agent_id
→ PyPrinterAgentPluginCapabilityTrampoline::get_agent_info
→ Python take_gil: waiting for the Python GIL

Print worker:
Python printer-agent start_local_print
→ Python invokes Orca’s print-status callback
→ PrintJob’s PrintingStageFinished handling
→ ctl.clear_percent()
→ progress indicator hides the Cancel button
→ wxWindow::Show / NtUserShowWindow

The worker is in a Windows UI operation from the background thread while the UI thread waits for the Python GIL. This is consistent with a cross-thread UI/GIL deadlock. The job had already been started on the printer; Orca never reached the “print_job: send ok” log entry for that job.

The relevant current source locations are:

  • src/slic3r/GUI/Jobs/PrintJob.cpp: PrintingStageFinished callback calls ctl.clear_percent()
  • src/slic3r/GUI/Jobs/BoostThreadWorker.hpp: clear_percent() directly calls the progress indicator
  • src/slic3r/GUI/BBLStatusBarPrint.cpp: clear_percent() hides the Cancel button

A small local patch queues clear_percent() on the existing main-thread worker queue without synchronously waiting. Its runtime result has not yet been established.

Separately, source inspection found that printer-agent error callbacks in PrintJob.cpp and SendJob.cpp can call update_print_error_info() from a worker thread, and the later show_error_info() path also directly updates UI controls from the worker. These are potential related thread-safety issues; they were not the cause demonstrated by this dump.

The debugger reported that it could not verify checksums for python312.dll and OrcaSlicer.dll; symbols nevertheless resolved to the functions shown above.

Area
gui
Platform
windows
Author
Desterly
Comments
0
Created
2026-12-05
bug

Log

  1. New
    owner · 1 h ago
  2. triage: skipped
    vast-tw · 1 h ago
  3. vast-tw took it: triage
    vast-tw · 1 h ago
  4. Collected from GitHub
    panel · 3 h ago