Files
create/src/App
Furgo b571889ab5 App: Handle uncleared Python exceptions during object restoration
When a Python-based object throws an exception during the restoration
process (e.g. inside `onDocumentRestored`), the error is caught by a
generic `catch(...)` block in `Document::afterRestore`.

Previously, this block swallowed the C++ exception wrapper but failed to
clear the underlying Python error state. Leaving the interpreter in this
"dirty" state caused a segmentation fault or `SystemError` later in the
loading process when C++ attempted to interact with the Python API
(specifically in `App::Application::setActiveDocument`).

This commit adds a check for `PyErr_Occurred()` inside the catch block.
If an error is detected, the traceback is printed to the console for
debugging, and `PyErr_Clear()` is called to reset the interpreter state,
allowing the application to continue loading the document without
crashing.
2025-11-24 17:26:46 +01:00
..
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2025-02-17 21:10:26 +01:00
2025-03-18 15:59:22 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2025-08-08 17:11:51 +02:00
2024-11-21 21:17:42 +01:00
2024-11-21 07:54:24 +01:00
2025-05-15 10:59:48 -05:00
2024-11-21 21:17:42 +01:00
2024-11-21 07:54:24 +01:00
2025-04-22 13:42:50 +02:00
2025-05-15 10:59:48 -05:00
2025-01-02 13:24:57 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2025-11-02 17:38:06 +01:00
2024-11-21 21:17:42 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00
2024-11-21 07:54:24 +01:00