GNOME Bugzilla – Bug 651881
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
Last modified: 2011-09-23 10:32:39 UTC
Created attachment 189236 [details] banshee.log 1) Play music 2) Close banshee (crash) Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at System.NumberFormatter.ResetCharBuf (int) <IL 0x00008, 0x0001f> at System.NumberFormatter.FormatDecimal (int,System.Globalization.NumberFormatInfo) <IL 0x00024, 0x00047> at System.NumberFormatter.IntegerToString (string,System.IFormatProvider) <IL 0x000a4, 0x000df> at System.NumberFormatter.NumberToString (string,int,System.IFormatProvider) <IL 0x00013, 0x0005b> at int.ToString (string,System.IFormatProvider) <IL 0x00004, 0x00027> at string.FormatHelper (System.Text.StringBuilder,System.IFormatProvider,string,object[]) <IL 0x0015c, 0x0060e> at string.Format (System.IFormatProvider,string,object[]) <IL 0x00004, 0x00027> at string.Format (string,object[]) <IL 0x00000, 0x0001f> at Banshee.SmartPlaylist.SmartPlaylistSource.Refresh () [0x00000] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:406 at Banshee.SmartPlaylist.SmartPlaylistSource.RefreshAndReload () [0x00000] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:375 at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) [0x00027] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/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 Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey21.<>m__18 () [0x0004d] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:409 at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) [0x00017] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Hyena/Hyena/Hyena/ThreadAssist.cs:112 at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) [0x00014] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:398 at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) [0x00000] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/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.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:221 at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () [0x0000c] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:182 at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) [0x00000] in /build/buildd/banshee-2.1.0+git20110601.r1.589cf04/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:384 at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <IL 0x00022, 0x0006f>
so what can be null and is an integer and param of format in refresh: DbId is a int? PrimarySourceId is just an int So it is DbId! nad it is set by Create called by Save (). So save () is not called before track of a smartplaylist is played... So have you create a smart playlist before playing the file ? or it is the standard ones ?
The NRE is happening inside the System.NumberFormatter.IntegerToString() method, thus it is in Mono's class libraries. Cristian, what version of Mono do you have?
I work with Ubuntu +1, upgrade my system. My version of mono is 2.10.4-2.
And you can still reproduce the problem with that version of Mono?
I use banshee and rhythmbox. I think not, but I could not tell.
So String.Format do not manage nullable int. But we can fixed it in banshee and report a bug on mono bugzilla.
Olivier: cool, you have a small testcase app that can reproduce the problem? If yes, open a bug in http://bugzilla.xamarin.com/ and post the URL here.
I have done a testcase and it work with my version. So must be a bug in old mono version. I think we can closed it as not a gnome bug...
(In reply to comment #5) > I use banshee and rhythmbox. I think not, but I could not tell. Now that you have a new Mono version we think you should not hit this bug again. But please if you hit it again, post on this bug again or reopen it so we can track it down to report a better bug upstream. Thanks.
*** Bug 653297 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 638641 ***