I've been trying to run the SVN head (3044 as of this email) on my Intel Mac, of course, compiled --with-flavour osx. I kept having bus errors with certain test programs. I figured out that any of my test programs that *only* contained a ClutterTexture would cause the crash. Simply adding something like an empty ClutterRectangle or ClutterLabel would fix the problem. So, my current workaround is simply to add a couple lines as shown below to every test program which only contain ClutterTextures. I actually have quite a few of these little test programs that I've been using for testing my OCAML bindings which were all working fine on the stable 0.6 release.

clutterActor *b = clutter_rectangle_new();
clutter_container_add_actor( CLUTTER_CONTAINER (stage), b);

I captured a backtrace from gdb and included it below. I also wrote a simple C program which demonstrates the problem (just to ensure it wasn't the fault of my bindings). It is included below along with the magical two lines which allow everything to run.

Anyway, my focus is on the bindings and not on debugging errors on the C-side of things, so I didn't want to get too distracted by this. However, I am willing to run additional tests or provide additional information. I believe I've seen references to running in DEBUG mode, so I could also do this if it is helpful.

Regards

- Reid

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x000004a0
0x0116ac11 in glsSwapBackBufferIsBackingStore ()
(gdb) bt
#0  0x0116ac11 in glsSwapBackBufferIsBackingStore ()
#1  0x013b72df in glSwap_RevertExec ()
#2  0x931e7860 in CGLFlushDrawable ()
#3  0x9353d393 in -[NSOpenGLContext flushBuffer] ()
#4  0x93311e91 in -[NSView _drawRect:clip:] ()
#5 0x93310eeb in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#6  0x93322e4f in _recursiveDisplayInRect2 ()
#7  0x9083eaa8 in CFArrayApplyFunction ()
#8 0x933110f3 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #9 0x9330ff53 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:] () #10 0x9330f658 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:] () #11 0x9330ee42 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#12 0x9330e76e in -[NSView displayIfNeeded] ()
#13 0x9330e512 in -[NSWindow displayIfNeeded] ()
#14 0x932b3e54 in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] ()
#15 0x932b393a in -[NSWindow orderWindow:relativeTo:] ()
#16 0x9330aa88 in -[NSWindow makeKeyAndOrderFront:] ()
#17 0x0024373f in clutter_stage_osx_show (actor=0x11d5008) at clutter- stage-osx.c:344
#18 0x000a166b in g_closure_invoke ()
#19 0x000b1f9c in signal_emit_unlocked_R ()
#20 0x000b3b43 in g_signal_emit_valist ()
#21 0x000b41f7 in g_signal_emit ()
#22 0x002065fa in clutter_actor_show (self=0x11d5008) at clutter- actor.c:457 #23 0x002371a9 in clutter_stage_show (self=0x11d4050) at clutter- stage.c:293
#24 0x000a166b in g_closure_invoke ()
#25 0x000b1f9c in signal_emit_unlocked_R ()
#26 0x000b3b43 in g_signal_emit_valist ()
#27 0x000b41f7 in g_signal_emit ()
#28 0x002065fa in clutter_actor_show (self=0x11d4050) at clutter- actor.c:457
#29 0x00001f54 in main ()
(gdb)


#include <clutter/clutter.h>

static ClutterColor bg_color;

int main (int   argc, char *argv[])
{
  ClutterActor *stage, *instructions, *icon;
  ClutterTimeline *main_timeline;
  GError *error = NULL;

  clutter_init (&argc, &argv);

  stage = clutter_stage_get_default ();
  clutter_actor_set_size (stage, 800, 600);

  clutter_color_parse ("Red", &bg_color);

icon = clutter_texture_new_from_file ("./examples/ohpowers.png", &error);
  clutter_actor_set_position(icon, 400, 200);
  if (error)
    g_error ("Unable to load 'redhand.png': %s", error->message);

  clutter_container_add_actor (CLUTTER_CONTAINER (stage), icon);

  // THESE LINES NEED TO BE UNCOMMENTED TO AVOID A BUS ERROR
  //ClutterActor *b = clutter_rectangle_new();
  //clutter_container_add_actor( CLUTTER_CONTAINER (stage), b);

  clutter_actor_show (stage);

  clutter_main ();

  return 0;
}

--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to