websiteWebsite
sonata Sonata
Sonata is an elegant GTK+ music client for the Music Player Daemon (MPD).

 

Bug tracking

» Click here to report a bug on this project.

Bug report #1959
Title: Library search makes sonata crashes when deleting characters
Date added: 2010-10-28 03:00:27 Type: Bug report
Status: Resolved Priority: Critical
Affected version: 1.6.2.1 Milestone: 1.6.3
Reported by: Paco Assigned to: Not assigned yet!
History:
  • 2010-10-28 03:00:27 - create by Paco
  • 2010-10-28 03:02:22 - update by Paco
    Priority changed to Critical
    Status changed to Confirmed
    Milestone changed to trunk
  • 2010-10-28 06:58:34 - update by Paco
    Added an answer
  • 2010-10-29 13:34:41 - update by Paco
    Milestone changed to 1.6.3
  • 2012-02-19 22:19:21 - update by Mic92
    Added an answer
  • 2012-02-19 23:38:41 - update by Mic92
    Added an answer
  • 2012-02-21 09:08:50 - update by Mic92
    Attached a file
  • 2012-02-21 09:10:32 - update by Mic92
    Added an answer
  • 2012-04-27 14:46:35 - update by Paco
    Added an answer
  • 2012-04-27 14:47:05 - update by Paco
    Status changed to Resolved
Feed subscription: RSS or Atom.
Attachements:
0002-fix-1959-librar… by Mic92
Added on 2012-02-21 09:08:50
When we are in the library tab. We want to search a specific artist (for example), so we start writing something, but if we delete what we wrote quickly, it makes sonata crashes.

I tried to figured out where the bug was. Here what I found :

I put this code in library_browse in sonata/sonata/library.py at line 297 (the
code is around line 418)

print 'Begining of DEBUG'
for _sort, path in bd:
print path
time.sleep(1)
self.librarydata.append(path)
print 'End of DEBUG'

I've got these outputs:
 
Begining of DEBUG
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/03 Live au Z\xe9nith'), '03 Live au Z\xc3\xa9nith']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/04 Live in Nyon'), '04 Live in Nyon']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Bataclan'), 'Bataclan'] [<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Debie'), 'Debie']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Debie - Acoustique'), 'Debie - Acoustique']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Divers'), 'Divers']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/God Bless'), 'God Bless']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Jours etranges'), 'Jours etranges']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Katagena'), 'Katagena']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u"Saez/Varsovie, L'alhambra, Paris"), "Varsovie, L'alhambra, Paris"]
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/Yellow tricycle'), 'Yellow tricycle']
[<gtk.gdk.Pixbuf object at 0x92ae554 (GdkPixbuf at 0x9313d50)>, (None, None, None, None, u'Saez/Solution.mpg'), u'Unknown - Solution.mpg']
End of DEBUG
 
Begining of DEBUG
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/03 Live au Z\xe9nith'), '03 Live au Z\xc3\xa9nith']
[<gtk.gdk.Pixbuf object at 0x92ae48c (GdkPixbuf at 0x9313ba8)>, (None, None, None, None, u'Saez/04 Live in Nyon'), '04 Live in Nyon']
zsh: segmentation fault  python sonata.py
 
this first output happened, so I suspected something about the last line. but
this is exactly the same than what there is on the other debug part.
 
I tried again, and got: 
Begining of DEBUG
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/03 Live au Z\xe9nith'), '03 Live au Z\xc3\xa9nith']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/04 Live in Nyon'), '04 Live in Nyon']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Bataclan'), 'Bataclan']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Debie'), 'Debie']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Debie - Acoustique'), 'Debie - Acoustique']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Divers'), 'Divers']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/God Bless'), 'God Bless']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Jours etranges'), 'Jours etranges']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Katagena'), 'Katagena']
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u"Saez/Varsovie, L'alhambra, Paris"), "Varsovie, L'alhambra, Paris"]
[<gtk.gdk.Pixbuf object at 0x91ce52c (GdkPixbuf at 0x92351a8)>, (None, None, None, None, u'Saez/Yellow tricycle'), 'Yellow tricycle']
[<gtk.gdk.Pixbuf object at 0x91ce5f4 (GdkPixbuf at 0x9235350)>, (None, None, None, None, u'Saez/Solution.mpg'), u'Unknown - Solution.mpg']
End of DEBUG
**
Gdk:ERROR:gdkregion-generic.c:1112:miUnionNonO: assertion failed: (r->x1 < r->x2)
zsh: abort      python sonata.py
 

So two reasons can explain that. Firstly, there are two (or more) bugs. Secondly, this is because of the threading, and the bug is somewhere else.
Re: Library search makes sonata crashes when deleting characters - 2010-10-28 06:58:33
PacoPaco
Send a private messageSend a mail to this userContact this user by JabberView the website of the userOpenForge API
Another report of this crash :

Error grabbing key 144, 0x1e05000
Error grabbing key 153, 0x1e05000
Error grabbing key 162, 0x1e05000
Error grabbing key 162, 0x1e05000
Error grabbing key 164, 0x1e05000
zsh: segmentation fault sonata
Re: Library search makes sonata crashes when deleting characters - 2012-02-19 22:19:21
Mic92Mic92
Send a private messageSend a mail to this userContact this user by JabberOpenForge API
I think, a list (maybe a treeview) is corrupted by using multiple threads:
I get the following using gdb:

/home/joerg/git/sonata-paco/sonata/main.py:3525: GtkWarning: gtk_list_store_get_value: assertion `VALID_ITER (iter, list_store)' failed
gtk.main()
/home/joerg/git/sonata-paco/sonata/main.py:3525: Warning: g_object_set_property: assertion `G_IS_VALUE (value)' failed
gtk.main()
/home/joerg/git/sonata-paco/sonata/main.py:3525: Warning: g_value_unset: assertion `G_IS_VALUE (value)' failed
gtk.main()

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1f95e9a in ?? () from /usr/lib/libgtk-x11-2.0.so.0

If I try to use strace/ltrace to track the bug down, I can't reproduce it - strace/ltrace runs the program single threaded.
Re: Library search makes sonata crashes when deleting characters - 2012-02-19 23:38:41
Mic92Mic92
Send a private messageSend a mail to this userContact this user by JabberOpenForge API
Here is my logging output. I use the following format: "%(threadName)s %(thread)d %(lineno)d: %(message)s"
Should library.browse called not only called from the mainthread?

Due the logging statements the linenumbers differs a little from the original:
http://pastebin.archlinux.fr/438301

MainThread 140730532185856 374: clear list in library_browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
MainThread 140730532185856 423: adding item in library.browse
Thread-4 140730102331136 374: clear list in library_browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
Thread-4 140730102331136 423: adding item in library.browse
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1416: set item in do_search: <_MainThread(MainThread, started 140730532185856)>
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
MainThread 140730532185856 1429: delete item in do_search
Thread-5 140730088785664 374: clear list in library_browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-5 140730088785664 423: adding item in library.browse
Thread-6 140730080392960 374: clear list in library_browse
Thread-6 140730080392960 423: adding item in library.browse
Thread-6 140730080392960 423: adding item in library.browse
*** glibc detected *** python2: double free or corruption (fasttop): 0x0000000002ab1a00 ***
[1] 8686 segmentation fault (core dumped) python2 sonata.py
Re: Library search makes sonata crashes when deleting characters - 2012-02-21 09:10:32
Mic92Mic92
Send a private messageSend a mail to this userContact this user by JabberOpenForge API
Solved with uploaded patch:
@Paco I already did a merge request on your repo
Re: Library search makes sonata crashes when deleting characters - 2012-04-27 14:46:35
PacoPaco
Send a private messageSend a mail to this userContact this user by JabberView the website of the userOpenForge API
Seems to work now.
Post to this thread

Title:


Message:

Need help? - Authorized (X)HTML tags: a, img, acronym, blockquote, code, ul, ol, li, h3, h4, p, br, hr, strong, em, pre, span, div, sub, sup, table, caption, thead, tr, th, tfoot, tbody, td.

Captcha security:
In order to check you are not a robot, please answer to that simple question:
5 + 10        

Nickname: