rhythmbox crashes soon after being start in Ubuntu 16.04.1 with rhythmdb_entry_get_entry_type: assertion 'entry != NULL' failed

Bug #1630455 reported by Roman Puchkovskiy on 2016-10-05
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
rhythmbox (Ubuntu)
Undecided
Unassigned

Bug Description

For a few years, I used Ubuntu 12.04. I used rhythmbox in it all these years, it worked fine. Some library was collected.

Then I upgraded to 14.04, and to 16.04 right away.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

After I start rhythmbox, in a few seconds it crashes, even if I do nothing. Here is the output:

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): Gtk-WARNING **: Duplicate child name in GtkStack: Add to Playlist

(rhythmbox:22810): RhythmDB-CRITICAL **: rhythmdb_entry_get_entry_type: assertion 'entry != NULL' failed
Ошибка сегментирования (сделан дамп памяти)

rhythmbox version is 3.3-1ubuntu7.

I'm filing this bug here by hand because aport does not see these crashes for some reason.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rhythmbox (Ubuntu):
status: New → Confirmed
martell (martell) wrote :

I'm also affected by this bug after upgrading to Ubuntu 16.04 LTS.

Deleting the rhythmdb.xml and importing the files again solves the problem. But this means I lose my ratings on my songs and so I lose the rating work I carefully did in the past. This is not what I want.

Comparing the old and new rhythmdb.xml I notice that the new file contains an additional xml entry mtime. e.g. "<mtime>1237841180</mtime>". This is the only difference I can see between the files. So I suspect because this entry isn't present in the old rhythmdb.xml file, it will trigger the 'entry != NULL' in the code.

I intend to try to add this entry in the old rhythmdb.xml for each song by scripting and validate if this indeed solves the problem.

So this is an upgrade problem. The good solution would be dealing more gracefully the missing entry.

Kind regards.

martell (martell) wrote :

I can confirm now that the missing <mtime> causes the crash. Added this in the old rhythmdb.xml file and everything works as before. For people facing the same problem, here is my script to perform on the file (supposes perl and File::Util package installed). Don't forget to take a backup and I take no responsibility of the result. This worked for me, but YMMV.

script:

use strict;
use File::Util qw(:all); # module to find and navigate files and directories

if ($#ARGV != 1) {

 print << 'EOF';

mtime.pl
========
Will add mtime in rhythmdb.xml file

Arguments
---------

in: the name of the input file
out: the name of the output file

EOF

}
else {

 my $source_file = $ARGV[0];
 my $target_file = $ARGV[1];

 my $f = File::Util->new();

 # check if given files exists
 unless ($f->existent($source_file)) {print "The source file $source_file doesn't exist!\n"; exit;}

 # read the file
 my $fh_in;
 my $fh_out;

 open $fh_in, "<", $source_file or die ("Could not open file $source_file for reading.");
 open $fh_out, ">", $target_file or die ("Could not open file $target_file for writing.");

 while (my $line = <$fh_in>) {

  print $fh_out $line;

  #print $line;

  if ($line =~ m/\s*\<location\>file:\/\/(.+)\<\/location\>\n*/){

   my $file = $1;

   $file =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;

   print $file . "\n";

   if ($f->existent($file)) {

    print $fh_out " <mtime>" . $f->last_modified($file) . "</mtime>\n";

   }

  }

 }

 close $fh_in;
 close $fh_out;

 exit;

}

Noe (noecordmart) wrote :

I had this problem in Ubuntu 16.04.1 LTS and rhythmbox 3.3.

The only way I found till now to prevent rhythmbox closing, was to disable the automatic discovery of new audio files.

Thank you martell. Your script solved the problem.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers