Hello, all. I just posted this bug:
http://bugzilla.clutter-project.org/show_bug.cgi?id=2586
I realize that 1.4.0 is pretty old, but I don't really have a choice. :-(
I'm getting an error when using Clutter to display software-rendered
video. Specifically, the error is:
GLib-ERROR **: gmem.c:170: failed to allocate 983040 bytes
The backtrace at that point:
#0 *__GI_abort () at abort.c:54
#1 0xb7c0eebf in g_logv () from /usr/lib/libglib-2.0.so.0
#2 0xb7c0eef3 in g_log () from /usr/lib/libglib-2.0.so.0
#3 0xb7c0cadf in g_malloc () from /usr/lib/libglib-2.0.so.0
#4 0xb7fccca8 in _cogl_texture_driver_upload_subregion_to_gl () from
/usr/lib/libclutter-cex100-1.0.so.0
#5 0xb7fc07fe in _cogl_texture_2d_sliced_new_from_bitmap () from
/usr/lib/libclutter-cex100-1.0.so.0
#6 0xb7fbc7c2 in cogl_texture_new_from_bitmap () from
/usr/lib/libclutter-cex100-1.0.so.0
#7 0xb7fbc85b in cogl_texture_new_from_data () from
/usr/lib/libclutter-cex100-1.0.so.0
#8 0xb7f82323 in clutter_texture_set_from_data.clone.0 () from
/usr/lib/libclutter-cex100-1.0.so.0
#9 0x0804be0a in output_frame (vfidx=236, frame=@0x80966c8, outframenum=349,
chunk=@0xb5f521d8)
...
I have a 640x480 ClutterTexture which I've added to the stage, and I repeatedly
call clutter_texture_set_from_rgb_data() to update it. It works fine, until it
crashes with the error above. I tried changing my code to remove the texture
and create a new one each time instead, but it made no difference. This works
fine on a desktop (Clutter 1.4.0 that I built, on Ubuntu 10.10); it fails in an
environment using the egl backend.
It's been pointed out that clutter_texture_set_from_rgb_data() seems to create
a new cogl texture every time it is called, and the texture seems to not be
released correctly. Without the clutter_texture_set_from_rgb_data() call, it
doesn't run out of memory, but of course it doesn't update the texture, either.
The function clutter_texture_set_from_file() has the same result.
Perhaps this has been fixed since 1.4.0 (the blog lists some entries like "plug
leaks" :-), but I'm stuck with 1.4.0 until I'm allowed to use a newer version,
so a pointer to the fix would be very helpful as I may be able to backport it.
Please see testcase attached to the bug.
Thanks,
Chris MacGregor
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list