Skip to content

Conversation

@CCob
Copy link

@CCob CCob commented Oct 9, 2014

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 CCob changed the title Hook g_object_newv instead of g_object_new to prevent missing some GObjects Hook more g_object_new_xxx function to prevent missing some GObjects tracking Oct 10, 2014
@Lekensteyn
Copy link
Contributor

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

@CCob
Copy link
Author

CCob commented Nov 21, 2014

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?

@Lekensteyn
Copy link
Contributor

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As evil as it sounds... I would consider making this a macro so that it doesn't turn up into your tracebacks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is wrong with this showing in the traces? I would prefer an inline function over a macro if that also solves the problem.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a frame that's not useful in your trace. Inline works too. My C is rusty, I forgot inline was a thing :-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants