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 688324 - Banshee 2.6 crashes with 'System.NullReferenceException' when finishing playback
Banshee 2.6 crashes with 'System.NullReferenceException' when finishing playback
Status: RESOLVED INCOMPLETE
Product: banshee
Classification: Other
Component: general
2.6.0
Other Linux
: Normal critical
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-14 15:58 UTC by Florian Berger
Modified: 2013-10-03 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log Banshee 2.6 after it crash (430 bytes, text/plain)
2012-11-21 19:19 UTC, Anthony Ruhier
  Details
Output from crash with standard out, error, and debugging on mono turned on. (19.73 KB, text/plain)
2012-11-27 14:39 UTC, Alex
  Details
Possible bugfix v1 (1.73 KB, patch)
2012-11-30 20:04 UTC, Andrés G. Aragoneses (IRC: knocte)
needs-work Details | Review
Possible bugfix v2 (2.34 KB, patch)
2012-11-30 20:20 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review
Possible bugfix v3 (2.49 KB, patch)
2012-11-30 22:10 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review

Description Florian Berger 2012-11-14 15:58:17 UTC
Every now and then, but annoyingly often, Banshee 2.6 crashes while about to finish playing a file.

The traceback is:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at Banshee.Sources.DatabaseSource.NeedsReloadWhenFieldsChanged (Hyena.Query.QueryField[]) <0x00053>
at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x0006f>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00046>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <0x00072>
at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey24.<>m__46 () <0x000af>
at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) <0x0002d>
at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) <0x00069>
at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) <0x00019>
at Banshee.Collection.Database.DatabaseTrackInfo.Save (bool,Hyena.Query.QueryField[]) <0x00259>
at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () <0x00073>
at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <0x00018>
at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <0x00059>

The crash seems not to be bound to particular files - sometimes it plays them fine, some times not.

Banshee version is 2.6.0, system is Gentoo Linux, kernel 3.0.4-ck, i686, Mono 2.10.2, GStreamer 0.10.35.

Thanks for considering.
Comment 1 Bertrand Lorentz 2012-11-14 18:19:36 UTC
Thank you for your bug report.

When a track is finished, it's "Last played" field is updated, the smart playlists get notified about the change and they check whether they need to update themselves because of that change.
And that's were the crash happens.

But looking at the DatabaseSource.NeedsReloadWhenFieldsChanged method, I can't see what could be null there, we already have checks everywhere.

Could you run Banshee in debug mode, with "banshee --debug", and when the crash happens again, please paste the full stacktrace here.
It should contain line numbers, and hopefully that will help figuring this out.
Comment 2 Florian Berger 2012-11-14 18:33:25 UTC
There we go:

...
[15 Debug 19:30:27.152] (libbanshee:player) [Gapless] Requesting next track

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at Banshee.Sources.DatabaseSource.NeedsReloadWhenFieldsChanged (Hyena.Query.QueryField[]) [0x00023] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:181
at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) [0x00016] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:489
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00044, 0x00046>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey24.<>m__46 () [0x0004d] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:428
at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) [0x00017] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Hyena/Hyena/Hyena/ThreadAssist.cs:112
at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) [0x00014] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:417
at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:354
at Banshee.Collection.Database.DatabaseTrackInfo.Save (bool,Hyena.Query.QueryField[]) [0x00118] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:225
at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () [0x0000c] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:186
at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:436
at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <IL 0x00022, 0x00059>

Hope that helps.
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2012-11-16 22:54:32 UTC
Wow, that is indeed a very weird one.

Do you mind upgrading your Mono version to see if that helps? You can try a 2.10.x that is a bit higher than 2.10.2, or, even better, you could try 3.0.

Thanks
Comment 4 Bogdan Shubenok 2012-11-18 18:52:07 UTC
I have the same problem in ArchLinux
                                                                        
Mono JIT compiler version 2.10.8 (tarball Sat Oct  6 23:22:30 UTC 2012)

banshee --debug
...
...

