How can I avoid COGL:out of memory abort while using offscreen effects?



Hello Clutter users,

We have encountered an out of memory issue while clutter_offscreen_effect_pre_paint is calling cogl_clear().  This occurs after creating a few 1920x1080 widgets and applying any offscreen effect to several of them, removing it and reapplying it. 

I assume our TV is running out of its limited texture memory, but the question is is it possible to gracefully handle this (e.g. just draw slower or switch to a backup effect) in a system that is driven by scripts written by end developers and without modifying COGL??

For now we're considering not providing offscreen buffer support through our API.

The stack trace below shows that the cogl_clear() is forcing a framebuffer_flush_state (not sure why) which ends up allocating texture memory.  The COGL code is calling cogl_framebuffer allocate with no error handling I assume because they think it is too late to do anything about it.

Thank you for any insights to this issue.  I'll post this on the COGL forum as well.

Reza

#1  0x49a632dc in g_logv () from 

#2  0x00605ec8 in _cogl_set_error () from 

#3  0x0060b024 in _cogl_gl_util_catch_out_of_memory () from 

#4  0x0060b728 in _cogl_texture_2d_gl_allocate () from 

#5  0x005ee81c in _cogl_texture_2d_allocate () from 

#6  0x005edb6c in cogl_texture_allocate () from 

#7  0x005f112c in _cogl_texture_2d_sliced_allocate () from 

#8  0x005edb6c in cogl_texture_allocate () from 

#9  0x005fce0c in cogl_framebuffer_allocate () from 

#10 0x006249f0 in _cogl_framebuffer_gl_flush_state () from 

#11 0x005fdc08 in _cogl_framebuffer_flush_state () from 

#12 0x005fc368 in cogl_framebuffer_clear4f () from 

#13 0x005fc534 in cogl_framebuffer_clear () from 

#14 0x005b8248 in cogl_clear () from 

#15 0x0053417c in clutter_offscreen_effect_pre_paint (effect=0x60e0d058) at ./clutter-offscreen-effect.c:325

#16 0x0051d47c in _clutter_effect_pre_paint (effect=0x60e0d058) at ./clutter-effect.c:304

#17 0x0051d1d0 in clutter_effect_real_paint (effect=0x60e0d058, flags=CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) at ./clutter-effect.c:243

#18 0x005344a0 in clutter_offscreen_effect_paint (effect=0x60e0d058, flags=CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) at ./clutter-offscreen-effect.c:434

#19 0x0051d614 in _clutter_effect_paint (effect=0x60e0d058, flags=CLUTTER_EFFECT_PAINT_ACTOR_DIRTY) at ./clutter-effect.c:321

#20 0x004e6f2c in clutter_actor_continue_paint (self=0x60e3e030) at ./clutter-actor.c:3937

#21 0x004e6be8 in clutter_actor_paint (self=0x60e3e030) at ./clutter-actor.c:3818

#22 0x004e6504 in clutter_actor_real_paint (actor=0x60e3e5e0) at ./clutter-actor.c:35



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