<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>122801</bug_id>
          
          <creation_ts>2013-10-14 18:08:45 -0700</creation_ts>
          <short_desc>[GTK] [WebKit2] Crash when printing to a file via javascript</short_desc>
          <delta_ts>2013-11-11 00:22:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://people.igalia.com/clopez/print_test.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gustavo</cc>
    
    <cc>ltilve</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>939770</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2013-10-14 18:08:45 -0700</bug_when>
    <thetext>On a print dialog created by the javascript method &quot;window.print();&quot; if you click on &quot;print to file&quot; a segmentation fault happens.


How to reproduce?

1. Load the following url: http://people.igalia.com/clopez/print_test.html
2. Click on the button &quot;print this page&quot;
3. On the print dialog click on &quot;print to file&quot;
4. Crash.

I was able to reproduce the crash both with webkitgtk-2.0.4 and webkitgtk-2.2.0

Is interesting to note that if the print dialog is launched manually by pressing CTRL+p (on epiphany for example) the crash don&apos;t happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>939774</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2013-10-14 18:12:12 -0700</bug_when>
    <thetext>This is the stack trace with the MiniBrowser and WebkitGTK compiled from sources (webkitgtk-2.2.0.tar.xz tarball) on Debian/testing AMD64.


$ ./Programs/MiniBrowser http://people.igalia.com/clopez/print_test.html

** (MiniBrowser:25015): WARNING **: GDBus.Error:org.freedesktop.DBus.Error.Spawn.FileInvalid: Cannot do system-bus activation with no user

Segmentation fault (core dumped)


