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 325930 - Epiphany crashes when a python extension calls epiphany.ephy_shell_get_default().get_bookmarks().get_keywords().get_children()
Epiphany crashes when a python extension calls epiphany.ephy_shell_get_defaul...
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: [obsolete] Bindings:Python
2.26.x
Other All
: High critical
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 419712 497828 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-06 00:15 UTC by Chris Lord
Modified: 2011-02-01 16:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Chris Lord 2006-01-06 00:15:02 UTC
Steps to reproduce:
1. Enable python console extension
2. Type the following in the python console:
import epiphany
bms = epiphany.ephy_shell_get_default().get_bookmarks()
bms.get_keywords().get_children()
3. Epiphany will crash


Stack trace:


Other information:
I am using Epiphany 1.8.2 on Ubuntu breezy - I am on amd64.
Comment 1 Crispin Flowerday (not receiving bugmail) 2006-01-06 09:26:12 UTC
FWIW, this doesn't crash for me using ubuntu breezy i386 version, perhaps it is some amd64 wierdness

Do you think you would be able to get a stack trace for us ? Without a stack trace from the crash it's very hard to determine what caused it.
Please see http://live.gnome.org/GettingTraces for more information on how to do so.
Comment 2 Chris Lord 2006-01-06 11:40:33 UTC
Not sure if this is what you want, but hopefully it'll help:

(gdb) where
  • #0 ephy_python_loader_get_type
  • #1 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #2 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #3 PyEval_EvalCode
    from /usr/lib/libpython2.4.so.1.0
  • #4 PyRun_StringFlags
    from /usr/lib/libpython2.4.so.1.0
  • #5 _PyUnicodeUCS4_ToLowercase
    from /usr/lib/libpython2.4.so.1.0
  • #6 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #7 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #8 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #9 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #10 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #11 PyFunction_SetClosure
    from /usr/lib/libpython2.4.so.1.0
  • #12 PyObject_Call
    from /usr/lib/libpython2.4.so.1.0
  • #13 PyMethod_New
    from /usr/lib/libpython2.4.so.1.0
  • #14 PyObject_Call
    from /usr/lib/libpython2.4.so.1.0
  • #15 PyEval_CallObjectWithKeywords
    from /usr/lib/libpython2.4.so.1.0
  • #16 initgobject
    from /usr/lib/python2.4/site-packages/gtk-2.0/gobject.so
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_window_activate_key
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #26 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #29 gtk_widget_activate
  • #30 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #31 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #33 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #34 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #35 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #36 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #37 main

Comment 3 Christian Persch 2006-01-06 12:25:57 UTC
I'm afraid the trace isn't very useful... could you rebuild epiphany with debug symbols to get a better trace? See https://wiki.ubuntu.com/DebuggingProgramCrash .
Comment 4 Chris Lord 2006-01-06 13:28:07 UTC
After rebuilding with debugging symbols, the crash no longer occurs... I guess I'll run this version for the moment, but is there any further way to debug this?
Comment 5 Christian Persch 2006-01-06 17:50:46 UTC
Hmm the debug build uses a different optimisation setting probably, not -O2 like a normal build... I suspect this might be some aliasing problem since when I don't compile with -fno-strict-aliasing I get some warnings when compiling the pyphany bindings (nothing about bookmarks/node children though)... could you try again with DEB_BUILD_OPTIONS="nostrip" (i.e. without "noopt") ?
Comment 6 Chris Lord 2006-01-06 19:14:34 UTC
The crashes happen when I *don't* include debugging symbols ('-g' in CFLAGS) - Otherwise, it behaves as normal, with or without noopt/nostrip. With debugging symbols enabled, I seem to get unexplained intermittent crashes (and often crashes on close), but this particular function seems to work fine.
Comment 7 Chris Lord 2006-03-25 09:16:14 UTC
Tried this again recently, the error isn't present when compiling without optimisations (-O0). This is with gcc v4.0.3 (4.0.3-1ubuntu3).
Comment 8 Sebastien Bacher 2006-08-01 19:30:59 UTC
Backtrace from epiphany 2.14.3 on dapper:

Program received signal SIGSEGV, Segmentation fault.

