[cairo] BUG: Cairo reports CAIRO_STATUS_SUCCESS even if writing to disk failed (SVG and PS backend)
Knut Petersen
knupero at gmail.com
Fri Jul 23 13:28:15 UTC 2021
Hi Uli
> "Fail" here means "does not report an error, even though it should", right?
Yes, exactly. It should report an error (as the pdf backend does).
>
> Are you calling something like
> cairo_surface_finish(cairo_get_target(cr)) before the above? I think
> that most of these file-output-backends only actually write the output
> when the surface is finished. Before that, no errors could occur yet.
The test reliably fails to report the obvious error it it is placed after a cairo_show_page (cr), and it also fails if it placed after a cairo_surface_finish(sur).
AFAICS it's cairo_show_page that triggers the actual writing to disk, so the test should be at the right place.
After those calls there is only cairo_surface_destroy (sur) and cairo_destroy (cr), definitely not the right place to test the status ;-)
Knut
More information about the cairo
mailing list