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 347665 - replace entry-to-id map with a RhythmDBEntry property
replace entry-to-id map with a RhythmDBEntry property
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: DAAP
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 356959 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-16 12:01 UTC by Jonathan Matthew
Modified: 2006-09-20 20:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (8.10 KB, patch)
2006-07-16 12:04 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2006-07-16 12:01:29 UTC
Storing the entry ID inside the entry saves a bit of memory (~200k for my 12000 entry library) when sharing is enabled, and the entry ID may be useful for other things.  Perhaps we could look at adding a persistant ID too.  We could possibly do this using the entry creation time, fudging it to make the IDs unique.
Comment 1 Jonathan Matthew 2006-07-16 12:04:43 UTC
Created attachment 68990 [details] [review]
patch

entry IDs start at 1 because some daap clients ignore ID 0.
Comment 2 James "Doc" Livingston 2006-07-18 10:24:07 UTC
Looks good to me. Should we move the id->entry map up to Rhythmdb (e.g. a vfunc like lookup_by_location, but for ids) or leave it in the daap code?
Comment 3 Jonathan Matthew 2006-07-22 08:46:09 UTC
That sounds like a good idea.
Comment 4 Jonathan Matthew 2006-08-19 07:25:15 UTC
Committed this because I need it for something else I'm doing.  I'll also need the other half (moving the id->entry map into rhythmdb) but I'll include that in the patch on the other bug, so I'm closing this one.
Comment 5 Alex Lancaster 2006-08-22 02:18:43 UTC
After updating to CVS with this new change, I get a crash upon attempting to play a track.  gstreamer continues to play the audio but RB crashes:

/tmp/rhythmbox/bin/rhythmbox
sys:1: Warning: g_value_get_ulong: assertion `G_VALUE_HOLDS_ULONG (value)' failed
sys:1: Warning: g_date_set_julian: assertion `g_date_valid_julian (j)' failed
sys:1: Warning: g_date_get_year: assertion `g_date_valid (d)' failed
sys:1: Warning: g_date_set_dmy: assertion `g_date_valid_dmy (day, m, y)' failed
sys:1: Warning: g_date_get_julian: assertion `g_date_valid (d)' failed

RhythmDB-ERROR **: file /home/alex/src/remote-cvs/gnome.org/rhythmbox/rhythmdb/rhythmdb.c: line 3951 (rhythmdb_entry_get_string): should not be reached
aborting...

Backtrace was generated from '/tmp/rhythmbox/bin//rhythmbox'

Using host libthread_db library "/lib/libthread_db.so.1".
`shared object read from target memory' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1208690992 (LWP 30041)]
[New Thread -1330967648 (LWP 30060)]
[New Thread -1273844832 (LWP 30057)]
[New Thread -1288721504 (LWP 30056)]
[New Thread -1313899616 (LWP 30053)]
[New Thread -1305506912 (LWP 30051)]
[New Thread -1273168992 (LWP 30043)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1208690992 (LWP 30041))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/libc.so.6
  • #6 abort
    from /lib/libc.so.6
  • #7 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #8 g_log
    from /usr/lib/libglib-2.0.so.0
  • #9 g_assert_warning
    from /usr/lib/libglib-2.0.so.0
  • #10 rhythmdb_entry_get_string
    at /home/alex/src/remote-cvs/gnome.org/rhythmbox/rhythmdb/rhythmdb.c line 3951
  • #11 rb_audioscrobbler_song_changed_cb
    at /home/alex/src/remote-cvs/gnome.org/rhythmbox/plugins/audioscrobbler/rb-audioscrobbler.c line 1010

Comment 6 Alex Lancaster 2006-08-22 04:15:25 UTC
OK, was having trouble resolving which plugins it was using.  Have managed a "make distclean; ./configure; make; make install" from scratch and it works again, so closing bug.
Comment 7 Karsten Bräckelmann 2006-09-20 20:19:55 UTC
*** Bug 356959 has been marked as a duplicate of this bug. ***