Bug 98497 - [GTK] Test /webkit2/WebKitPrintOperation/print-errors gives runtime critical warnings
Summary: [GTK] Test /webkit2/WebKitPrintOperation/print-errors gives runtime critical ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2012-10-05 01:38 PDT by Carlos Garcia Campos
Modified: 2012-10-05 08:46 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.48 KB, patch)
2012-10-05 01:42 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-10-05 01:38:41 PDT
GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed

This is because GTK+ tries to write in the io channel that has already been closed.
Comment 1 Carlos Garcia Campos 2012-10-05 01:42:11 PDT
Created attachment 167280 [details]
Patch
Comment 2 Martin Robinson 2012-10-05 08:22:05 PDT
Comment on attachment 167280 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=167280&action=review

Looks good, but please see below before landing...

> Source/WebKit2/ChangeLog:9
> +        The problem is that GTK+ tries to write in the io channel that ash
> +        already been closed.

Nit: IO channel that has

> Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:700
> +        cairo_surface_finish(surface);

Since this is a work-around for a GTK+ bug it's probably a good idea to put a comment here including  a URL to the GTK+ bug in question.
Comment 3 Carlos Garcia Campos 2012-10-05 08:29:15 PDT
(In reply to comment #2)
> (From update of attachment 167280 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167280&action=review
> 
> Looks good, but please see below before landing...
> 
> > Source/WebKit2/ChangeLog:9
> > +        The problem is that GTK+ tries to write in the io channel that ash
> > +        already been closed.
> 
> Nit: IO channel that has

Sure.

> > Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:700
> > +        cairo_surface_finish(surface);
> 
> Since this is a work-around for a GTK+ bug it's probably a good idea to put a comment here including  a URL to the GTK+ bug in question.

It's not exactly a workaround, it's a good idea to do that in any case even if there weren't bugs in GTK+, we are already doing it in WebPrintOperationGtkUnix::endPrint() and it's reason why it didn't fail for other printing errors.
Comment 4 Carlos Garcia Campos 2012-10-05 08:33:17 PDT
What I mean is that it would be useful to add links to the bugs there to remove the workaround when the bugs are fixed, but it's not the case, we want to finish the surface early even if the bugs are fixed.
Comment 5 Carlos Garcia Campos 2012-10-05 08:46:07 PDT
Committed r130509: <http://trac.webkit.org/changeset/130509>