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 656246 - NRE when requesting the next track
NRE when requesting the next track
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Other Extensions
2.0.0
Other Linux
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
: 648795 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-10 02:03 UTC by Chow Loong Jin
Modified: 2011-09-11 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debug output of NRE while reloading database model (56.08 KB, text/plain)
2011-08-10 02:03 UTC, Chow Loong Jin
  Details
Patch to avoid adding null models to reloaded_models (1.28 KB, patch)
2011-08-10 08:05 UTC, Chow Loong Jin
none Details | Review

Description Chow Loong Jin 2011-08-10 02:03:27 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>
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2011-08-10 07:56:10 UTC
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?
Comment 2 Chow Loong Jin 2011-08-10 08:05:49 UTC
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?
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2011-08-10 09:50:17 UTC
(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?
Comment 4 Chow Loong Jin 2011-08-12 06:43:06 UTC
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.
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2011-08-12 11:02:50 UTC
(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.
Comment 6 Chow Loong Jin 2011-08-13 10:00:01 UTC
Ah, I didn't realize that source.CurrentFilters collection shouldn't be null, sorry.
Comment 7 Andrés G. Aragoneses (IRC: knocte) 2011-08-13 10:19:41 UTC
(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". ;)
Comment 8 Chow Loong Jin 2011-08-13 10:41:44 UTC
Um yeah I meant that. Heheh. :-D
Comment 9 Bertrand Lorentz 2011-08-18 22:17:52 UTC
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.
Comment 10 Bertrand Lorentz 2011-09-11 13:39:22 UTC
*** Bug 648795 has been marked as a duplicate of this bug. ***