Subject: | PATCH: allowing headless building of rpm for Fedora 20 / xvfb-run causing crashes |
I'm submitting Gtk3::Webkit to Fedora as an RPM. When building in a headless environment, make test will crash with a segfault.
testing t/webkit.t by itself produces the following results
<pre>
$ xvfb-run -a perl t/webkit.t
ok 1 - use Gtk3::WebKit;
ok 2 - An object of class 'Gtk3::WebKit::WebView' isa 'Gtk3::WebKit::WebView'
1..2
/usr/bin/xvfb-run: line 166: 9678 Segmentation fault DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
</pre>
it seems that the current Fedora 20 gtk webkit packages (details follow) require the following call, or they cause a segfault when exiting.
<pre>
Gtk3::WebKit::get_default_session();
</pre>
The attached patch provides this line to Gtk3::Webkit. The gtkwebkit packages details are;
<pre>
$ rpm -q webkitgtk3-devel-2.2.5-1.fc20.x86_64 --info
Name : webkitgtk3-devel
Version : 2.2.5
Release : 1.fc20
Architecture: x86_64
Install Date: Tue 25 Feb 2014 09:48:56 PM EST
Group : Development/Libraries
Size : 5281017
License : LGPLv2+ and BSD
Signature : RSA/SHA256, Fri 21 Feb 2014 04:38:32 AM EST, Key ID 2eb161fa246110c1
Source RPM : webkitgtk3-2.2.5-1.fc20.src.rpm
Build Date : Wed 19 Feb 2014 09:40:15 PM EST
Build Host : buildvm-13.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : http://www.webkitgtk.org/
Summary : Development files for webkitgtk3
Description :
The webkitgtk3-devel package contains libraries, build data, and header
files for developing applications that use webkitgtk3.
</pre>
Subject: | webkit_xvfb_segfault.patch |
diff -Naur old/t/webkit.t new/t/webkit.t
--- t/webkit.t 2013-04-16 06:10:44.000000000 +1000
+++ t/webkit.t 2014-02-28 18:52:35.679550175 +1100
@@ -19,6 +19,7 @@
sub main {
my $view = Gtk3::WebKit::WebView->new();
isa_ok($view, 'Gtk3::WebKit::WebView');
+ my $session = Gtk3::WebKit::get_default_session();
return 0;
}