Hello,
I am trying to play with clutter version 1.1.10 and get segfault while
running interactive tests:
$ ./test-actors
Running ./test-interactive test-actors

NOTE: For debugging purposes, you can run this single test as follows:
$ libtool --mode=execute \
          gdb --eval-command="b test_actors_main" \
              --args ./test-interactive test-actors

(test-actors:6689): Cogl-glx-CRITICAL **: _cogl_sub_texture_new:
assertion `sub_x + sub_width <= full_width' failed
Segmentation fault
Debugger output:
(test-actors:7006): Cogl-glx-CRITICAL **: _cogl_sub_texture_new:
assertion `sub_x + sub_width <= full_width' failed

Program received signal SIGSEGV, Segmentation fault.
0xb804d39e in _cogl_texture_transform_quad_coords_to_gl (handle=0x0,
coords=0xbfcf11a0) at ./cogl-texture.c:673
673       return tex->vtable->transform_quad_coords_to_gl (tex, coords);

After some investigations with gdb i've found:
1. My driver does not support COGL_FEATURE_OFFSCREEN
2. _cogl_texture_2d_can_create returns FALSE
3. _cogl_texture_2d_new_with_size returns COGL_INVALID_HANDLE
4. there is no check for COGL_INVALID_HANDLE in
_cogl_atlas_texture_reserve_space after call to
_cogl_texture_2d_new_with_size
So after this patch (against version 1.1.10) there are no more
segfaults in interactive tests:

--- clutter/cogl/cogl/cogl-atlas-texture.c.orig 2010-02-16
09:42:20.000000000 +0300
+++ clutter/cogl/cogl/cogl-atlas-texture.c      2010-02-16 10:25:24.000000000 
+0300
@@ -861,6 +861,12 @@
                                         _cogl_atlas_get_height (new_atlas),
                                         COGL_TEXTURE_NONE,
                                         COGL_PIXEL_FORMAT_RGBA_8888);
+      if (new_tex == COGL_INVALID_HANDLE)
+      {
+        ret = FALSE;
+      }
+      else
+      {

       COGL_NOTE (ATLAS,
                  "Atlas %s with size %ix%i",
@@ -902,6 +908,7 @@
                   _cogl_atlas_get_height (ctx->atlas)));

       ret = TRUE;
+      }
     }

   g_free (data.textures);
-- 
To unsubscribe send a mail to [email protected]

Reply via email to