GNOME Bugzilla – Bug 735706
Crasher when "save password?" pops up
Last modified: 2014-09-11 09:17:20 UTC
webkitgtk4-2.5.3-4.fc21.x86_64 epiphany-3.12.1-7.20140822gitb0af36e.fc21.x86_64 1. Go to fpaste.org 2. Paste something 3. Get asked to save the password (though there's no login name) 4. Go to fpaste.org 5. Paste something 6. Crash Stack trace of thread 4258: #0 0x00007fab40321ee2 g_type_check_instance_cast (libgobject-2.0.so.0) #1 0x000000000046401a form_auth_data_save_requested (epiphany) #2 0x00007fab383c4d60 ffi_call_unix64 (libffi.so.6) #3 0x00007fab383c47d1 ffi_call (libffi.so.6) #4 0x00007fab402fe6f4 g_cclosure_marshal_generic (libgobject-2.0.so.0) #5 0x00007fab402fded5 g_closure_invoke (libgobject-2.0.so.0) #6 0x00007fab40310202 signal_emit_unlocked_R (libgobject-2.0.so.0) #7 0x00007fab403190c1 g_signal_emit_valist (libgobject-2.0.so.0) #8 0x00007fab403192ef g_signal_emit (libgobject-2.0.so.0) #9 0x0000000000468270 ephy_web_extension_proxy_form_auth_save_requested (epiphany) #10 0x000000000045ec7c web_extension_form_auth_save_requested (epiphany) #11 0x00007fab4060e1c4 emit_signal_instance_in_idle_cb (libgio-2.0.so.0) #12 0x00007fab3fffeb6b g_main_dispatch (libglib-2.0.so.0) #13 0x00007fab3fffef08 g_main_context_iterate (libglib-2.0.so.0) #14 0x00007fab3fffefbc g_main_context_iteration (libglib-2.0.so.0) #15 0x00007fab405eaffc g_application_run (libgio-2.0.so.0) #16 0x000000000042de53 main (epiphany) #17 0x00007fab3f1630e0 __libc_start_main (libc.so.6) #18 0x000000000042e233 _start (epiphany)
This probably has the same cause as bug #734898.
Are you able to reproduce this? (Like bug #734898, I haven't managed to.) When you're asked to save the password, do you accept or hit the close button? When you "go to fpaste.org" in step four, are you opening a new tab, or reloading the page in the current tab, or just pasting something else into the page that's already loaded (for me, once you paste something it immediately returns me to the New Paste page, and I can paste again right away).
I tried to reproduce and it crashed with that stack trace at step 3. I restarted and haven't been able to make it crash after many attempts. Just like bug 734898 I don't have a reproducible at all times scenario :/
Both Fred and I use the "shared-secondary-process" process model. And you probably need to close the web view between 3. and 4.
Created attachment 285868 [details] [review] ephy-web-view: Fix potential crashers The "form-auth-data-save-requested" signal was not properly disconnected as the g_signal_handlers_disconnect_by_func() was using the wrong object. The "allow-tls-certificate" signal was not disconnected at all. The "notify::favicon" was needlessly disconnected (it will be disconnected when the web view disappears). And the "cleared" signal for the history service was never disconnected. g_signal_connect_object() should ensure that all the signals we connect to that have the web view as data are disconnected when the web view is destroyed.
Note, this isn't even compile tested.
*** Bug 734898 has been marked as a duplicate of this bug. ***
Thanks Bastien. Our code is wrong if the EphyWebExtensionProxy outlives the EphyWebView, which happens if one web process is shared by all tabs. If this is the case then allow_tls_certificate_cb and form_auth_data_save_requested are called on ALL web views (which is harmless as long as they still exist). To reproduce: * Switch the process model to single shared process before starting epiphany * Navigate to https://www.cacert.org (or some other untrusted site) in one tab and click Load Anyway * Open a second tab and navigate to https://cacert.com (or some other distinct untrusted site) * Close the first tab * Click Load Anyway in the second tab. The same procedure with password forms would work just as well.
Review of attachment 285868 [details] [review]: Looks good and fixes my reproducer in comment #8. (Note that the problem with form_auth_data_save_requested was that it was connected to the EphyWebExtensionProxy but disconnected from the EphyEmbedShell.)
Comment on attachment 285868 [details] [review] ephy-web-view: Fix potential crashers Thanks!
Committed to gnome-3-12 and master Attachment 285868 [details] pushed as 3604801 - ephy-web-view: Fix potential crashers