GNOME Bugzilla – Bug 755341
Searching in gnome-shell -> epiphany-search-provider Segmentation fault
Last modified: 2015-09-22 14:47:44 UTC
$ coredumpctl gdb /usr/libexec/epiphany-search-provider Core was generated by `/usr/libexec/epiphany-search-provider'. Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 235480
--- epiphany-3.17.91-2.fc23.x86_64 gtk3-3.17.9-1.fc23.x86_64 glib2-2.45.8-1.fc23.x86_64 gnome-shell-3.17.92-1.fc23.x86_64
Created attachment 311769 [details] [review] ephy-completion-model: Make it possible not to use formatting markup Since the completion model is used in the search provider as well, which doesn't need the markup and also doesn't initialize GTK+, we need to ensure that the completion model can still be used without it. Definitely not the best approach but safe enough for .0 release.
Review of attachment 311769 [details] [review]: ::: src/ephy-completion-model.c @@ +288,3 @@ + text = get_row_text (row->location, row->title, subtitle_color); + else + text = row->title; So you got rid of the newline and the URL. I guess GNOME has simply been ignoring everything after our newline? I prefer to use g_strdup() here, to simply the memory management... @@ +300,3 @@ + + if (model->priv->use_markup) + g_free (text); ...and you don't have to make this conditional. @@ +355,2 @@ for (i = 0; new_rows != NULL; i++) { PotentialRow *row = (PotentialRow*)new_rows->data; Not quite sure how this works, because here you go into a for loop with null subtitle_color, which winds up calling get_row_text() again, which you avoided above. And this function is called always in query_completed_cb(). Perhaps the loop is never entered?
(In reply to Michael Catanzaro from comment #2) > Review of attachment 311769 [details] [review] [review]: > > ::: src/ephy-completion-model.c > @@ +288,3 @@ > + text = get_row_text (row->location, row->title, subtitle_color); > + else > + text = row->title; > > So you got rid of the newline and the URL. I guess GNOME has simply been > ignoring everything after our newline? From reading the code changes in 592e5, I'd say that only the title was being used in the search provider. > > I prefer to use g_strdup() here, to simply the memory management... > > @@ +300,3 @@ > + > + if (model->priv->use_markup) > + g_free (text); > > ...and you don't have to make this conditional. OK. > > @@ +355,2 @@ > for (i = 0; new_rows != NULL; i++) { > PotentialRow *row = (PotentialRow*)new_rows->data; > > Not quite sure how this works, because here you go into a for loop with null > subtitle_color, which winds up calling get_row_text() again, which you > avoided above. And this function is called always in query_completed_cb(). > Perhaps the loop is never entered? NULL subtitle color is a result of not calling the style/settings code that was causing the crash. Later on we don't use the NULL subtitle color at all, because we do not use the markup either.
OK, I will upload the same patch with just the g_strdup change, since you had to leave.
Created attachment 311780 [details] [review] ephy-completion-model: Make it possible not to use formatting markup Since the completion model is used in the search provider as well, which doesn't need the markup and also doesn't initialize GTK+, we need to ensure that the completion model can still be used without it. Definitely not the best approach but safe enough for .0 release.
Created attachment 311783 [details] [review] ephy-completion-model: Make it possible not to use formatting markup Whitespace fix
Got the freeze break