/usr/bin/nautilus:11:g_type_check_instance_is_fundamentally_a:g_object_unref:nautilus_search_engine_finalize:g_object_unref:g_closure_invoke

Bug #1804260 reported by errors.ubuntu.com bug bridge
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Fix Released
High
Julian Andres Klode

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding nautilus. This problem was most recently seen with package version 1:3.26.4-0ubuntu8, the problem page at https://errors.ubuntu.com/problem/2fa1e6463cc1b3522e4da4e4c103462fb8998a68 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Tags: disco

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

This has 12 reports on errors.ubuntu.com so far, the latest one probably mine...

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Julian, do you remember what you did to trigger the bug?

Changed in nautilus (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Marco, seems like it could be due to some of your recent changes?

Changed in nautilus (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Low → High
Revision history for this message
Julian Andres Klode (juliank) wrote :

I did not do anything I can remember, it just happened in the background.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Seb, not sure... Since it seems related to locate search engine which I didn't touch for a while...

Revision history for this message
Sebastien Bacher (seb128) wrote :

K, weird that we didn't get previous reports, or maybe the signature change. Feel free to unassign yourself if you prefer/are busy enough with other things

Revision history for this message
Julian Andres Klode (juliank) wrote :

The bug seems to be wrong reference counting of the NautilusSearchEngineRecent, and both search_thread_add_hits_idle and recent_thread_func have been changed in the last upload to have code that looks like this:

search_thread_add_hits_idle:
g_autoptr (NautilusSearchEngineRecent) self = search_hits->recent;

recent_thread_func:
g_autoptr (NautilusSearchEngineRecent) self = NAUTILUS_SEARCH_ENGINE_RECENT (user_data);

however, recent_thread_func (unlike search_thread_add_hits_idle) did not lose the g_object_unref (self); at the end so it decrements once more than it did before.

I do think search_thread_add_hits_idle is wrong as well, and needs to be
  g_autoptr (NautilusSearchEngineRecent) self = g_object_ref(search_hits->recent);
or just
  NautilusSearchEngineRecent *self = search_hits->recent;

as you are just providing an alias to that field, so why are you decrementing it once every time you call this function?

Revision history for this message
Julian Andres Klode (juliank) wrote :

Oh, I'm wrong about search_thread_add_hits_idle, as the object is ref'ed before the idle callback is added. Which is a bit strange, but works (I'd provide a search_hits_data_free that unrefs the -> recent and just use that on the entire search_hits).

The recent_thread_func clearly is an oversight though.

Changed in nautilus (Ubuntu):
status: Confirmed → Triaged
Changed in nautilus (Ubuntu):
status: Triaged → In Progress
Changed in nautilus (Ubuntu):
assignee: Marco Trevisan (Treviño) (3v1n0) → Julian Andres Klode (juliank)
Changed in nautilus (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.26.4-0ubuntu9

---------------
nautilus (1:3.26.4-0ubuntu9) disco; urgency=medium

  * d/p/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch:
    - Fix double deref introduced in the previous upload (LP: #1804260)

 -- Julian Andres Klode <email address hidden> Fri, 23 Nov 2018 09:41:50 +0100

Changed in nautilus (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.