Thread 46912601917568 (LWP 2586)

  • #0 _wrap_ephy_node_get_children
    at epiphany.override line 160
  • #1 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #2 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #3 PyEval_EvalCode
    from /usr/lib/libpython2.4.so.1.0
  • #4 PyRun_StringFlags
    from /usr/lib/libpython2.4.so.1.0
  • #5 _PyUnicodeUCS4_ToLowercase
    from /usr/lib/libpython2.4.so.1.0
  • #6 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #7 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #8 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #9 PyEval_EvalFrame
    from /usr/lib/libpython2.4.so.1.0
  • #10 PyEval_EvalCodeEx
    from /usr/lib/libpython2.4.so.1.0
  • #11 PyFunction_SetClosure
    from /usr/lib/libpython2.4.so.1.0
  • #12 PyObject_Call
    from /usr/lib/libpython2.4.so.1.0
  • #13 PyMethod_New
    from /usr/lib/libpython2.4.so.1.0
  • #14 PyObject_Call
    from /usr/lib/libpython2.4.so.1.0
  • #15 PyEval_CallObjectWithKeywords
    from /usr/lib/libpython2.4.so.1.0
  • #16 initgobject
    from /usr/lib/python2.4/site-packages/gtk-2.0/gobject.so
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_widget_event_internal
    at gtkwidget.c line 3751
  • #22 IA__gtk_window_propagate_key_event
    at gtkwindow.c line 4517
  • #23 gtk_window_key_press_event
    at gtkwindow.c line 4547
  • #24 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #25 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #26 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #29 gtk_widget_event_internal
    at gtkwidget.c line 3751
  • #30 IA__gtk_propagate_event
    at gtkmain.c line 2192
  • #31 IA__gtk_main_do_event
    at gtkmain.c line 1447
  • #32 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #33 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #34 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #35 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #36 IA__gtk_main
    at gtkmain.c line 1026
  • #37 main
    at ephy-main.c line 790


From the build:

"...
Could not write method EphyNode.signal_connect_object: No ArgType for 'EphyNodeCallback'
Could not write method EphyNode.signal_disconnect_object: No ArgType for 'EphyNodeCallback'
Could not write method EphyNode.set_property: No ArgType for 'const-GValue*'
Could not write method EphyNode.get_property: No ArgType for 'GValue*'
Could not write method EphyNode.write_to_xml: No ArgType for 'xmlTextWriterPtr'
Could not write method EphyNode.sort_children: No ArgType for 'GCompareFunc'
Could not write method EphyNode.reorder_children: No ArgType for 'int*'
Could not write method EggEditableToolbar.set_drag_dest: No ArgType for 'const-GtkTargetEntry*'
Could not write method EphyDialog.construct: No ArgType for 'const-EphyDialogProperty*'
Could not write method EphyDialog.add_enum: No ArgType for 'const-char*-const*'
Could not write method EphyDialog.set_size_group: varargs functions not supported
Could not write method EphyDialog.get_controls: varargs functions not supported
Could not write method EphyDialog.get_value: No ArgType for 'GValue*'
Could not write method EphyDialog.set_value: No ArgType for 'const-GValue*'
Could not write method EphyExtensionsManager.get_extensions: No ArgType for 'GList*'
Warning: generating old-style constructor for ephy_link_action_group_new
Warning: generating old-style constructor for ephy_node_db_new
Could not write method EphyNodeDb.load_from_file: No ArgType for 'const-xmlChar*'
Could not write method EphyNodeDb.write_to_xml_safe: varargs functions not supported
Could not write method EggToolbarsModel.get_types: No ArgType for 'GList*'
Could not write method EggToolbarsModel.set_types: No ArgType for 'GList*'
Could not write method EggToolbarsModel.get_name_avail: No ArgType for 'GPtrArray*'
Could not write function ephy_node_new_from_xml: No ArgType for 'xmlNodePtr'
Could not write function ephy_bookmarks_compare_topics: No ArgType for 'gconstpointer'
Could not write function ephy_bookmarks_compare_topic_pointers: No ArgType for 'gconstpointer'
Could not write function ephy_bookmarks_compare_bookmarks: No ArgType for 'gconstpointer'
Could not write function ephy_bookmarks_compare_bookmark_pointers: No ArgType for 'gconstpointer
..."
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2006-08-14 09:54:59 UTC
I just tried this on Dapper (i386) but I couldn't make Ephy crash.
Comment 10 Chris Lord 2006-08-14 10:06:15 UTC
Yes, this is an amd64 issue - It disappears when compiling without optimisations - See also Ubuntu bug: https://launchpad.net/bugs/36538
Comment 11 Reinout van Schouwen 2006-12-17 16:00:48 UTC
So is this an Epiphany or a Python bug? Does it still happen?
Comment 12 Federico Fernandez 2007-04-19 15:46:42 UTC
Created attachment 86643 [details]
epiphany.ephy_shell_get_default().get_bookmarks().get_keywords().get_children()
Comment 13 Federico Fernandez 2007-04-19 15:47:38 UTC
Created attachment 86644 [details]
epiphany.ephy_shell_get_default().get_bookmarks().get_keywords().get_children()
Comment 14 Federico Fernandez 2007-04-19 15:47:58 UTC
Created attachment 86645 [details]
epiphany.ephy_shell_get_default().get_bookmarks().get_keywords().get_children()
Comment 15 Federico Fernandez 2007-04-19 15:48:28 UTC
Created attachment 86646 [details]
epiphany.ephy_shell_get_default().get_bookmarks().get_keywords().get_children()
Comment 16 Reinout van Schouwen 2007-04-19 21:22:56 UTC
I'm not sure what all these attachments are for, but I do know that bugzilla finds that I'm not authorized to access them!
Comment 17 Christian Persch 2007-04-19 23:03:53 UTC
Reinout: they're spam.
Comment 18 Sebastien Bacher 2007-10-03 09:01:22 UTC
one of the ubuntu comments states that's still happening on gutsy
Comment 19 Cyril Brulebois 2007-11-10 19:40:54 UTC
I can reproduce it on debian/unstable, amd64 only; both with packages or with svn trunk; when ephy is compiled with -O2, but not when it is compiled with -O0. Unfortunately I'm not familiar at all with this aspect of python programming.
Comment 20 Magnus Therning 2007-12-04 10:47:50 UTC
*** Bug 497828 has been marked as a duplicate of this bug. ***
Comment 21 Eetu Huisman 2007-12-04 10:52:30 UTC
This is still happening on 64-bit Gutsy. I'm willing to debug it, if anyone points me in the right direction...
Comment 22 Josselin Mouette 2008-04-27 10:26:54 UTC
It looks like get_children() is returning the wrong object.

>>> bk=epiphany.ephy_shell_get_default().get_bookmarks()
>>> bk
<epiphany.Bookmarks object at 0x10e6410 (EphyBookmarks at 0x74ba70)>

(gdb) print (EphyBookmarks) *0x74ba70
$1 = {parent = {g_type_instance = {g_class = 0x1108640}, ref_count = 2,
    qdata = 0x1c9b600}, priv = 0x74ba90}
(gdb) print *((EphyBookmarks) *0x74ba70).priv
$4 = {init_defaults = 0, dirty = 0, save_timeout_id = 0,   xml_file = 0x110625$
  rdf_file = 0x11062a0 "/home/joss/.gnome2/epiphany/bookmarks.rdf",
  db = 0xc189c0, bookmarks = 0xc18a00, keywords = 0xc18ac0,
  favorites = 0xc18b80, notcategorized = 0xc18c80, smartbookmarks = 0xbd5580,
  lower_fav = 0x11e3240, lower_score = 0,
  disable_bookmark_editing_notifier_id = 3758096547, local = 0xc18d40,
  ga_client = 0xc18e00, browse_handles = {0xbcd190, 0xbcd1e0, 0xbcd230},
  resolve_handles = 0xc18e40}

We can see that the correct EphyNode returned by
ephy_bookmarks_get_keywords() should be 0xc18ac0:

(gdb) print (EphyNode) *0xc18ac0
$5 = {ref_count = 1, id = 1, properties = 0xfd4220, parents = 0xc18b00,
  children = 0xfd4230, signals = 0xc18b40, signal_id = 10, emissions = 0,
  invalidated_signals = 0, is_drag_source = 1, is_drag_dest = 1,
  db = 0xc189c0}

However, the python bindings seem to think otherwise:

>>> bk.get_keywords()
<EphyNode at 0x2bb6cc8>

$6 = {ref_count = 14901663, id = 0, properties = 0x4c2d90,
  parents = 0x4c4790, children = 0xe43630, signals = 0x2ab63f0688d0,
  signal_id = 1057391232, emissions = 10934, invalidated_signals = 14987376,
  is_drag_source = 0, is_drag_dest = 0, db = 0x2ab64002a180}

Of course any operation made on this object will lead to a crash.


It seems that all other functions based on EphyNode lead to the same kind of problems, so maybe this is a problem that appears only for boxed types, or a mismatch in type declarations, but I don't understand GObject's internals enough to go deeper in the analysis.
Comment 23 Javier Jardón (IRC: jjardon) 2009-08-12 22:21:27 UTC
You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you.

Can you please check again if the issue you reported here still happens in a recent version and update this report by adding a comment and adjusting the 'Version' field?

Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here.

Without feedback this report will be closed as INCOMPLETE after 6 weeks.
Comment 24 Magnus Therning 2009-08-13 05:41:44 UTC
*** Bug 419712 has been marked as a duplicate of this bug. ***
Comment 25 Magnus Therning 2009-08-13 05:42:27 UTC
Please don't close this bug.  It's still present in 2.26.3.  In my experience it only affects optimised builds on amd64.
Comment 26 Javier Jardón (IRC: jjardon) 2009-08-13 08:15:54 UTC
Hello Magnus,

thank you for you response.

As for your comments,  rising the version to 2.25