$ gdb -ex &quot;thread apply all bt&quot; --batch ./Programs/MiniBrowser core
[New LWP 25015]
[New LWP 25069]
[New LWP 25053]
[New LWP 25052]
[New LWP 25051]
[New LWP 25201]
[New LWP 25050]
[New LWP 25202]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need &quot;set solib-search-path&quot; or &quot;set sysroot&quot;?
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffb918a000
Core was generated by `./Programs/MiniBrowser http://people.igalia.com/clopez/print_test.html&apos;.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f981463b7f0 in gtk_print_settings_get () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0

Thread 8 (Thread 0x7f979b5ea700 (LWP 25202)):
#0  0x00007f98121e21bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f981291f1fc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9812ef1526 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f9812942f35 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#6  0x00007f98124b9e0e in start_thread (arg=0x7f979b5ea700) at pthread_create.c:311
#7  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 7 (Thread 0x7f9804045700 (LWP 25050)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f9811de57fd in WTF::TCMalloc_PageHeap::scavengerThread() () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#2  0x00007f9811de5829 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#3  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#4  0x00007f98124b9e0e in start_thread (arg=0x7f9804045700) at pthread_create.c:311
#5  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 6 (Thread 0x7f979bdeb700 (LWP 25201)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f981295eb45 in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f98128f4b71 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f98128f51ba in g_async_queue_timeout_pop () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f9812943732 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f9812942f35 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#7  0x00007f98124b9e0e in start_thread (arg=0x7f979bdeb700) at pthread_create.c:311
#8  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7f97c3736700 (LWP 25051)):
#0  0x00007f98121e21bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f981291f1fc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9811dfd0b1 in WTF::wtfThreadEntryPoint(void*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#4  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#5  0x00007f98124b9e0e in start_thread (arg=0x7f97c3736700) at pthread_create.c:311
#6  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f97c21a2700 (LWP 25052)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f981639f91b in WebCore::IconDatabase::syncThreadMainLoop() () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#2  0x00007f98163a08ad in WebCore::IconDatabase::iconDatabaseSyncThread() () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#3  0x00007f9811dfd0b1 in WTF::wtfThreadEntryPoint(void*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#4  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#5  0x00007f98124b9e0e in start_thread (arg=0x7f97c21a2700) at pthread_create.c:311
#6  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f97c19a1700 (LWP 25053)):
#0  0x00007f98121e21bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f981291f1fc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9811dfd0b1 in WTF::wtfThreadEntryPoint(void*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#4  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#5  0x00007f98124b9e0e in start_thread (arg=0x7f97c19a1700) at pthread_create.c:311
#6  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f97c0dd7700 (LWP 25069)):
#0  0x00007f98121e21bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f981291f1fc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9811dfd0b1 in WTF::wtfThreadEntryPoint(void*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libjavascriptcoregtk-3.0.so.0
#4  0x00007f980f3b4124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#5  0x00007f98124b9e0e in start_thread (arg=0x7f97c0dd7700) at pthread_create.c:311
#6  0x00007f98121ed95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f9817c04a00 (LWP 25015)):
#0  0x00007f981463b7f0 in gtk_print_settings_get () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#1  0x00007f97c03cc0c0 in ?? () from /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/printbackends/libprintbackend-file.so
#2  0x00007f97c03cc4ce in ?? () from /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/printbackends/libprintbackend-file.so
#3  0x00007f981474e3e8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#4  0x00007f9812be28e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007f9812bfb2b6 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6  0x00007f9812bfbf82 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007f98146fe52c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007f9814702aa8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007f98145f93be in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#10 0x00007f9812be28e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007f9812bfb2b6 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007f9812bfbf82 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007f9814719664 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007f98145f76bc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00007f98145f8fa5 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#16 0x00007f9814233e12 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#17 0x00007f981291ef25 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f981291f268 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f98145887f0 in gtk_dialog_run () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#21 0x00007f9815cf7e89 in webkitPrintOperationRunDialogForFrame(_WebKitPrintOperation*, _GtkWindow*, WebKit::WebFrameProxy*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#22 0x00007f9815d0bab0 in webkitWebViewPrintFrame(_WebKitWebView*, WebKit::WebFrameProxy*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#23 0x00007f9815d6a34e in WebKit::WebPageProxy::printFrame(unsigned long) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#24 0x00007f9815e29ab6 in WebKit::WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;, WTF::OwnPtr&lt;CoreIPC::MessageEncoder&gt;&amp;) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#25 0x00007f9816f6e7ea in CoreIPC::MessageReceiverMap::dispatchSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;, WTF::OwnPtr&lt;CoreIPC::MessageEncoder&gt;&amp;) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#26 0x00007f9815d8a399 in WebKit::WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;, WTF::OwnPtr&lt;CoreIPC::MessageEncoder&gt;&amp;) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#27 0x00007f9816f6836d in CoreIPC::Connection::dispatchSyncMessage(CoreIPC::MessageDecoder&amp;) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#28 0x00007f9816f684d5 in CoreIPC::Connection::dispatchMessage(WTF::PassOwnPtr&lt;CoreIPC::MessageDecoder&gt;) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#29 0x00007f9816f685c4 in CoreIPC::Connection::dispatchOneMessage() () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#30 0x00007f9816e50cb9 in WebCore::RunLoop::performWork() () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#31 0x00007f9816e6bc89 in WebCore::RunLoop::queueWork(WebCore::RunLoop*) () from /stuff/webkit/builds/webkitgtk-2.2.0/.libs/libwebkit2gtk-3.0.so.25
#32 0x00007f981291ef25 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f981291f268 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f981291f6da in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f98145f845d in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#36 0x0000000000407641 in main ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>939911</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2013-10-15 03:24:47 -0700</bug_when>
    <thetext>Just tested to build nightly webkit (r157444) and it happens the same bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>940740</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2013-10-17 05:37:59 -0700</bug_when>
    <thetext>This is the backtrace log of MiniBrowser on r157567 with debugsymbols:


$ ./WebKitBuild/Debug/Programs/MiniBrowser http://people.igalia.com/clopez/print_test.html

** (MiniBrowser:4287): WARNING **: GDBus.Error:org.freedesktop.DBus.Error.Spawn.FileInvalid: Cannot do system-bus activation with no user

Segmentation fault (core dumped)
LEAK: 11 RenderObject
LEAK: 1 Page
LEAK: 1 Frame
LEAK: 1 CachedResource
LEAK: 19 WebCoreNode
LEAK: 1 JSLazyEventListener
LEAK: 1 WebPage
LEAK: 1 WebFrame



$ gdb -ex &quot;thread apply all bt&quot; --batch ./WebKitBuild/Debug/Programs/MiniBrowser core
[New LWP 4287]
[New LWP 4324]
[New LWP 4460]
[New LWP 4322]
[New LWP 4323]
[New LWP 4461]
[New LWP 4376]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need &quot;set solib-search-path&quot; or &quot;set sysroot&quot;?
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff157fe000
Core was generated by `./WebKitBuild/Debug/Programs/MiniBrowser http://people.igalia.com/clopez/print_&apos;.
Program terminated with signal 11, Segmentation fault.
#0  gtk_print_settings_get (settings=settings@entry=0x0, key=key@entry=0x7fba908febe9 &quot;output-basename&quot;) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkprintsettings.c:174
174	/tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkprintsettings.c: No such file or directory.

