GNOME Bugzilla – Bug 682294
segmentation fault when attempting to python query the rhythmdb
Last modified: 2018-05-24 17:39:39 UTC
Created attachment 221889 [details] GDB backtrace starting just before pressing ENTER to invoke the crash Using Ubuntu 12.04 and rhythmbox 2.96 - have tested rhythmbox 2.97 via the WebUpd8 PPA and have the same issue. I originally asked this on rhythmbox-dev mailing list but was advise to file here with a backtrace. I need some help trying to identify what the issue is and the inability to do a python query. The reason is that I'm trying to develop python plugins and I need the query functionality to complete the plugins I'm writing. Many thanks in advance. Copy of the mailing list request and attached is the backtrace. I've spent a frustrating weekend trying to get a simple python query to work in both v2.96 (Ubuntu 12.04) and v2.97 (Ubuntu 12.04 + WebUpd8 PPA) I've also tried reloading 12.04 from scratch, updating and then repeating the following - but with the same results Anybody have any ideas on how to debug this further? From the python interactive console I've typed: from gi.repository import RB, GLib db = shell.props.db query = GLib.PtrArray() db.query_append_params( query, RB.RhythmDBQueryType.EQUALS, RB.RhythmDBPropType.ARTIST, 'Culture Club' ) This produces a "segmentation fault (core dump)" error message at the execution of "db.query_append_params". There are a few "Culture Club" tracks so I was trying to query for them. Obviously to complete the query I think I need to db.do_full_query_parsed(query_model, query) but I cant get that far... running rhythmbox --debug I see the following at the point of the db.query_append_params and segmentation fault. (21:14:16) [0x9d1baa0] [rhythmdb_read_enter] rhythmdb.c:1229: counter: 1 (21:14:16) [0xabb4750] [query_thread_main] rhythmdb.c:4037: entering query thread (21:14:16) [0xabb4750] [rhythmdb_query_internal] rhythmdb.c:4014: doing query (21:14:16) [0xabb4750] [do_query_recurse] rhythmdb-tree.c:2305: doing recursive query, 1 conjunctions (21:14:16) [0xabb4750] [rhythmdb_query_model_add_results] rhythmdb-query-model.c:2248: adding 145 entries (21:14:16) [0xabb4750] [rhythmdb_query_internal] rhythmdb.c:4020: completed (21:14:16) [0x9d1baa0] [rhythmdb_read_enter] rhythmdb.c:1229: counter: 2 (21:14:16) [0xabb4750] [query_thread_main] rhythmdb.c:4037: entering query thread (21:14:16) [0xabb4750] [rhythmdb_query_internal] rhythmdb.c:4014: doing query (21:14:16) [0xabb4750] [do_query_recurse] rhythmdb-tree.c:2305: doing recursive query, 1 conjunctions (21:14:16) [0xabb4750] [rhythmdb_query_model_add_results] rhythmdb-query-model.c:2248: adding 0 entries (21:14:16) [0xabb4750] [rhythmdb_query_internal] rhythmdb.c:4020: completed (21:14:16) [0x9d1baa0] [idle_process_update] rhythmdb-query-model.c:1187: inserting 145 rows (21:14:16) [0x9d1baa0] [idle_process_update] rhythmdb-query-model.c:1187: inserting 0 rows (21:14:16) [0x9d1baa0] [rhythmdb_process_one_event] rhythmdb.c:2537: processing RHYTHMDB_EVENT_QUERY_COMPLETE (21:14:16) [0x9d1baa0] [rhythmdb_read_leave] rhythmdb.c:1243: counter: 1 (21:14:16) [0x9d1baa0] [rhythmdb_process_one_event] rhythmdb.c:2530: processing RHYTHMDB_EVENT_THREAD_EXITED (21:14:16) [0x9d1baa0] [rhythmdb_process_one_event] rhythmdb.c:2537: processing RHYTHMDB_EVENT_QUERY_COMPLETE (21:14:16) [0x9d1baa0] [rhythmdb_read_leave] rhythmdb.c:1243: counter: 0 (21:14:16) [0x9d1baa0] [rhythmdb_process_one_event] rhythmdb.c:2530: processing RHYTHMDB_EVENT_THREAD_EXITED Segmentation fault (core dumped)
This is a 64bit vs 32bit issue - with the twist that 64bit linux works correct whereas 32bit gives a segmentation fault. Testing 32bit Fedora 17, LMDE and Ubuntu 12.04.1 all show the same segmentation issue. Testing 64bit Fedora 17, LMDE and Ubuntu 12.04.1 pass with flying colours. Thus - there is a bug here - but you need to run 32bit to expose the issue.
The problem here is that gobject-introspection isn't creating the GPtrArray correctly. It probably just happens to work on 64bit linux because of structure alignment and padding.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/1215.