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 730205 - AttributeError: 'Stack' object has no attribute 'get_child_by_name'
AttributeError: 'Stack' object has no attribute 'get_child_by_name'
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal normal
: 3.14
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-15 15:59 UTC by Florian Will
Modified: 2014-05-22 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output of gnome-music -d (105.78 KB, text/x-log)
2014-05-15 15:59 UTC, Florian Will
  Details
Possible fix (737 bytes, patch)
2014-05-15 16:54 UTC, Florian Will
none Details | Review

Description Florian Will 2014-05-15 15:59:25 UTC
Created attachment 276611 [details]
output of gnome-music -d

How to reproduce:
* Launch gnome-music 3.13.2 (git 7e02023c)
* Type a band name (search field appears and contains the band name)
* Wait a short time

Expected result:
albums by that band are displayed

Actual result:
gnome-music crashes with this stack trace:

Traceback (most recent call last):
  • File "/usr/lib/python3/dist-packages/gnomemusic/__init__.py", line 44 in wrapped
    retval = fn(*v, **k)
  • File "/usr/lib/python3/dist-packages/gnomemusic/searchbar.py", line 265 in search_entry_changed
    view = stack.get_child_by_name('search')
AttributeError: 'Stack' object has no attribute 'get_child_by_name'


Full debug log attached.


Using Ubuntu 14.04 which still uses Gtk 3.10.
Comment 1 Vadim Rutkovsky 2014-05-15 16:01:34 UTC
get_child_by_name was introduced in 3.12 only, we should find a way to get view in 3.10 compatible way
Comment 2 Florian Will 2014-05-15 16:54:28 UTC
Created attachment 276614 [details] [review]
Possible fix

[I hope I copied the change correctly from /usr/lib/… where I tested this to my git checkout of gnome-music]

This works, but there's a slight change in semantics. If the search string is "", the set_search_text method of the Search view is not called.
Comment 3 Vadim Rutkovsky 2014-05-19 09:35:44 UTC
(In reply to comment #2)
> This works, but there's a slight change in semantics. If the search string is
> "", the set_search_text method of the Search view is not called.
Right, that is intended - empty search should not be executed, as it will be way too slow on remote sources

Thanks, pushed as https://git.gnome.org/browse/gnome-music/commit/?id=3582edb
Comment 4 Florian Will 2014-05-22 16:36:33 UTC
Thanks! git master works for me. *closing*