After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595094 - epiphany crashes and can't be started again on invalid adblock whitelist regex
epiphany crashes and can't be started again on invalid adblock whitelist regex
Status: RESOLVED FIXED
Product: epiphany-extensions
Classification: Deprecated
Component: adblock
2.30.x
Other All
: Normal critical
: ---
Assigned To: epiphany-extensions-maint
epiphany-extensions-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-13 19:13 UTC by Priit Laes (IRC: plaes)
Modified: 2011-05-30 23:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
stack trace (7.35 KB, text/plain)
2011-04-02 01:29 UTC, kauaian_spunger
  Details
adblock: reset error to NULL if list regexp could not be parsed (1.09 KB, patch)
2011-05-29 19:44 UTC, Tim-Philipp Müller
committed Details | Review

Description Priit Laes (IRC: plaes) 2009-09-13 19:13:20 UTC
Version: 2.27.92

What were you doing when the application crashed?
Adblocker related crash.


Distribution: Gentoo Base System release 2.0.1
Gnome Release: 2.27.92 2009-09-11 (Gentoo)
BugBuddy Version: 2.26.0

System: Linux 2.6.31-rc5-00470-g85dfd81 #166 SMP Tue Aug 11 13:36:25 EEST 2009 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10603901
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks Compact
Icon Theme: gnome
GTK+ Modules: canberra-gtk-module, gnomebreakpad

Memory status: size: 711454720 vsize: 711454720 resident: 112750592 share: 28950528 rss: 112750592 rss_rlim: 18446744073709551615
CPU usage: start_time: 1252823908 rtime: 44853 utime: 38709 stime: 6144 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/epiphany'

[Thread debugging using libthread_db enabled]
[New Thread 0x7f9680baf770 (LWP 3924)]
[New Thread 0x7f96688f3910 (LWP 3940)]
0x00007f967b43ba4f in __libc_waitpid (pid=7583, stat_loc=0x7fffa1cb86b0, 
    options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41
	in ../sysdeps/unix/sysv/linux/waitpid.c

Thread 1 (Thread 0x7f9680baf770 (LWP 3924))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at gspawn.c line 700
  • #3 bugbuddy_segv_handle
    at gnome-breakpad.cc line 369
  • #4 <signal handler called>
  • #5 ad_blocker_blocked_uri
    at ad-blocker.c line 94
  • #6 IA__g_closure_invoke
    at gclosure.c line 767
  • #7 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #8 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #9 IA__g_signal_emit_by_name
    at gsignal.c line 3074
  • #10 resource_request_starting_cb
    at ephy-embed.c line 215
  • #11 IA__g_closure_invoke
    at gclosure.c line 767
  • #12 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #13 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #14 IA__g_signal_emit_by_name
    at gsignal.c line 3074
  • #15 WebKit::FrameLoaderClient::dispatchWillSendRequest
    at WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp line 201
  • #16 WebCore::FrameLoader::dispatchWillSendRequest
    at WebCore/loader/FrameLoader.cpp line 5204
  • #17 WebCore::ResourceLoader::willSendRequest
    at WebCore/loader/ResourceLoader.cpp line 209
  • #18 WebCore::ResourceLoader::load
    at WebCore/loader/ResourceLoader.cpp line 114
  • #19 WebCore::SubresourceLoader::create
    at WebCore/loader/SubresourceLoader.cpp line 101
  • #20 WebCore::Loader::Host::servePendingRequests
    at WebCore/loader/loader.cpp line 326
  • #21 WebCore::Loader::Host::servePendingRequests
    at WebCore/loader/loader.cpp line 281
  • #22 WebCore::Loader::Host::didFail
    at WebCore/loader/loader.cpp line 426
  • #23 WebCore::Loader::Host::cancelRequests
    at WebCore/loader/loader.cpp line 555
  • #24 WebCore::Loader::cancelRequests
    at WebCore/loader/loader.cpp line 224
  • #25 WebCore::FrameLoader::stopLoading
    at WebCore/loader/FrameLoader.cpp line 608
  • #26 WebCore::DocumentLoader::stopLoading
    at WebCore/loader/DocumentLoader.cpp line 276
  • #27 WebCore::FrameLoader::stopAllLoaders
    at WebCore/loader/FrameLoader.cpp line 2702
  • #28 webkit_web_view_dispose
    at WebKit/gtk/webkit/webkitwebview.cpp line 969
  • #29 IA__g_object_run_dispose
    at gobject.c line 789
  • #30 gtk_scrolled_window_forall
    at gtkscrolledwindow.c line 1079
  • #31 gtk_container_destroy
    at gtkcontainer.c line 1066
  • #32 IA__g_closure_invoke
    at gclosure.c line 767
  • #33 signal_emit_unlocked_R
    at gsignal.c line 3363
  • #34 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #35 IA__g_signal_emit
    at gsignal.c line 3037
  • #36 gtk_object_dispose
    at gtkobject.c line 421
  • #37 IA__g_object_run_dispose
    at gobject.c line 789
  • #38 IA__g_closure_invoke
    at gclosure.c line 767
  • #39 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #40 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #41 IA__g_signal_emit_by_name
    at gsignal.c line 3074
  • #42 IA__g_closure_invoke
    at gclosure.c line 767
  • #43 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #44 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #45 IA__g_signal_emit
    at gsignal.c line 3037
  • #46 _gtk_action_emit_activate
    at gtkaction.c line 727
  • #47 closure_accel_activate
    at gtkaction.c line 1647
  • #48 IA__g_closure_invoke
    at gclosure.c line 767
  • #49 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #50 IA__g_signal_emit_valist
    at gsignal.c line 2990
  • #51 IA__g_signal_emit
    at gsignal.c line 3037
  • #52 IA__gtk_accel_group_activate
    at gtkaccelgroup.c line 860
  • #53 IA__gtk_accel_groups_activate
    at gtkaccelgroup.c line 897
  • #54 IA__gtk_window_activate_key
    at gtkwindow.c line 8262
  • #55 gtk_window_key_press_event
    at gtkwindow.c line 5170
  • #56 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #57 IA__g_closure_invoke
    at gclosure.c line 767
  • #58 signal_emit_unlocked_R
    at gsignal.c line 3285
  • #59 IA__g_signal_emit_valist
    at gsignal.c line 2990
  • #60 IA__g_signal_emit
    at gsignal.c line 3037
  • #61 gtk_widget_event_internal
    at gtkwidget.c line 4767
  • #62 IA__gtk_propagate_event
    at gtkmain.c line 2370
  • #63 IA__gtk_main_do_event
    at gtkmain.c line 1601
  • #64 gdk_event_dispatch
    at gdkevents-x11.c line 2382
  • #65 IA__g_main_context_dispatch
    at gmain.c line 1960
  • #66 g_main_context_iterate
    at gmain.c line 2591
  • #67 IA__g_main_loop_run
    at gmain.c line 2799
  • #68 IA__gtk_main
    at gtkmain.c line 1205
  • #69 main
    at ephy-main.c line 782

Comment 1 kauaian_spunger 2011-04-01 23:06:41 UTC
I think I've got this bug too. After adding some urls in the ad block plugin's blacklist epiphany crashed. I managed to disable the plugin a few weeks ago but I enabled it just now to submit the bug report. I think this is the same bug as 595255. As a temporary fix could you tell me how to edit the blacklist without epiphany running? I'm not sure where the config files are. I'll upload a stack trace in a minute.

https://bugzilla.gnome.org/show_bug.cgi?id=595255
Comment 2 kauaian_spunger 2011-04-02 01:29:46 UTC
Created attachment 184922 [details]
stack trace
Comment 3 Tim-Philipp Müller 2011-05-29 18:17:28 UTC
Observed the same on debian sid with epi 2.30.6 after entering an invalid regex such as "*.foo.com".

The worst part (for your average user) is that epiphany won't re-start again afterwards.

This should be quite easy to reproduce and to fix I believe.

kauaian: you can edit the file ~/.gnome2/epiphany/extensions/data/adblock/whitelist and remove the offending pattern.
Comment 4 Tim-Philipp Müller 2011-05-29 19:44:29 UTC
Created attachment 188849 [details] [review]
adblock: reset error to NULL if list regexp could not be parsed

    Reset (freed) error variable to NULL after a regexp parsing error
    from the whitelist/blacklist file. It's reused in the next loop
    iteration and if we don't reset it, we get critical warnings when
    reading further regexp lines, and then crashes when trying to
    print or free the already-freed error.


I have not tested this, but I'm fairly sure this fixes the problem. It is the right thing to do in any case.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2011-05-29 22:55:43 UTC
Review of attachment 188849 [details] [review]:

Looks good. Do you have git access?
Comment 6 Tim-Philipp Müller 2011-05-30 23:07:15 UTC
Yes, thanks. Pushed:

 commit feabc53b368c244215d3ba507abe76071f9ef81f
 Author: Tim-Philipp Müller <tim@centricular.net>
 Date:   Sun May 29 20:36:40 2011 +0100

    adblock: reset error to NULL if list regexp could not be parsed
    
    Reset (freed) error variable to NULL after a regexp parsing error
    from the whitelist/blacklist file. It's reused in the next loop
    iteration and if we don't reset it, we get critical warnings when
    reading further regexp lines, and then crashes when trying to
    print or free the already-freed error.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=595094