gobject-list icon indicating copy to clipboard operation
gobject-list copied to clipboard

Hook more g_object_new_xxx function to prevent missing some GObjects tracking

Open CCob opened this issue 11 years ago • 3 comments

g_object_new doesn't seem to be the lowest entry point to creating a GObject types. It seems to g_object_new -> g_object_new_valist -> g_object_newv, so this pull request hooks g_object_newv instead.

using LD_PRELOAD on gst-launch-0.10 I can confirm there are now much more objects being tracked.

CCob avatar Oct 09 '14 20:10 CCob

Nice work, I merged it to my repo on top #8, https://github.com/Lekensteyn/gobject-list/tree/trace-callstack-w-pr6. Some objects were tracked correctly, but there is one remaining case.

Either something is not tracked, or GCredentials is really being strange. See item 30 at https://lekensteyn.nl/gobject-list-upower.html#30

Lekensteyn avatar Nov 20 '14 16:11 Lekensteyn

Is this your own code using GCredentials or are you checking a different application? If the later, I wonder if the reference count has been decremented manually instead of using g_object_unref causing a negative reference?

CCob avatar Nov 21 '14 11:11 CCob

The application is not using GCredentials directly, it is probably the GDBus library. It would be very strange if an application touches the struct directly.

Lekensteyn avatar Nov 21 '14 21:11 Lekensteyn