Thread 7 (Thread 0x7fba924c2700 (LWP 4376)):
#0  0x00007fbae6ee51bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fbae76221fc in g_main_context_poll (n_fds=3, fds=0x7fba70001100, timeout=-1, context=0x1952c80, priority=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3995
#2  g_main_context_iterate (context=0x1952c80, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3696
#3  0x00007fbae76226da in g_main_loop_run (loop=0x18fd7c0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#4  0x00007fbaed9c5afe in WorkQueue::workQueueThreadBody (this=0x19106f0) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:173
#5  0x00007fbaed9c5ad8 in WorkQueue::startWorkQueueThread (workQueue=0x19106f0) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:168
#6  0x00007fbae67ad6c9 in WTF::threadEntryPoint (contextData=0x1952d40) at ../../Source/WTF/wtf/Threading.cpp:69
#7  0x00007fbae67adc56 in WTF::wtfThreadEntryPoint (param=0x1771fc0) at ../../Source/WTF/wtf/ThreadingPthreads.cpp:195
#8  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#9  0x00007fbae71bce0e in start_thread (arg=0x7fba924c2700) at pthread_create.c:311
#10 0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 6 (Thread 0x7fba748fc700 (LWP 4461)):
#0  0x00007fbae6ee51bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fbae76221fc in g_main_context_poll (n_fds=3, fds=0x7fba6c0010e0, timeout=-1, context=0x7fba68023160, priority=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3995
#2  g_main_context_iterate (context=0x7fba68023160, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3696
#3  0x00007fbae76226da in g_main_loop_run (loop=0x7fba68022e70) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#4  0x00007fbae7bf4526 in gdbus_shared_thread_func (user_data=0x7fba68023130) at /tmp/buildd/glib2.0-2.36.1/./gio/gdbusprivate.c:278
#5  0x00007fbae7645f35 in g_thread_proxy (data=0x7fba68003590) at /tmp/buildd/glib2.0-2.36.1/./glib/gthread.c:798
#6  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#7  0x00007fbae71bce0e in start_thread (arg=0x7fba748fc700) at pthread_create.c:311
#8  0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7fba93fff700 (LWP 4323)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fbae67ae3e2 in WTF::ThreadCondition::wait (this=0x179aa80, mutex=...) at ../../Source/WTF/wtf/ThreadingPthreads.cpp:378
#2  0x00007fbaecaaf5fa in WebCore::IconDatabase::syncThreadMainLoop (this=0x179a9c0) at ../../Source/WebCore/loader/icon/IconDatabase.cpp:1454
#3  0x00007fbaecaad9e5 in WebCore::IconDatabase::iconDatabaseSyncThread (this=0x179a9c0) at ../../Source/WebCore/loader/icon/IconDatabase.cpp:1054
#4  0x00007fbaecaad62e in WebCore::IconDatabase::iconDatabaseSyncThreadStart (vIconDatabase=0x179a9c0) at ../../Source/WebCore/loader/icon/IconDatabase.cpp:975
#5  0x00007fbae67ad6c9 in WTF::threadEntryPoint (contextData=0x17a9b80) at ../../Source/WTF/wtf/Threading.cpp:69
#6  0x00007fbae67adc56 in WTF::wtfThreadEntryPoint (param=0x179a230) at ../../Source/WTF/wtf/ThreadingPthreads.cpp:195
#7  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#8  0x00007fbae71bce0e in start_thread (arg=0x7fba93fff700) at pthread_create.c:311
#9  0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7fba99833700 (LWP 4322)):
#0  0x00007fbae6ee51bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fbae76221fc in g_main_context_poll (n_fds=1, fds=0x7fba94001120, timeout=-1, context=0x17917d0, priority=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3995
#2  g_main_context_iterate (context=0x17917d0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3696
#3  0x00007fbae76226da in g_main_loop_run (loop=0x176da20) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#4  0x00007fbaed9c5afe in WorkQueue::workQueueThreadBody (this=0x1791700) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:173
#5  0x00007fbaed9c5ad8 in WorkQueue::startWorkQueueThread (workQueue=0x1791700) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:168
#6  0x00007fbae67ad6c9 in WTF::threadEntryPoint (contextData=0x1791900) at ../../Source/WTF/wtf/Threading.cpp:69
#7  0x00007fbae67adc56 in WTF::wtfThreadEntryPoint (param=0x1778770) at ../../Source/WTF/wtf/ThreadingPthreads.cpp:195
#8  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#9  0x00007fbae71bce0e in start_thread (arg=0x7fba99833700) at pthread_create.c:311
#10 0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7fba750fd700 (LWP 4460)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007fbae7661b45 in g_cond_wait_until (cond=cond@entry=0x1989f88, mutex=mutex@entry=0x1989f80, end_time=end_time@entry=239890738236) at /tmp/buildd/glib2.0-2.36.1/./glib/gthread-posix.c:865
#2  0x00007fbae75f7b71 in g_async_queue_pop_intern_unlocked (queue=queue@entry=0x1989f80, wait=wait@entry=1, end_time=end_time@entry=239890738236) at /tmp/buildd/glib2.0-2.36.1/./glib/gasyncqueue.c:424
#3  0x00007fbae75f81ba in g_async_queue_timeout_pop (queue=0x1989f80, timeout=timeout@entry=15000000) at /tmp/buildd/glib2.0-2.36.1/./glib/gasyncqueue.c:545
#4  0x00007fbae7646732 in g_thread_pool_wait_for_new_pool () at /tmp/buildd/glib2.0-2.36.1/./glib/gthreadpool.c:169
#5  g_thread_pool_thread_proxy (data=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gthreadpool.c:366
#6  0x00007fbae7645f35 in g_thread_proxy (data=0x1a75ca0) at /tmp/buildd/glib2.0-2.36.1/./glib/gthread.c:798
#7  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#8  0x00007fbae71bce0e in start_thread (arg=0x7fba750fd700) at pthread_create.c:311
#9  0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7fba937fe700 (LWP 4324)):
#0  0x00007fbae6ee51bd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fbae76221fc in g_main_context_poll (n_fds=1, fds=0x7fba84001100, timeout=-1, context=0x179b570, priority=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3995
#2  g_main_context_iterate (context=0x179b570, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3696
#3  0x00007fbae76226da in g_main_loop_run (loop=0x179a320) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#4  0x00007fbaed9c5afe in WorkQueue::workQueueThreadBody (this=0x179b4a0) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:173
#5  0x00007fbaed9c5ad8 in WorkQueue::startWorkQueueThread (workQueue=0x179b4a0) at ../../Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp:168
#6  0x00007fbae67ad6c9 in WTF::threadEntryPoint (contextData=0x17a9bd0) at ../../Source/WTF/wtf/Threading.cpp:69
#7  0x00007fbae67adc56 in WTF::wtfThreadEntryPoint (param=0x179a8a0) at ../../Source/WTF/wtf/ThreadingPthreads.cpp:195
#8  0x00007fbae36ea124 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#9  0x00007fbae71bce0e in start_thread (arg=0x7fba937fe700) at pthread_create.c:311
#10 0x00007fbae6ef095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7fbaf1192a00 (LWP 4287)):
#0  gtk_print_settings_get (settings=settings@entry=0x0, key=key@entry=0x7fba908febe9 &quot;output-basename&quot;) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkprintsettings.c:174
#1  0x00007fba908fe0c0 in output_file_from_settings (settings=settings@entry=0x0, default_format=&lt;optimized out&gt;) at /tmp/buildd/gtk+3.0-3.8.5/./modules/printbackends/file/gtkprintbackendfile.c:247
#2  0x00007fba908fe4ce in file_printer_get_options (printer=0x1a3a640, settings=0x0, page_setup=&lt;optimized out&gt;, capabilities=&lt;optimized out&gt;) at /tmp/buildd/gtk+3.0-3.8.5/./modules/printbackends/file/gtkprintbackendfile.c:723
#3  0x00007fbae94513e8 in selected_printer_changed (selection=&lt;optimized out&gt;, dialog=0x1994040) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkprintunixdialog.c:1961
#4  0x00007fbae78e58e7 in _g_closure_invoke_va (closure=0x19ac880, return_value=0x0, instance=0x19ab450, args=0x7fff157fa048, n_params=0, param_types=0x0) at /tmp/buildd/glib2.0-2.36.1/./gobject/gclosure.c:840
#5  0x00007fbae78fe2b6 in g_signal_emit_valist (instance=0x19ab450, signal_id=&lt;optimized out&gt;, detail=0, var_args=var_args@entry=0x7fff157fa048) at /tmp/buildd/glib2.0-2.36.1/./gobject/gsignal.c:3234
#6  0x00007fbae78fef82 in g_signal_emit (instance=&lt;optimized out&gt;, signal_id=&lt;optimized out&gt;, detail=detail@entry=0) at /tmp/buildd/glib2.0-2.36.1/./gobject/gsignal.c:3384
#7  0x00007fbae93ed07f in _gtk_tree_selection_internal_select_node (selection=&lt;optimized out&gt;, node=&lt;optimized out&gt;, tree=&lt;optimized out&gt;, path=path@entry=0x1d15820, mode=&lt;optimized out&gt;, override_browse_mode=override_browse_mode@entry=0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtktreeselection.c:1604
#8  0x00007fbae940152c in gtk_tree_view_real_set_cursor (tree_view=tree_view@entry=0x19ae280, path=path@entry=0x1d15820, flags=flags@entry=(CLEAR_AND_SELECT | CLAMP_NODE)) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtktreeview.c:13208
#9  0x00007fbae9405aa8 in gtk_tree_view_button_press (widget=0x19ae280, event=0x1d3f0a0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtktreeview.c:3127
#10 0x00007fbae92fc3be in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x173ba80, return_value=0x7fff157fa3a0, instance=&lt;optimized out&gt;, args=&lt;optimized out&gt;, marshal_data=&lt;optimized out&gt;, n_params=&lt;optimized out&gt;, param_types=0x173bab0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkmarshalers.c:130
#11 0x00007fbae78e58e7 in _g_closure_invoke_va (closure=0x173ba80, return_value=0x7fff157fa3a0, instance=0x19ae280, args=0x7fff157fa568, n_params=1, param_types=0x173bab0) at /tmp/buildd/glib2.0-2.36.1/./gobject/gclosure.c:840
#12 0x00007fbae78fe2b6 in g_signal_emit_valist (instance=0x19ae280, signal_id=&lt;optimized out&gt;, detail=0, var_args=var_args@entry=0x7fff157fa568) at /tmp/buildd/glib2.0-2.36.1/./gobject/gsignal.c:3234
#13 0x00007fbae78fef82 in g_signal_emit (instance=instance@entry=0x19ae280, signal_id=&lt;optimized out&gt;, detail=detail@entry=0) at /tmp/buildd/glib2.0-2.36.1/./gobject/gsignal.c:3384
#14 0x00007fbae941c664 in gtk_widget_event_internal (widget=widget@entry=0x19ae280, event=event@entry=0x1d3f0a0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkwidget.c:6722
#15 0x00007fbae941c939 in gtk_widget_event (widget=widget@entry=0x19ae280, event=event@entry=0x1d3f0a0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkwidget.c:6379
#16 0x00007fbae92fa6bc in propagate_event_up (topmost=&lt;optimized out&gt;, event=&lt;optimized out&gt;, widget=0x19ae280) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkmain.c:2403
#17 propagate_event (widget=&lt;optimized out&gt;, event=0x1d3f0a0, captured=&lt;optimized out&gt;, topmost=0x0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkmain.c:2511
#18 0x00007fbae92fbfa5 in gtk_main_do_event (event=0x1d3f0a0) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkmain.c:1716
#19 0x00007fbae8f36e12 in gdk_event_source_dispatch (source=source@entry=0x178a380, callback=&lt;optimized out&gt;, user_data=&lt;optimized out&gt;) at /tmp/buildd/gtk+3.0-3.8.5/./gdk/x11/gdkeventsource.c:364
#20 0x00007fbae7621f25 in g_main_dispatch (context=0x17578e0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3054
#21 g_main_context_dispatch (context=context@entry=0x17578e0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3630
#22 0x00007fbae7622268 in g_main_context_iterate (context=0x17578e0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3701
#23 0x00007fbae76226da in g_main_loop_run (loop=0x19a1fa0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#24 0x00007fbae928b7f0 in gtk_dialog_run (dialog=0x1994040) at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkdialog.c:1110
#25 0x00007fbaec02e7ed in webkitPrintOperationRunDialog (printOperation=0x197dc00, parent=0x183c010) at ../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:240
#26 0x00007fbaec02eba1 in webkitPrintOperationRunDialogForFrame (printOperation=0x197dc00, parent=0x183c010, webFrame=0x179be60) at ../../Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:291
#27 0x00007fbaec04d765 in webkitWebViewPrintFrame (webView=0x17a10e0, frame=0x179be60) at ../../Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1646
#28 0x00007fbaec03a053 in printFrame (page=0x1834420, frame=0x179be60) at ../../Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp:141
#29 0x00007fbaec1606b2 in WebKit::WebUIClient::printFrame (this=0x18345c0, page=0x1834420, frame=0x179be60) at ../../Source/WebKit2/UIProcess/WebUIClient.cpp:405
#30 0x00007fbaec112e6d in WebKit::WebPageProxy::printFrame (this=0x1834420, frameID=1) at ../../Source/WebKit2/UIProcess/WebPageProxy.cpp:2794
#31 0x00007fbaec2bde7d in CoreIPC::callMemberFunction&lt;WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long), unsigned long&gt;(std::tuple&lt;unsigned long&gt;&amp;&amp;, std::tuple&lt;&gt;&amp;, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long)) (args=..., object=0x1834420, function=(void (WebKit::WebPageProxy::*)(WebKit::WebPageProxy * const, unsigned long)) 0x7fbaec112d86 &lt;WebKit::WebPageProxy::printFrame(unsigned long)&gt;) at ../../Source/WebKit2/Platform/CoreIPC/HandleMessage.h:94
#32 0x00007fbaec2b7418 in CoreIPC::handleMessage&lt;Messages::WebPageProxy::PrintFrame, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long)&gt; (decoder=..., replyEncoder=..., object=0x1834420, function=(void (WebKit::WebPageProxy::*)(WebKit::WebPageProxy * const, unsigned long)) 0x7fbaec112d86 &lt;WebKit::WebPageProxy::printFrame(unsigned long)&gt;) at ../../Source/WebKit2/Platform/CoreIPC/HandleMessage.h:385
#33 0x00007fbaec2b0310 in WebKit::WebPageProxy::didReceiveSyncMessage (this=0x1834420, connection=0x19104a0, decoder=..., replyEncoder=...) at DerivedSources/WebKit2/WebPageProxyMessageReceiver.cpp:768
#34 0x00007fbaed9bf138 in CoreIPC::MessageReceiverMap::dispatchSyncMessage (this=0x179b188, connection=0x19104a0, decoder=..., replyEncoder=...) at ../../Source/WebKit2/Platform/CoreIPC/MessageReceiverMap.cpp:103
#35 0x00007fbaebfad236 in WebKit::ChildProcessProxy::dispatchSyncMessage (this=0x179b150, connection=0x19104a0, decoder=..., replyEncoder=...) at ../../Source/WebKit2/Shared/ChildProcessProxy.cpp:112
#36 0x00007fbaec1526ae in WebKit::WebProcessProxy::didReceiveSyncMessage (this=0x179b150, connection=0x19104a0, decoder=..., replyEncoder=...) at ../../Source/WebKit2/UIProcess/WebProcessProxy.cpp:364
#37 0x00007fbaed9ae39d in CoreIPC::Connection::dispatchSyncMessage (this=0x19104a0, decoder=...) at ../../Source/WebKit2/Platform/CoreIPC/Connection.cpp:749
#38 0x00007fbaed9ae6fb in CoreIPC::Connection::dispatchMessage (this=0x19104a0, message=...) at ../../Source/WebKit2/Platform/CoreIPC/Connection.cpp:807
#39 0x00007fbaed9ae922 in CoreIPC::Connection::dispatchOneMessage (this=0x19104a0) at ../../Source/WebKit2/Platform/CoreIPC/Connection.cpp:835
#40 0x00007fbaed9be305 in WTF::FunctionWrapper&lt;void (CoreIPC::Connection::*)()&gt;::operator() (this=0x7fba70001cc0, c=0x19104a0) at ../../Source/WTF/wtf/Functional.h:218
#41 0x00007fbaed9bde8a in WTF::BoundFunctionImpl&lt;WTF::FunctionWrapper&lt;void (CoreIPC::Connection::*)()&gt;, void (CoreIPC::Connection*)&gt;::operator()() (this=0x7fba70001cb0) at ../../Source/WTF/wtf/Functional.h:496
#42 0x00007fbaec22c31f in WTF::Function&lt;void ()&gt;::operator()() const (this=0x7fff157fb440) at ../../Source/WTF/wtf/Functional.h:704
#43 0x00007fbaed86c51d in WebCore::RunLoop::performWork (this=0x1796a70) at ../../Source/WebCore/platform/RunLoop.cpp:104
#44 0x00007fbaed88e7e8 in WebCore::RunLoop::queueWork (runLoop=0x1796a70) at ../../Source/WebCore/platform/gtk/RunLoopGtk.cpp:104
#45 0x00007fbae7621f25 in g_main_dispatch (context=0x17578e0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3054
#46 g_main_context_dispatch (context=context@entry=0x17578e0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3630
#47 0x00007fbae7622268 in g_main_context_iterate (context=0x17578e0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3701
#48 0x00007fbae76226da in g_main_loop_run (loop=0x1952bb0) at /tmp/buildd/glib2.0-2.36.1/./glib/gmain.c:3895
#49 0x00007fbae92fb45d in gtk_main () at /tmp/buildd/gtk+3.0-3.8.5/./gtk/gtkmain.c:1156
#50 0x000000000040ee85 in main (argc=1, argv=0x7fff157fb6e8) at ../../Tools/MiniBrowser/gtk/main.c:281</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948247</commentid>
    <comment_count>4</comment_count>
    <who name="Lorenzo Tilve">ltilve</who>
    <bug_when>2013-11-07 07:13:36 -0800</bug_when>
    <thetext>It is not only crashing when selecting the option to print to file, but also when effectively printing to any device.