1 Debug 11:26:04.756] TrackInfoDisplay RenderAnimation: 23.00 FPS
[1 Debug 11:26:05.245] Querying model for track to play in song:Next mode
[1 Debug 11:26:05.433] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[1 Debug 11:26:05.500] Player state change: Playing -> Idle
[1 Debug 11:26:05.504] Player state change: Idle -> Loading
[1 Debug 11:26:05.661] Player state change: Loading -> Loaded
[1 Debug 11:26:05.666] (libbanshee:player) [gapless] Triggering track-change signal
[1 Debug 11:26:05.827] Player state change: Loaded -> Playing
[1 Debug 11:26:06.844] TrackInfoDisplay RenderAnimation: 22.00 FPS
[22 Warn  11:26:11.981] Caught an exception - System.UriFormatException: Invalid URI: The Authority/Host could not be parsed. (in `System')
  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00027] in /build/src/mono-2.10.8/mcs/class/System/System/Uri.cs:1342 
  at System.Uri.ParseUri (UriKind kind) [0x00000] in /build/src/mono-2.10.8/mcs/class/System/System/Uri.cs:1199 
  at System.Uri.Merge (System.Uri baseUri, System.String relativeUri) [0x002f7] in /build/src/mono-2.10.8/mcs/class/System/System/Uri.cs:341 
  at System.Uri..ctor (System.Uri baseUri, System.String relativeUri) [0x0004b] in /build/src/mono-2.10.8/mcs/class/System/System/Uri.cs:227 
  at Banshee.Metadata.Rhapsody.RhapsodyQueryJob.Run () [0x00058] in /build/src/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Metadata.Rhapsody/RhapsodyQueryJob.cs:86 
  at Banshee.Metadata.MetadataServiceJob.Run () [0x00053] in /build/src/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs:88 
[1 Debug 11:26:24.229] Querying model for track to play in song:Next mode
[1 Debug 11:26:24.410] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[1 Debug 11:26:24.470] Player state change: Playing -> Idle
[1 Debug 11:26:24.474] Player state change: Idle -> Loading
[1 Debug 11:26:24.641] Player state change: Loading -> Loaded
[1 Debug 11:26:24.645] (libbanshee:player) [gapless] Triggering track-change signal
[1 Debug 11:26:24.891] Player state change: Loaded -> Playing
Stacktrace:


[1]  + segmentation fault  banshee --debug
Comment 5 Florian Berger 2012-11-20 20:44:47 UTC
(In reply to comment #3)
> Do you mind upgrading your Mono version to see if that helps? You can try a
> 2.10.x that is a bit higher than 2.10.2, or, even better, you could try 3.0.

That will take a bit, as compiling Mono (distribution is Gentoo) takes time and disk space that I am currently rather short of.

I'll report back with an updated Mono.
Comment 6 Florian Berger 2012-11-20 20:47:12 UTC
(In reply to comment #4)
> I have the same problem in ArchLinux

I don't think that's the same.

My Problem is an 'Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object' when a track finishes. Your stack trace looks different.
Comment 7 Anthony Ruhier 2012-11-21 19:19:00 UTC
Created attachment 229593 [details]
Log Banshee 2.6 after it crash
Comment 8 Anthony Ruhier 2012-11-21 19:19:14 UTC
Hello,
I have the same problem on Arch Linux with gnome-shell 3.6.2.

It crashes randomly, but more often it does when a song just ends.
Comment 9 Anthony Ruhier 2012-11-21 19:24:13 UTC
And I give you a link for the bug report made on archlinux.org so you can have few logs about different users : https://bugs.archlinux.org/task/32390
Comment 10 Florian Berger 2012-11-21 21:40:03 UTC
(In reply to comment #8)
> I have the same problem on Arch Linux with gnome-shell 3.6.2.

I've had a look at the logs, and I think it is not the same problem.

Yours seems to be related to DBUS. Mine is reproduceably related to a NullReferenceException.

I've edited the title of this bug to be more specific.

Please open a new bug for your crash.

Thanks!
Comment 11 Alex 2012-11-27 14:39:41 UTC
Created attachment 230003 [details]
Output from crash with standard out, error, and debugging on mono turned on.

Generated with banshee -v --debug > out 2>&1
Comment 12 Alex 2012-11-27 14:42:47 UTC
Sorry, previous post was truncated, further information:

Ubuntu 12.04
Banshee 2.6 (2.6.0)
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)
GStreamer 0.10.36
Linux 3.2.0-33-generic x86_64 x86_64 GNU/Linux
Comment 13 Florian Berger 2012-11-30 19:11:06 UTC
(In reply to comment #3)
> Do you mind upgrading your Mono version to see if that helps? You can try a
> 2.10.x that is a bit higher than 2.10.2, or, even better, you could try 3.0.

I have upgraded to Mono 2.11.4 .

It took a while for the bug to surface, but here we go again:


[1 Debug 20:04:15.556] OnEventChanged called with StartOfStream.  Replacing current_track with pending_track: "Happy Up Here"
[1 Info  20:04:15.609] Uncached artwork size 35 requested
[53 Debug 20:04:16.610] Starting - Metadaten in Datei schreiben
[54 Debug 20:04:16.646] Finished - Metadaten in Datei schreiben
[1 Debug 20:04:16.669] TrackInfoDisplay RenderAnimation: 23,00 FPS
[1 Debug 20:05:50.013] Refreshing any podcasts that haven't been updated in over an hour
[38 Debug 20:06:57.151] (libbanshee:player) [Gapless] Requesting next track
[4 Warn  20:06:58.613] Executed in 613ms DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 20;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 20 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.PlayCount IS NOT NULL AND CoreTracks.PlayCount <= 10) And (CoreTracks.SkipCount IS NOT NULL AND CoreTracks.SkipCount < 10) And (CoreTracks.LastPlayedStamp IS NULL OR CoreTracks.LastPlayedStamp < 1351880746) And (CoreTracks.Genre IS NULL OR HYENA_SEARCH_KEY(CoreTracks.Genre) != 'christmas') And (CoreTracks.Genre IS NULL OR HYENA_SEARCH_KEY(CoreTracks.Genre) != 'schlager')))  

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Banshee.Sources.DatabaseSource.NeedsReloadWhenFieldsChanged (Hyena.Query.QueryField[]) [0x00023] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:181
at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) [0x00016] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:489
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00044, 0x00046>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey24.<>m__46 () [0x0004d] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:428
at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) [0x00017] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Hyena/Hyena/Hyena/ThreadAssist.cs:112
at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) [0x00014] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:417
at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:354
at Banshee.Collection.Database.DatabaseTrackInfo.Save (bool,Hyena.Query.QueryField[]) [0x00118] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:225
at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () [0x0000c] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:186
at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:436
at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <IL 0x00024, 0x0005b>

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at Banshee.Sources.DatabaseSource.NeedsReloadWhenFieldsChanged (Hyena.Query.QueryField[]) [0x00023] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:181
at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) [0x00016] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs:489
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00044, 0x00046>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at (wrapper delegate-invoke) <Module>.invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs) <IL 0x00059, 0x00072>
at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey24.<>m__46 () [0x0004d] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:428
at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) [0x00017] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Hyena/Hyena/Hyena/ThreadAssist.cs:112
at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) [0x00014] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:417
at Banshee.Sources.PrimarySource.NotifyTracksChanged (Hyena.Query.QueryField[]) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs:354
at Banshee.Collection.Database.DatabaseTrackInfo.Save (bool,Hyena.Query.QueryField[]) [0x00118] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:225
at Banshee.Collection.Database.DatabaseTrackInfo.UpdateLastPlayed () [0x0000c] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:186
at Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) [0x00000] in /var/tmp/portage/media-sound/banshee-2.6.0/work/banshee-2.6.0/src/Backends/Banshee.GStreamer/Banshee.GStreamer/PlayerEngine.cs:436
at (wrapper native-to-managed) Banshee.GStreamer.PlayerEngine.OnAboutToFinish (intptr) <IL 0x00024, 0x0005b>


Hope that helps. Thanks for looking into this.
Comment 14 Andrés G. Aragoneses (IRC: knocte) 2012-11-30 20:04:28 UTC
Created attachment 230335 [details] [review]
Possible bugfix v1

Hey Florian, thanks so much for getting back to me!

Do you mind trying this patch? I may have possible idea of why this is happening. But if this patch works for you, I guess I'm certain that I'm in the right direction!

Thanks again
Comment 15 Andrés G. Aragoneses (IRC: knocte) 2012-11-30 20:18:19 UTC
Comment on attachment 230335 [details] [review]
Possible bugfix v1

Oops, sorry, this patch is not ready yet, wait some minutes so I can post a new one!
Comment 16 Andrés G. Aragoneses (IRC: knocte) 2012-11-30 20:20:59 UTC
Created attachment 230337 [details] [review]
Possible bugfix v2

This is the one! sorry for the previous invalid patch.

Hopefully it works.
Comment 17 Andrés G. Aragoneses (IRC: knocte) 2012-11-30 22:10:01 UTC
Created attachment 230351 [details] [review]
Possible bugfix v3

Having looked a bit more, I think I forgot one case. This new version of the patch should cover it.

Alex, Bogdan or Anthony: feel free to test the patch if you can, as well.
Thanks
Comment 18 Anthony Ruhier 2012-12-02 11:50:49 UTC
Many thanks knocte, it seems to work.

I will tell you in a few days if I doesn't get any bug.
Comment 19 Andrés G. Aragoneses (IRC: knocte) 2012-12-02 13:04:40 UTC
Mmm, Anthony thanks for testing, but now that I look at the comments you posted, I'm thinking that the bug you were experiencing is not the same as this one.

Please look carefully at the stacktraces: Florian's original report is a NullReferenceException (managed code) at DatabaseSource.cs, line 181, while the bug you point out is about a DBus problem, which seems to match more with bug 689417.
Comment 20 Anthony Ruhier 2012-12-02 13:34:53 UTC
It's not exactly a dbus problem, but you're right, it doesn't fix crashes.

It's more a gconf problem, not fixed in ArchLinux but fixed in Ubuntu.
Comment 21 Andrés G. Aragoneses (IRC: knocte) 2012-12-08 13:46:10 UTC
Anthony, please use the other bug to comment about that issue.

To the others, and especially Florian since he's the original reporter: do you have time to test the patch? If you don't, I can offer you a DLL that you can test by replacing it in your system. Is that fine? If yes, tell me the architecture you're on (32bits or 64bits) just in case.
Comment 22 Florian Berger 2012-12-08 18:21:46 UTC
(In reply to comment #21)
> To the others, and especially Florian since he's the original reporter: do you
> have time to test the patch?

Not quickly, but I will take time to test it in the next few weeks (before Christmas for sure. :-) ).
Comment 23 Andrés G. Aragoneses (IRC: knocte) 2013-01-12 22:30:16 UTC
ping :)
Comment 24 Tobias Mueller 2013-05-08 00:09:03 UTC
So what do we do with the patch given the lack of response here?
Comment 25 Florian Berger 2013-05-08 05:48:30 UTC
Sorry about that. It's still on my list, but I have switched to another audio player on my home workstation since, as restarting Banshee every couple of songs was just not an option. That made the matter less pressing for me.

But there is a holiday here tomorrow, and I'll try the patch then. For real. :-)

FYI, I have been using the latest stable Banshee on OS X at work for about a month now, and have not yet encountered that problem, save for one single occasion.
Comment 26 Florian Berger 2013-05-11 18:39:23 UTC
Alright, I finally have fetched the current git repository and built Banshee from there. It reports being Banshee 2.7.0.

So far I haven't been able to reproduce the behaviour reported in this bug with that version. Given that, it does not make much sense to apply the patch. I will use Banshee for a couple of days and report back whether the bug surfaces again.
Comment 27 Andrés G. Aragoneses (IRC: knocte) 2013-10-03 17:06:40 UTC
(In reply to comment #26)
> Alright, I finally have fetched the current git repository and built Banshee
> from there. It reports being Banshee 2.7.0.
> 
> So far I haven't been able to reproduce the behaviour reported in this bug with
> that version. Given that, it does not make much sense to apply the patch. I
> will use Banshee for a couple of days and report back whether the bug surfaces
> again.

I'm assuming you haven't reproduced it since, so I'm closing this.
Please reopen the bug if it appears again.