GNOME Bugzilla – Bug 598223
Cannot play media: Object reference not set to an instance of an object (in `Banshee.Core')
Last modified: 2010-09-25 03:16:46 UTC
Created attachment 145319 [details] Contains only the last warning messages, as the original debug file would be very long. When trying to play any media, a warming messages appears. It also crashes when trying to edit or view media information: Problem with player engine Object reference not set to an instance of an object (in `Banshee.Core'). Also, I can notice a raise in cpu usage (near 90%). Checking with --debug, i can see a very long list of warnings raising (I have very basic notions about coding, but I guess there is an iterator having problems with the filenames). Apparently, as banshee is unable to find the files (or the correct file names), you cannot play nor see media preferences. How to reproduce: Just open the 1.5.1 version of banshee and double click in a previously added element of your collection. Keep on the good work.
When I imported some songs from a CD, the songs played correctly. Perhaps it's a problem with old libraries, when upgrading from older versions of banshee.
A workaround is deleting the library and then, rescan the music collection. I moved my media files out and in the folder of the library, and it worked.
That is a valid workaround for this bug because what indeed happened is that your database was not migrated correctly from the 1.4.3 format to the 1.5.0 one. I have no idea why.
I wish I had coding powers... Is anything else I can do to help?
Do you still have a copy of your database file before you switched to version 1.5.1 ? If yes, could you please send it to me by e-mail ? Did you upgrade from version 1.4.3 directly to version 1.5.1, or did you use any version in between ? Version 1.5.1 might contain a fix for this issue (see http://git.gnome.org/cgit/banshee/commit/?id=b7edd1864a50ec41fed29dd652f96618bf56d984), but it would not have been applied if you used any other version after 1.4.3.
Bertrand, I do have a copy of my old banshee.db file. I'm afraid I tried to regenerate it with banshee 1.5.1, but that didn't solve the problem. I possibly installed an intermediate version between 1.4.3 and 1.5.1 since I install it directly from the launchpad repository. So, I'm not sure that would be valuable, but if it is, just let me know.
Starting from banshee 1.5.0, all file paths in the database should be absolute. Existing paths should have been migrated automatically. The code now assumes that a path coming from the DB is absolute. If it's not, crashes happen in a lot of places (playing the file, editing its metadata, etc.). I had a look into another database that was exhibiting this problem : A lot of URIs are relative, although the migration was executed (DatabaseVersion=35). If I make it so that the migration is re-executed (by resetting manually DatabaseVersion to 30 in the DB), then all the URIs are migrated properly and are absolute. So I don't understand what's going on here. What would be very helpful is if somebody could send me a copy of a banshee.db that was not run with banshee 1.5.x yet but which triggers the problem when run with banshee 1.5.1.
A recently reported bug and the subsequent testing I did in it leads me to think that these kind of bugs are indeed caused, not because the DB migration code has some edge-case bug, but because the version of mono used to run banshee was old enough to have bugs in the URI or related clases. I am talking about bug 626426. Could the reporter, or any other user that experienced this bug, tell the version of Mono they were running?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!