Hi,
When I compile & run the following example (on linux 64 bit) it runs without a problem:
#include <stdio.h>#include <stdlib.h>/* VideoMode */typedef struct {/* width */ int var_6
;/* height */ int var_7
;/* bitsPerPixel */ int var_8
;} *object_2
;/* RenderWindow */typedef struct {} *object_3
;typedef struct{ unsigned int depthBits
; ///< Bits of the depth buffer unsigned int stencilBits
; ///< Bits of the stencil buffer unsigned int antialiasingLevel
; ///< Level of antialiasing unsigned int majorVersion
; ///< Major number of the context version to create unsigned int minorVersion
; ///< Minor number of the context version to create} *sfContextSettings
;/* createRenderWindow */ /* RenderWindow */ object_3 sfRenderWindow_create
(/* VideoMode */ object_2 var_10
, /* string */ char* var_11
, /* int */ int var_12
, sfContextSettings
* var_13
);/* getDesktopMode */ /* VideoMode */ object_2 sfVideoMode_getDesktopMode
();main
() { object_2 vm
= sfVideoMode_getDesktopMode
(); printf("vm %p \n\n", vm
); object_3 var_17
= sfRenderWindow_create
(vm
, "SFML!", 0 , 0 );} But when I remove the printf statement I get this:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 78 (X_CreateColormap)
Serial number of failed request: 59
Current serial number in output stream: 61
Anyone has any idea what is going on? It looks like a timing issue to me but I have no idea where it's coming from and what I can do about it.
Fun fact; the failing code works fine in gdb.
Cheers,
Rien