Re: New tile unref logic and various leak fixes



On Thu, Mar 25, 2010 at 01:12, Jiří Techet <techet gmail com> wrote:
>>> I still wonder about the memory problem. One thing is clear - it's not
>>> because the tile isn't deallocated. I've added one more optimization
>>> (based on oprofile output), where view_update_state() consumed too
>>> much time because it had to go through all the tiles every time tile
>>> changed its state. I'm now just keeping a counter of tiles that are
>>> being loaded and when their number drops to 0, the state changes to
>>> DONE. I do this by connecting to the tile's destroy signal so as long
>>> as the state indication works, we can be sure that all tiles are
>>> deallocated - quite a good leak test as well :-).
>>>
>>> If we are not leaking tiles, we might still be leaking something else.
>>> I'll make some simple test program that checks whether these leaks
>>> appear only when using clutter textures. Personally I suspect that
>>> this:
>>>
>>> https://bugs.freedesktop.org/show_bug.cgi?id=23530
>>>
>>> didn't get to Karmic, which I use. Will try after Jaunty is out. What
>>> graphics card and linux distribution do you use?
>>
>> I have Karmic right now.
>>
>
> Good news here. I tested test-textures from "interactive" clutter
> tests and it suffers the same problem under Karmic. Then I booted
> Lucid beta from CD, installed clutter prerequisites, compiled clutter
> and ran the same demo - no leaks there. The future looks bright...
>

After installing Lucid on my machine, I finally managed to track down
the remaining memory leaks:

b58b664d6b9dc212bde70d8573797ae053d02575

under my unref-clone eliminates them. This was introduced by me in
network map source where the loader wasn't unreffed when the tile was
loaded successfully. I was also getting some warnings on the console,
which should be fixed by

05c6cced71721b71939acba7462c626a7dd6dd00

That's it. The leaks are gone! (yay!) After some initial memory
increase, the allocated memory stabilizes at certain value and remains
there no matter how long you use libchamplain.

Well, nothing is perfect - there is a pretty annoying bug in Lucid
that crashes X server when you close a clutter-based (or probably
OpenGL-based) application. It doesn't happen always, but frequently.
Details here:

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/550218
http://bugs.freedesktop.org/show_bug.cgi?id=26394

But fortunately this isn't our problem...

Jiri


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]