Repository navigation
Conversation
P0 lifecycle checkpoint — exact-head candidate ready for physical Windows verificationExact PR head: Automated validation is now green:
Release-candidate artifact:
PR remains draft until one real-PC verification against the originally reported symptom: start packaged Studio, close it normally, confirm |
Exact-head lifecycle checkpointCandidate head: Validation completed on this exact head:
Windows candidate artifact:
PR remains draft until one real Windows/board session confirms the reported field failure mode is gone: close Studio while a real session is active, confirm |
Critical defect
Closing the Studio window can leave
ARStackStudio.exeresident on Windows. The stale process retains single-instance/session ownership so the next launch appears to do nothing.This violates the repository lifecycle contract in
AGENTS.md: stop new work, cancel/retire timers and callbacks, join workers, release handles, and never leave teardown unbounded.Root cause
Shutdown authority was fragmented:
StudioDeviceControllerowned a separateaboutToQuithook;FirmwareManagerowned another quit hook;SmartSessionControllerhad no explicit teardown boundary;DeviceControllerandFirmwareManagerusedQt::BlockingQueuedConnectionplus unboundedQThread::wait()during destruction.That makes Windows process exit depend on QObject/QML destruction order after the GUI event loop is already ending.
Fix
SmartSessionController::shutdown()to stop discovery/reconnect/profile-sync/handoff/recovery callback owners first.DeviceController::shutdown()that requests worker-side STOP/serial close, waits for acknowledgement with a deadline, then performs bounded QThread retirement.FirmwareManager/FirmwareWorker.StudioDeviceControllerapp-quit hook.main.cppthe single shutdown coordinator while worker event loops are still alive: supervisor -> serial worker -> firmware worker.Permanent regression gate
Adds
ARStack Studio Windows LifecycleCI. It builds the actual Studio GUI executable on Windows and performs two consecutive cycles:--check-app-lifecycle;This directly proves the reported failure mode:
close -> process exit -> lock release -> immediate reopen.Isolation
No embedded firmware, PTP engine, or
apps/ied_simulator/**source is changed.Merge gate
Keep draft until exact-head Windows lifecycle, existing Studio Qt, S8A/S8B ownership, and repository CI are green. Then validate one packaged Windows build manually against Task Manager before merge/release.