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 777127 - pressing back after no search results from single album view leads to force close
pressing back after no search results from single album view leads to force c...
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.23.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-11 10:58 UTC by Abhinav Singh
Modified: 2017-01-16 09:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes the force close (838 bytes, patch)
2017-01-11 11:02 UTC, Abhinav Singh
committed Details | Review

Description Abhinav Singh 2017-01-11 10:58:15 UTC
Pressing back button (in the toolbar) after getting no search results from single-albumview (Albumwidget.ui) leads to force close of the application.

Reproduce:
click on an album from album view
click search, and type something such that no results are found
press back button

Observations:
the force close only happens if the search results are zero

Expected : should go back from single-album to albums view
Comment 1 Abhinav Singh 2017-01-11 11:02:14 UTC
Created attachment 343294 [details] [review]
fixes the force close

The file was missing a dependency.
Comment 2 Marinus Schraal 2017-01-12 14:43:05 UTC
Nice catch. Coming at it from a different angle, should there be a backbutton when we search? It's really a different mode, maybe make the backbutton not usable?

While testing this I find the following bug:
* in albums view->select an album
* while there, search for another existing album->select it
* press the back button and you get back to the search view (alright)
* dismiss the search view and you are left with the first selected album, but no back button

I think the whole interaction model for subviews + search is a bit weird. If you search and you change a view, the search is gone. If you search in a subview (like a specific album view) you can actually sometimes go back and sort of switch views. This is unwanted behaviour imo, it should cancel the search or not be allowed.
Comment 3 Abhinav Singh 2017-01-12 14:56:21 UTC
I understand that there can be two options :

1> Disable back button when search is there.
2> Cancel search when back is pressed.

I feel like the 2nd one is better, because many times the users will use the back button to exit search.
It is not very intuitive to disable search only with search button.

I shall make a patch for 2nd option, if you agree.
Comment 4 Marinus Schraal 2017-01-12 15:03:14 UTC
I agree that option 2 is probably the most logical and in line what the views do. So if you can provide a patch for that, that would be great.
Comment 5 Marinus Schraal 2017-01-14 12:51:51 UTC
Review of attachment 343294 [details] [review]:

lgtm
Comment 6 Marinus Schraal 2017-01-16 09:33:54 UTC
Thanks for the fix.

Rewrote the commit msg somewhat.