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 726519 - Crash when moving from preview to search with a source filter
Crash when moving from preview to search with a source filter
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
3.11.x
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-03-17 12:24 UTC by Debarshi Ray
Modified: 2014-03-17 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main-toolbar: Guard against being in a transitional state (1.17 KB, patch)
2014-03-17 12:37 UTC, Debarshi Ray
committed Details | Review
main-toolbar: Remove useless signal connections (1.87 KB, patch)
2014-03-17 12:38 UTC, Debarshi Ray
committed Details | Review
main-toolbar: Remove empty else branch (1.05 KB, patch)
2014-03-17 12:38 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-03-17 12:24:11 UTC
Launch the application and set a source filter. Click an item to preview it, and then try going back to the search results. The application crashes.

When going back from the preview to search, we unset the active item (in PhotosMainToolbar), which leads to the parameters of the search being restored (in PhotosEmbed). Then we change the window-mode (in PhotosMainToolbar).

Since photos_main_toolbar_set_toolbar_title is listening to changes in the active source, it is executed with window_mode == PREVIEW and active_item == NULL. This leads to the crash. We should guard against such transitional states by checking active_item for NULL.

But, why are we listening to changes in the active source in the  first place? Looks like gnome-documents listens to changes in all the search parameters so that it can change the title to "Presentations" or "Results for 'search string'". That still does not explain the need for listening to the active source because the SourceManager is not used. Moreover, in the new multi-view designs, we are not supposed to change the title like this.
Comment 1 Debarshi Ray 2014-03-17 12:37:40 UTC
Created attachment 272139 [details] [review]
main-toolbar: Guard against being in a transitional state
Comment 2 Debarshi Ray 2014-03-17 12:38:11 UTC
Created attachment 272140 [details] [review]
main-toolbar: Remove useless signal connections
Comment 3 Debarshi Ray 2014-03-17 12:38:38 UTC
Created attachment 272141 [details] [review]
main-toolbar: Remove empty else branch