Calling a javascript window.print() lanuches the GTK print menu, and if the &quot;print to file&quot; option is selected the GTK function gtk_print_settings_get (gtk/gtkprintsettings.c) crashes due to the print settings array being empty when getting the output filename at return g_hash_table_lookup (settings-&gt;hash, key);

When the webkitPrintOperationRunDialog is called externally like at the epiphany print command, the operation goes fine. Forcing the setting of the print_settings like ephy does:

   settings = gtk_print_settings_new ();
   gtk_print_settings_set (settings,
                           GTK_PRINT_SETTINGS_OUTPUT_BASENAME,
                          ephy_web_view_get_title (view));
   webkit_print_operation_set_print_settings (operation, settings);

fixes the first crash, but it&apos;s still failing at the moment of dumping the print file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948308</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2013-11-07 09:38:22 -0800</bug_when>
    <thetext>&gt; It is not only crashing when selecting the option to print to file, but also when effectively printing to any device.

Retitled to reflect that.

The error only happens with WebKit2GTK+, with WebKit1Gtk+ (GtkLauncher) it works perfectly</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948309</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-07 09:40:44 -0800</bug_when>
    <thetext>I&apos;ll looks at it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948643</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-08 06:47:01 -0800</bug_when>
    <thetext>They are actually two different crashes here, one is a bug in GTK+ (see https://bugzilla.gnome.org/show_bug.cgi?id=703784) and the other is in WebKit. I&apos;ll create a new bug for the latter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948645</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-08 06:50:25 -0800</bug_when>
    <thetext>Even if it&apos;s a GTK+ bug we can workaround it, by ensuring the print dialog is always created with a valid GtkPrintSettings object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948647</commentid>
    <comment_count>9</comment_count>
      <attachid>216392</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-08 06:55:55 -0800</bug_when>
    <thetext>Created attachment 216392
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948651</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-11-08 06:58:23 -0800</bug_when>
    <thetext>Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948670</commentid>
    <comment_count>11</comment_count>
      <attachid>216392</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-11-08 08:39:21 -0800</bug_when>
    <thetext>Comment on attachment 216392
Patch

Hrm. What&apos;s the sequence of events that causes the printSettings to be null?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948679</commentid>
    <comment_count>12</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-08 08:56:46 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (From update of attachment 216392 [details])
&gt; Hrm. What&apos;s the sequence of events that causes the printSettings to be null?

webkit_print_operation_new() + webkitPrintOperationRunDialogForFrame(). It&apos;s perfectly ok for the settings to be NULL, it&apos;s a bug in the file print backend of GTK, see https://bugzilla.gnome.org/show_bug.cgi?id=703784. This patch si simply a workaround to not have to bump the gtk reqs to fix the crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948684</commentid>
    <comment_count>13</comment_count>
      <attachid>216392</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-11-08 09:10:57 -0800</bug_when>
    <thetext>Comment on attachment 216392
Patch

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

&gt; Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:233
&gt; +    if (!priv-&gt;printSettings)
&gt; +        priv-&gt;printSettings = adoptGRef(gtk_print_settings_new());
&gt; +    gtk_print_unix_dialog_set_settings(printDialog, priv-&gt;printSettings.get());

Okay. Do you mind putting a comment here with a link to the GTK+ bug and a small bit explaining what&apos;s going on. I think it will be nice to have if we ever bump the GTK+ requirement, so that we can remove the work-around.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>948689</commentid>
    <comment_count>14</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-08 09:25:50 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; (From update of attachment 216392 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=216392&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp:233
&gt; &gt; +    if (!priv-&gt;printSettings)
&gt; &gt; +        priv-&gt;printSettings = adoptGRef(gtk_print_settings_new());
&gt; &gt; +    gtk_print_unix_dialog_set_settings(printDialog, priv-&gt;printSettings.get());
&gt; 
&gt; Okay. Do you mind putting a comment here with a link to the GTK+ bug and a small bit explaining what&apos;s going on. I think it will be nice to have if we ever bump the GTK+ requirement, so that we can remove the work-around.

Sure!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>949229</commentid>
    <comment_count>15</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-11-11 00:22:38 -0800</bug_when>
    <thetext>Committed r159041: &lt;http://trac.webkit.org/changeset/159041&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>216392</attachid>
            <date>2013-11-08 06:55:55 -0800</date>
            <delta_ts>2013-11-08 09:10:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-print-to-file-crash.diff</filename>
            <type>text/plain</type>
            <size>1779</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA5N2Q4OGUwLi4wNjc0NWFkIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcg
QEAKKzIwMTMtMTEtMDggIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29t
PgorCisgICAgICAgIFtHVEtdIFtXZWJLaXQyXSBDcmFzaCB3aGVuIHByaW50aW5nIHRvIGEgZmls
ZSB2aWEgamF2YXNjcmlwdAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9MTIyODAxCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisK
KyAgICAgICAgVGhpcyBjcmFzaCBpcyBjYXVzZWQgYnkgYSBHVEsrIGJ1ZywgYnV0IHdlIGNhbiB3
b3JrIGFyb3VuZCBpdCBieQorICAgICAgICBlbnN1cmluZyB0aGUgcHJpbnQgZGlhbG9nIGlzIGFs
d2F5cyBzaG93biB3aXRoIGEgdmFsaWQKKyAgICAgICAgR3RrUHJpbnRTZXR0aW5ncyBvYmplY3Qu
CisKKyAgICAgICAgKiBVSVByb2Nlc3MvQVBJL2d0ay9XZWJLaXRQcmludE9wZXJhdGlvbi5jcHA6
CisgICAgICAgICh3ZWJraXRQcmludE9wZXJhdGlvblJ1bkRpYWxvZyk6CisKIDIwMTMtMTEtMDcg
IEFuZGVycyBDYXJsc3NvbiAgPGFuZGVyc2NhQGFwcGxlLmNvbT4KIAogICAgICAgICBFbmNvZGUg
YW5kIGRlY29kZSBOU1VSTFJlc3BvbnNlIG9iamVjdHMgdXNpbmcgTlNDb2RlcgpkaWZmIC0tZ2l0
IGEvU291cmNlL1dlYktpdDIvVUlQcm9jZXNzL0FQSS9ndGsvV2ViS2l0UHJpbnRPcGVyYXRpb24u
Y3BwIGIvU291cmNlL1dlYktpdDIvVUlQcm9jZXNzL0FQSS9ndGsvV2ViS2l0UHJpbnRPcGVyYXRp
b24uY3BwCmluZGV4IDA2OGEyOGMuLjM1MDhmNzcgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQy
L1VJUHJvY2Vzcy9BUEkvZ3RrL1dlYktpdFByaW50T3BlcmF0aW9uLmNwcAorKysgYi9Tb3VyY2Uv
V2ViS2l0Mi9VSVByb2Nlc3MvQVBJL2d0ay9XZWJLaXRQcmludE9wZXJhdGlvbi5jcHAKQEAgLTIy
OCw4ICsyMjgsOSBAQCBzdGF0aWMgV2ViS2l0UHJpbnRPcGVyYXRpb25SZXNwb25zZSB3ZWJraXRQ
cmludE9wZXJhdGlvblJ1bkRpYWxvZyhXZWJLaXRQcmludE9wZQogICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIHwgR1RLX1BSSU5UX0NBUEFCSUxJVFlfU0NBTEUpKTsKIAog
ICAgIFdlYktpdFByaW50T3BlcmF0aW9uUHJpdmF0ZSogcHJpdiA9IHByaW50T3BlcmF0aW9uLT5w
cml2OwotICAgIGlmIChwcml2LT5wcmludFNldHRpbmdzKQotICAgICAgICBndGtfcHJpbnRfdW5p
eF9kaWFsb2dfc2V0X3NldHRpbmdzKHByaW50RGlhbG9nLCBwcml2LT5wcmludFNldHRpbmdzLmdl
dCgpKTsKKyAgICBpZiAoIXByaXYtPnByaW50U2V0dGluZ3MpCisgICAgICAgIHByaXYtPnByaW50
U2V0dGluZ3MgPSBhZG9wdEdSZWYoZ3RrX3ByaW50X3NldHRpbmdzX25ldygpKTsKKyAgICBndGtf
cHJpbnRfdW5peF9kaWFsb2dfc2V0X3NldHRpbmdzKHByaW50RGlhbG9nLCBwcml2LT5wcmludFNl
dHRpbmdzLmdldCgpKTsKIAogICAgIGlmIChwcml2LT5wYWdlU2V0dXApCiAgICAgICAgIGd0a19w
cmludF91bml4X2RpYWxvZ19zZXRfcGFnZV9zZXR1cChwcmludERpYWxvZywgcHJpdi0+cGFnZVNl
dHVwLmdldCgpKTsK
</data>
<flag name="review"
          id="239356"
          type_id="1"
          status="+"
          setter="mrobinson"
    />
          </attachment>
      

    </bug>

</bugzilla>