GNOME Bugzilla – Bug 656246
NRE when requesting the next track
Last modified: 2011-09-11 13:39:22 UTC
Created attachment 193511 [details] debug output of NRE while reloading database model According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637266, Banshee crashes randomly from time to time while changing audio tracks/listening to music. Attached is the full debug output, with the stack trace extracted out below: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at Banshee.Collection.Database.DatabaseTrackListModel.Reload (Hyena.Data.IListModel) [0x001e0] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:316 at Banshee.Collection.Database.DatabaseTrackListModel.Reload () [0x00000] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:255 at Banshee.Sources.DatabaseSource.RateLimitedReload () [0x0000d] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:413 at Banshee.Base.RateLimiter.InnerExecute () [0x0001b] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Base/RateLimiter.cs:64 at Banshee.Base.RateLimiter.Execute () [0x00036] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Base/RateLimiter.cs:55 at Banshee.Sources.DatabaseSource.Reload () [0x00010] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:407 at Banshee.SmartPlaylist.SmartPlaylistSource.Reload () [0x0002c] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:389 at Banshee.SmartPlaylist.SmartPlaylistSource.RefreshAndReload () [0x00006] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:376 at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) [0x00027] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:490 at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00044, 0x0005e> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00098> at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey21.<>m__18 () [0x0004d] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:409 at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) [0x00017] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Hyena/Hyena/Hyena/ThreadAssist.cs:112 at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) [0x00014] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:398 at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) [0x00000] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:335 at Banshee.Collection.Database.DatabaseTrackInfo.Save (bool,Hyena.Query.QueryField[]) [0x00118] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:221 at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () [0x0000c] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:182 at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) [0x00000] in /build/buildd-banshee_2.0.1-3-amd64-NCQrjo/banshee-2.0.1/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:384 at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <IL 0x00022, 0x0006f>
For the record, src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:316 is: // Trigger these after the track list, b/c visually it's more important for it to update first foreach (IFilterListModel model in reload_models) { model.RaiseReloaded (); } So maybe "model" was null. It would be good to test with a newer version of Mono though, because this one (2.6.7) may still have some bug in the runtime that causes this without any reason. Can you ask the original report to test upgrading to check if the problem goes away?
Created attachment 193517 [details] [review] Patch to avoid adding null models to reloaded_models From the downstream bug report: ii mono-runtime 2.6.7-5 Mono runtime So the version of mono running there is already 2.6.7. I've attached an untested patch. Could you look into whether it's correct/feasible?
(In reply to comment #2) > So the version of mono running there is already 2.6.7 Just to be sure, I meant a mono version *higher* than 2.6.7. > I've attached an > untested patch. Could you look into whether it's correct/feasible? Have you tested the patch?
From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637266#24, the patch I attached to this bug report works. The packages I linked to the Debian bug report were built with this same patch in place.
(In reply to comment #4) > From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637266#24, the patch I > attached to this bug report works. The packages I linked to the Debian bug > report were built with this same patch in place. Cool, thanks for the info. Now, I'm not the one to review the patch (a maintainer should) but I'll give my opinion: although this fixes the problem, the patch is just a workaround. What I mean is that we should find the root cause of why a filter object in the source.CurrentFilters collection could be null (because it feels like it shouldn't). So until we find the cause of that, IMO this patch should be applied by packagers or to the stable-branch, but not master.
Ah, I didn't realize that source.CurrentFilters collection shouldn't be null, sorry.
(In reply to comment #6) > Ah, I didn't realize that source.CurrentFilters collection shouldn't be null, > sorry. I guess you mean "an element in the CurrentFilters collection shouldn't be null". ;)
Um yeah I meant that. Heheh. :-D
Thanks for the patch. Although I agree with Andrés comment, as I couldn't find the root cause of the problem, I committed the patch as-is for now, to avoid those crashes.
*** Bug 648795 has been marked as a duplicate of this bug. ***