Files
OrcaSlicer/tests
HanifKoh 9199df0811 Fix a Crash at Exit When an Earlier Python Thread Wait Timed Out (#17437)
join_non_daemon_threads() runs the threading exit hooks on a daemon thread and
gives up on it at the deadline. A later call started a new hook thread and
returned 0 without waiting for the old one, so shutdown() could run Py_Finalize
while the old thread was still running the hooks. Python then stops that daemon
thread when it reaches for the GIL; it unwinds through the hook lambda and
releases a Python list without the GIL while finalization's garbage collection
walks it, which crashes the process.

A call now first waits, within its deadline, for a hook thread an earlier call
left running, and counts it as still running if it does not end, so shutdown()
leaves the interpreter unfinalized instead.

This was the intermittent segfault at exit of the "ends idle
concurrent.futures workers" test, which calls the function more than once. The
app calls it once, from shutdown().
2026-11-10 16:02:22 +08:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.