GNOME Bugzilla – Bug 703700
Propose to install Tracker when unavalaible
Last modified: 2017-06-10 08:13:59 UTC
At the moment during compile/configure time, bijiben does not check for tracker, but when built and installed, it runs for a second showing the window and crashes. Just installing libtracker-sparql does not work, it works only after I installed tracker, tracker-extract, tracker-miner-fs, tracker-utils Atleast the exit can be graceful The backtrace is
+ Trace 232195
(In reply to comment #0) > At the moment during compile/configure time, bijiben does not check for > tracker, but when built and installed, it runs for a second showing the window > and crashes. So probably https://git.gnome.org/browse/bijiben/tree/configure.ac#n49 needs some extending...
I tried removing tracker-extract, tracker-miner-fs, tracker-utils and left only tracker installed. bijiben does not crash. If I remove tracker (with tracker-control) it crashes when exiting the app. I am not an expert in tracker, but in Ubuntu I can install tracker-sparql without installing tracker, tracker-extract, tracker-miner-fs, tracker-utils - Not sure if it is a dependency issue in Ubuntu or tracker or this is how things are supposed to be
Thanks for the details, on the Ubuntu side I can confirm another user solved this installing tracker. Not closing the bug : bijiben needs to detect the issue at runtime to provide some useful graphical error message (idealy, proposing the user to install tracker with one click..)
I would suggest that at the moment when tracker is not detected, the app show a message on terminal/alert box and exit. At the moment, when the function tracker_sparql_connection_get fails, it is just printed on screen. The application should terminate at that point. Sometime in future PackageKit support can be added to allow installing the dependent package painlessly.
Created attachment 248979 [details] [review] Tell the use if tracker fails
Is someone brave enough to test the patch? my Ubuntu vm is still on 3.8 i won't be able to check this properly. It does implement anything about PK, just displays some GUI
Review of attachment 248979 [details] [review]: > if (error!= NULL) { > + g_warning ("%s", error->message); > + g_error_free (error); > + bjb_window_base_switch_to (window, BJB_WINDOW_BASE_ERROR_TRACKER); > + goto out; > + } > + > + > if (file != NULL) > note = biji_note_get_new_from_file (self->priv->book, > g_file_get_path(file)); > @@ -68,6 +77,8 @@ bijiben_new_window_internal (GApplication *app, > else > bjb_window_base_switch_to (window, BJB_WINDOW_BASE_MAIN_VIEW); > > + > + out: > gtk_widget_show_all (GTK_WIDGET (window)); How about? if (error!= NULL) { g_warning ("%s", error->message); g_error_free (error); bjb_window_base_switch_to (window, BJB_WINDOW_BASE_ERROR_TRACKER); } else { if (file != NULL) note = biji_note_get_new_from_file (self->priv->book, g_file_get_path(file)); bijiben_new_window_internal (GApplication *app, else bjb_window_base_switch_to (window, BJB_WINDOW_BASE_MAIN_VIEW); } gtk_widget_show_all (GTK_WIDGET (window)); Or something like this? Use if-else ladder instead of gotos?
I can check if it works in a few hours when I will have access to ubuntu-gnome with gnome 3.9.x components/modules, so at the moment just reviewing the logic. At that time can you review this patch on another bug https://bugzilla.gnome.org/show_bug.cgi?id=703703#c8
Review of attachment 248979 [details] [review]: I tried out this patch and bijiben did not crash. Looks good except for the comment I posted above.
Thanks much for the feedback. The crash should not happen again, but keeping this bug opened to keep track of a better fix - propose to install and restart
True. The correct way would be to propose installing tracker via PK. Still this patch can be committed
tbh, I don't think this makes much sense to do runtime detection and show confusing warnings to the user. Tracker is a hard dependency of gnome-shell, gnome-documents, gnome-photos, etc. Its presence can be pretty much assumed in gnome applications.
*** Bug 704384 has been marked as a duplicate of this bug. ***
(In reply to comment #12) > tbh, I don't think this makes much sense to do runtime detection and show > confusing warnings to the user. Tracker is a hard dependency of gnome-shell, > gnome-documents, gnome-photos, etc. Its presence can be pretty much assumed in > gnome applications. I agree. It makes sense to do a compile time check, but using a GUI or any other mechanism to automatically install Tracker really doesn't make sense. We assume that Tracker will be present, and functionality (let alone UI) that is added do here is likely to rot. I certainly won't be testing it.
So is it possible to compile bijiben without tracker? If yes then how?