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 615483 - Banshee crashes on Albumgrid selection
Banshee crashes on Albumgrid selection
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal minor
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-11 21:37 UTC by Niklas Schnelle
Modified: 2010-06-06 22:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem (1.11 KB, patch)
2010-04-11 21:37 UTC, Niklas Schnelle
needs-work Details | Review

Description Niklas Schnelle 2010-04-11 21:37:53 UTC
Created attachment 158454 [details] [review]
Patch to fix the problem

On selection of an album in the AlbumGridView (doesn't happen if BANSHEE_DISABLE_GRID is set).
It also only happens with accessability features turned on and gtk >= 2.20.

The problem is that the AlbumListView when BANSHEE_DISABLE_GRID is not set, doesn't have a column and ColumnManager is null and this makes banshee crash in 

"Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].get_n_columns ()"

The easiest way we found to fix it is adding an invisible column to the view. 
Because Atk.Object OnRefChild (int index) depends quite heavily on it fixing there might introduce more bugs. 
A patch is attached to fix the problem in way described above.
Greetings Konstantin Weitz and Niklas Schnelle
Comment 1 Gabriel Burt 2010-04-12 06:25:24 UTC
Hey Niklas, thanks for the bug report!

This sounds somewhat similar to bug #615396 - maybe a duplicate?  Can you paste in the full crash stack trace?
Comment 2 Niklas Schnelle 2010-04-12 07:48:34 UTC
It's definitely not the same bug, I might have a look into that one aswell because the fix for my bug attached in the first post doesn't solve the other bug even though I've got the feeling its related, at least it goes through some of the code paths I examined yesterday to create the patch above.
But I can say it's not caused by the AlbumListView not having a ColumnManager and/org columns.

Here is my stack trace:
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.ArgumentNullException: Argument cannot be null.
Parameter name: source
  at System.Linq.Check.SourceAndSelector (System.Object source, System.Object selector) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.Count[Column] (IEnumerable`1 source, System.Func`2 selector) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].get_n_columns () [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].get_NColumns () [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].RefAt (Int32 row, Int32 column) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].get_ActiveCell () [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.AlbumInfo].OnSelectionFocusChanged (System.Object o, System.EventArgs a) [0x00000] in <filename unknown>:0 
  at Hyena.Collections.Selection.set_FocusedIndex (Int32 value) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.ListView`1[T].FocusModelRow (Int32 index) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.ListView`1[T].OnListButtonPressEvent (Gdk.EventButton evnt) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Gui.ListView`1[T].OnButtonPressEvent (Gdk.EventButton evnt) [0x00000] in <filename unknown>:0 
  at Gtk.Widget.buttonpressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.buttonpressevent_cb(IntPtr widget, IntPtr evnt)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Banshee.Gui.GtkBaseClient.Run()
   at Banshee.Gui.GtkBaseClient.Startup()
   at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup)
   at Banshee.Gui.GtkBaseClient.Startup()
   at Banshee.Gui.GtkBaseClient.Startup(System.String[] args)
   at Nereid.Client.Main(System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.Reflection.Assembly , System.String[] )
   at System.AppDomain.ExecuteAssemblyInternal(System.Reflection.Assembly a, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile, System.Security.Policy.Evidence assemblySecurity, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile)
   at Booter.Booter.BootClient(System.String clientName)
Comment 3 Mike Urbanski 2010-04-14 08:58:47 UTC
I'm having similar, most likely related, issues in the podcast-ng branch too.  

Object reference not set to an instance of an object
  at Hyena.Data.Gui.ListView`1[T].get_Selection () [0x00000] in /home/mike/Projects/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs:85 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.TrackInfo].get_ActiveCell () [0x00022] in /home/mike/Projects/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs:145 
  at Hyena.Data.Gui.Accessibility.ListViewAccessible`1[Banshee.Collection.TrackInfo].OnSelectionFocusChanged (System.Object o, System.EventArgs a) [0x00000] in /home/mike/Projects/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs:137 
  at Hyena.Collections.Selection.set_FocusedIndex (Int32 value) [0x00014] in /home/mike/Projects/banshee/src/Libraries/Hyena/Hyena.Collections/Selection.cs:70 
  at Hyena.Data.Sqlite.SqliteModelCache`1[Banshee.Collection.Database.DatabaseTrackInfo].RestoreSelection () [0x000dd] in /home/mike/Projects/banshee/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteModelCache.cs:414 
  at Banshee.Collection.Database.DatabaseTrackModelCache`1[Banshee.Collection.Database.DatabaseTrackInfo].Banshee.Collection.Database.IDatabaseTrackModelCache.RestoreSelection () [0x00000] in <filename unknown>:0 
  at Banshee.Collection.Database.DatabaseTrackListModel.Reload (IListModel reloadTrigger) [0x0018c] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:293 
  at Banshee.Collection.Database.DatabaseTrackListModel.Reload () [0x00000] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:244 
  at Banshee.Sources.DatabaseSource.RateLimitedReload () [0x0000d] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:416 
  at Banshee.Base.RateLimiter.InnerExecute () [0x0001b] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Base/RateLimiter.cs:64 
  at Banshee.Base.RateLimiter.Execute () [0x00036] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Base/RateLimiter.cs:55 
  at Banshee.Sources.DatabaseSource.Reload () [0x00010] in /home/mike/Projects/banshee/src/Core/Banshee.Services/Banshee.Sources/DatabaseSource.cs:410 
  at Banshee.Paas.PaasService.<PaasService>m__4A () [0x0000b] in /home/mike/Projects/banshee/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs:157 
  at Banshee.Paas.PaasService.OnDownloadTaskCompletedHandler (System.Object sender, Migo2.Async.TaskCompletedEventArgs`1 e) [0x00308] in /home/mike/Projects/banshee/src/Extensions/Banshee.Paas/Banshee.Paas/Banshee.Paas/PaasService.cs:720 
  at (wrapper delegate-invoke) System.EventHandler`1<Migo2.Async.TaskCompletedEventArgs`1<Migo2.DownloadService.HttpFileDownloadTask>>:invoke_void__this___object_TaskCompletedEventArgs`1<HttpFileDownloadTask> (object,Migo2.Async.TaskCompletedEventArgs`1<Migo2.DownloadService.HttpFileDownloadTask>)
  at (wrapper delegate-invoke) System.EventHandler`1<Migo2.Async.TaskCompletedEventArgs`1<Migo2.DownloadService.HttpFileDownloadTask>>:invoke_void__this___object_TaskCompletedEventArgs`1<HttpFileDownloadTask> (object,Migo2.Async.TaskCompletedEventArgs`1<Migo2.DownloadService.HttpFileDownloadTask>)
  at Migo2.Async.EventWrapper`1[Migo2.Async.TaskCompletedEventArgs`1[Migo2.DownloadService.HttpFileDownloadTask]].Execute () [0x00000] in /home/mike/Projects/banshee/src/Libraries/Migo2/Migo2.Async/CommandQueue/EventWrapper.cs:53 
  at Migo2.Async.CommandQueue.<CommandQueue>m__0 (ICommand command) [0x00000] in /home/mike/Projects/banshee/src/Libraries/Migo2/Migo2.Async/CommandQueue/CommandQueue.cs:84 
  at Migo2.Async.CommandQueue.ProcessEventQueue (System.Object state, Boolean timedOut) [0x0006f] in /home/mike/Projects/banshee/src/Libraries/Migo2/Migo2.Async/CommandQueue/CommandQueue.cs:227
Comment 4 Alexander Kojevnikov 2010-05-29 03:25:57 UTC
Review of attachment 158454 [details] [review]:

Could you update the patch, it no longer applies to git master. Thanks!
Comment 5 Niklas Schnelle 2010-06-06 22:13:03 UTC
Just compiled the git master and it is already fixed there, so no need for this patch.