Files
OrcaSlicer/src/slic3r/GUI
ExPikaPaka 19b8d2138e Stop the slicer before freeing what it is still reading
Loading an undo snapshot deletes every PartPlate, and the slicing thread keeps
dereferencing its current plate and the status callback that captured it on every
progress tick. Nothing stopped the process first, and Ctrl+Z does not go through
can_undo() at all. undo_redo_to() now stops it, which is what the cancel button
and the project reset already do. The cost is that undo during a slice waits for
the next cancellation checkpoint, exactly like pressing Cancel.

priv::reset() deleted the plates, and with them the Print and the GCodeResult,
five lines before stopping the process, so the stop then ran on a freed Print.

can_delete_plate() was missing the slicing guard its neighbour can_add_plate()
has, and delete_plate() destroys the Print the worker is slicing. The grabber in
the 3D scene does not go through the menu check, so the stop is in delete_plate()
as well.

OnEditingDone runs from ~wxDataViewCtrl while ~Plater is already running, where
the Plater pointer is not null but the object behind it is gone, so a null check
cannot catch it. It uses the shutdown flag the file already checks elsewhere.

PrintBase::m_status_callback was a bare std::function reassigned by the UI thread
while the worker invoked it, on the common path rather than a rare one: the
callback is reinstalled on the running Print on every background process update.
It is now assigned under a mutex and invoked as a copy with the lock released, so
a callback that blocks cannot deadlock against the assignment. The shared
timestamp counter is incremented under a different mutex per Print, and Orca
keeps one Print per plate, which is what the FIXME above it anticipated.

The plate drops its status callback where both it and the Print are still alive.
The destructor cannot do it: delete_plate() destroys the Print first.
2026-10-01 09:15:48 +02:00
..
2026-10-01 12:40:33 +08:00
…
…
2026-09-18 19:07:03 +08:00
2026-09-18 19:07:03 +08:00
2026-09-27 16:58:10 +03:00
2026-08-21 18:36:30 +08:00
2026-06-07 13:12:51 +08:00
2026-07-18 03:15:11 +08:00
…
2026-08-31 18:01:15 +08:00
2026-08-31 18:01:15 +08:00
2026-08-31 18:01:15 +08:00
2026-08-23 22:11:49 +08:00
2026-06-18 09:13:51 -03:00
2026-09-18 19:07:03 +08:00
2026-09-18 19:07:03 +08:00
2026-09-27 16:58:10 +03:00
…
2026-07-24 09:41:24 -03:00
…
2026-08-23 22:11:48 +08:00
2026-09-11 15:46:20 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2026-06-18 09:13:51 -03:00
2026-09-18 15:59:00 +08:00
2026-07-02 17:49:36 +08:00
2026-07-02 17:49:36 +08:00
2026-08-23 22:11:48 +08:00
…