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 533099 - Crash when selecting multiple tracks
Crash when selecting multiple tracks
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other All
: Normal critical
: 1.0
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-14 12:54 UTC by David Nielsen
Modified: 2008-05-17 07:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
One line fix for the crash (536 bytes, patch)
2008-05-14 21:20 UTC, Bertrand Lorentz
needs-work Details | Review
Fix for the crash and regression test (1.40 KB, patch)
2008-05-15 16:57 UTC, Bertrand Lorentz
committed Details | Review

Description David Nielsen 2008-05-14 12:54:41 UTC
Steps to reproduce:
1. Import massive collection of TV episodes
2. Select one season to correct their metadata (ctrl + left mouse button in the listview)
3. Once you reach episode 15 or so the crash occures


Stack trace:
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.IndexOutOfRangeException: Array index is out of range.
  at Hyena.Collections.RangeCollection.Insert (Int32 position, Range range) [0x00022] in /usr/src/banshee/src/Libraries/Hyena/Hyena.Collections/RangeCollection.cs:149 
  at Hyena.Collections.RangeCollection.InsertRange (Range range) [0x00026] in /usr/src/banshee/src/Libraries/Hyena/Hyena.Collections/RangeCollection.cs:193 
  at Hyena.Collections.RangeCollection.Add (Int32 value) [0x0001a] in /usr/src/banshee/src/Libraries/Hyena/Hyena.Collections/RangeCollection.cs:327 
  at Hyena.Collections.Selection.ToggleSelect (Int32 index) [0x00011] in /usr/src/banshee/src/Libraries/Hyena/Hyena.Collections/Selection.cs:73 
  at Hyena.Data.Gui.ListView`1[Banshee.Collection.TrackInfo].OnListButtonPressEvent (Gdk.EventButton evnt) [0x000e5] in /usr/src/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs:278 
  at Hyena.Data.Gui.ListView`1[Banshee.Collection.TrackInfo].OnButtonPressEvent (Gdk.EventButton evnt) [0x00061] in /usr/src/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs:208 
  at Gtk.Widget.buttonpressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.buttonpressevent_cb(IntPtr widget, IntPtr evnt)
   at Gtk.Widget.buttonpressevent_cb(IntPtr , IntPtr )
   at Gtk.Application.gtk_main()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Banshee.Gui.GtkBaseClient.Run() in /usr/src/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 114
   at Banshee.Gui.GtkBaseClient.Startup() in /usr/src/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 55
   at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) in /usr/src/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:line 54
   at Banshee.Gui.GtkBaseClient.Entry() in /usr/src/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 50
   at Nereid.Client.Main() in /usr/src/banshee/src/Clients/Nereid/Nereid/Client.cs:line 47


Other information:
Running SVN 3918 on x86_64 Fedora 9.
Comment 1 Bertrand Lorentz 2008-05-14 21:17:38 UTC
I was able to reproduce it, but it's a bit tricky :
you have to click on lines that are NOT next to each other, and it happens at the 17th click.

I'll attach a one line fix.
Comment 2 Bertrand Lorentz 2008-05-14 21:20:44 UTC
Created attachment 110934 [details] [review]
One line fix for the crash

The code is in the #else block of a #if NET_2_0

I'm running mono 1.2.6, am I not supposed to have the .NET 2.0 stuff (generics, etc.) ?
Comment 3 David Nielsen 2008-05-14 21:58:08 UTC
Excellent, I can confirm that the patch does indeed make the crasher disappear.
Comment 4 Gabriel Burt 2008-05-15 06:18:06 UTC
Thanks for the patch, Bertrand.  Can you write a test (that fails w/o your patch and passes w/ it) in tests/ ?  This is a sensitive area, and it'd be good to make sure we don't regress.  Thanks!
Comment 5 Bertrand Lorentz 2008-05-15 16:57:13 UTC
Created attachment 110964 [details] [review]
Fix for the crash and regression test

I added a test that triggers an IndexOutOfRangeException without the fix.
Comment 6 Aaron Bockover 2008-05-17 07:20:33 UTC
Patch committed. Thanks Bertrand for tracking this down, and David for reporting. The bug was only in the NET_1_1 profile of the array resizing and we should have been using the NET_2_0 profile version all along, but alas that was never defined in our build!

I've defined NET_2_0 so we'll now benefit from all my originally intended generic goodness :)

Thanks!