Session restore not working in 2.5.1?
Pavel Sanda
sanda at lyx.org
Wed Jun 3 08:47:54 UTC 2026
On Tue, May 12, 2026 at 06:15:56PM +0200, Pavel Sanda wrote:
> The fix is straightforward: have the new LFUN_LYX_QUIT path call writeSession() (and probably preserve the closing_ / lastOpened().clear() semantics) before
> tearing down work areas - e.g. call writeSession() on each view right before closeBufferAll(), or move the session-write logic into closeBufferAll() itself.
The fix is not that straightforward and gets uncomfortably long if we want to
preserve bunch of other stuff which we did before at the end of session before
(save ui settings, fullscreen toggle, original order of buffer closings, etc.)
Koji, could you test on the macos claude's theory why(*) the crash happened in
the first place, see the patch below - is it still crashing on mac this way?
Maybe we could avoid escalating the fix-of-fix-of-fix scenario...
Pavel
(*) close() is invoked synchronously from inside a QAction slot - Qt has to
tear down NSWindow / NSMenu state while the QAction-triggered invocation is
still on the stack. macOS Tahoe / Qt 6 might not tolerate that anymore.
QTimer::singleShot will defer to the next event-loop iteration.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_macos_crash.diff
Type: text/x-diff
Size: 1757 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20260603/e24a47f6/attachment.bin>
More information about the lyx-devel
mailing list