Bug#898239: XWindows Crash on Attaching Styled WebKit Browser Page to GTK Window

Timothy Barnes timothy at veratekdesign.com
Wed May 9 03:45:22 BST 2018


Package: python-gobject
Version: 3.22.0-2

I have discovered a repeatable crash in the python-gobject module when
using WebKit 3.0. This crash occurs when when styling a HTML page with
a background image and opening the page with WebKit in a GTK 3.0
window. The html page also contains a single blank html canvas.

I called the Python script like this:
python3 /home/pi/webkit_test/browser_viewer.py

This is the output:

** (webkit_seg_fault.py:10795): WARNING **: Error retrieving
accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
The name org.a11y.Bus was not provided by any .service files

(webkit_seg_fault.py:10795): Gdk-ERROR **: The program
'webkit_seg_fault.py' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 279 error_code 9 request_code 62 (core protocol)
minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap


This is the python file:

import gi
import sys
gi.require_version('Gtk', '3.0')
gi.require_version('WebKit', '3.0')
from gi.repository import Gtk, WebKit

class Window(Gtk.ApplicationWindow):
    def __init__(self, app):
        Gtk.Window.__init__(self, title="", application=app)
        self.browser = WebKit.WebView()
        self.browser.open("/home/pi/webkit_test/file.html")
        self.add(self.browser)

class Application(Gtk.Application):
    def __init__(self):
        Gtk.Application.__init__(self)

    def do_activate(self):
        window = Window(self)
        window.show_all()

app = Application()
exit_status = app.run(sys.argv)
sys.exit(exit_status)


This is the html file:

<html>
<head>
<style>
body {
    background-image: url("200x200.png");
}
</style>
</head>
<body>
<canvas width="401" height="1"></canvas>
</body>
</html>


The file 200x200.png is a a blank white image with a width and height
of 200px placed in the folder webkit_test with the HTML and Python
files.

Things I have noticed:
1. Removing the line "background-image: url("200x200.png");" from
file.html prevents the crash.
2. Changing the html canvas width from "401" to "400" prevents the crash.

System info:
Raspberry Pi 3 Model B+
Raspbian GNU/Linux 9
Python 3.5.3 (default, Jan 19 2017)
Kernel 4.14.34-v7+
libc-2.24

I have attached all necessary files to this email.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xwindows_crash_files.zip
Type: application/x-zip-compressed
Size: 1721 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20180508/0123b150/attachment.bin>


More information about the pkg-gnome-maintainers mailing list