Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » X Error: BadDrawable (X_PutImage)

This thread is locked; no one can reply to it. rss feed Print
X Error: BadDrawable (X_PutImage)
Enno Rehling
Member #16,141
January 2016
avatar

I installed allegro 5 from the Debian packages, and a small example program causes the following output at exit:

#SelectExpand
1 enno@debian:~/allegro$ ./tests 2 X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) 3 Major opcode of failed request: 72 (X_PutImage) 4 Resource id in failed request: 0x1800002 5 Serial number of failed request: 43 6 Current serial number in output stream: 46

Since I'm running Debian inside Virtualbox, I suppose there's a chance that this is related to bad X11 graphics drivers, but surely I can't be the first person to do this? Is there a solution?

Source below, for reference. When I remove the al_flip_display() call, no error occurs.

#SelectExpand
1 #include <allegro5/allegro.h> 2 int main(int argc, char **argv) 3 { 4 ALLEGRO_DISPLAY *disp = 0; 5 if (!al_init()) { 6 return -1; 7 } 8 disp = al_create_display(640,480); 9 if (!disp) { 10 return -2; 11 } 12 al_flip_display(); 13 al_rest(1.0); 14 al_destroy_display(disp); 15 return 0; 16 }

amarillion
Member #940
January 2001
avatar

All I can tell you is that that code looks fine, and it works fine on my (debian-based) non-virtualised Mint 14.2. system.

At the moment I don't have a virtualbox debian image laying around to test on.

--
Martijn van Iersel | My Blog | Sin & Cos | Tegel tilemap editor | TINS 2017

SiegeLord
Member #7,827
October 2006
avatar

I always chalked it up to driver issues, but perhaps there really is something wrong with what Allegro does that only shows up in a virtual environment. That said, this isn't the only place where such errors happen. E.g. ex_multiwin reliably causes a quit-time X error as well on my system (even if not virtualized).

I don't actually know how to easily debug these issues, as these errors are somewhat asynchronous. We'd have to sync every X11 call I guess to really nail it down.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: