[Bug] A failing export hangs the dialog forever instead of showing the error #708
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#708
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found from a user report — "hij hangt gewoon" (it just hangs) — during an export. The app sat at 0% CPU, sleeping: not rendering, waiting on something that never came.
Root cause.
_ExportDialogState._export()inlib/widgets/dialogs/export_dialog.darthad no error handling at all (notry/catchanywhere in the file). The method sets_loading = true, then callsSlideRasterizer.rasterize(...)andexportService.export(...). If either throws — aSlideRasterizerNoFrameExceptionframe-timeout, a write error, a fault in the PDF/PPTX assembly — the exception propagates out uncaught and the line that sets_loading = falseis never reached. The dialog stays on its "…samenstellen…" / "rendering…" phase text forever, with no message.The existing error path only covers a returned
ExportResult(success: false). A thrown exception bypasses the result object entirely.Reproduce (deterministic). Inject an
ExportServicewhoseexport()throws and export as HTML (HTML skips the rasterizer, so the throw lands straight in the dialog). The dialog freezes on the building-phase text; no error, no way forward but to close the window.Fix. Wrap the render+export body in
try/catch; on a caught exception, log it with its stack, clear_loading, and show the error (with the exception detail on its own line, since "export failed" alone leaves the user with nothing). Regression test drives the throwing-service path.Filed and fixed in the same session; PR closes this.