Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rnentjes

Pages: [1]
1
The c code is coming out of a compiler. Including the c header doesn't give me any type information in the original language, so that's the reason it looks like this.

Cheers, Rien

2
Yes, the code is generated. It's a hobby compiler project and I am trying to call csfml methods from the generated code, that's why it's all re-declared.

I think I see now what the problem is because of your remark about the signature, which indeed doesn't seem to mach (details, details...).

So thank you very much!

3
C / X Error of failed request: BadMatch (invalid parameter attributes)
« on: April 27, 2015, 12:48:40 pm »
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

Pages: [1]
anything