Comment 40 for bug 1335492

Revision history for this message
In , Mati86dl (mati86dl) wrote :

Eric,
Not think that is related, but researching a bit found a bug:

> https://github.com/xfce-mirror/xfdesktop/commit/cfe5a0ad88b84a23a4cd6d18a25635ec84cbaf68

In this commit you introduce a big mem leak. Is not noticeable due it's just when close the session. I doubt the necessity of the commit, but surely you have your reasons. ;)

Well, the problem is that xfdesktop_application_get() increases the references and you have to add a unref after use it.

The obvious problem is the mem leak. but not the most worrying

The major problem is that you're assuming that XfdesktopApplication may be NULL. If XfdesktopApplication already NULL (understood is already closed), when you call xfdesktop_application_get(), you're starting an entirely new desktop !!!!.

..and due the missing unref basically never close it. Ends up being killed by the session. (This last is just supposition. haha. =)

Any idea how to debug this?
For now I'll add some g_print to see the sequence on shutdown.

Regards,
Matias.