First let me explain my situation. I'm running an executable that runs a menu that can launch games as dynamic sos. The menu uses allegro to render simple 2d Graphics and is completely legacy code (which I can't update in the short term). Some new games that I've recently developed can optionally be rendered with irrlicht (instead of allegro) if there is proper hardware. So when a new game is launched from this legacy menu I give irrlicht the current window so that can render with it. Everything is great until the game has expired and I've dropped the irrlicht device. I then get a crash with the following backtrace and log...
note: I've left out the part of the stack that include my code.
Code: Select all
Irrlicht Engine version 1.5
Linux 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686
Creating X window...
Visual chosen: : 53
Using renderer: OpenGL 1.4
GeForce 6200 LE/PCI/SSE2: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL not available.
X Error: GLXUnsupportedPrivateRequest
From call : unknown
pure virtual method called
terminate called without an active exception
Program received signal SIGABRT, Aborted.
[Switching to Thread -1248429552 (LWP 17287)]
0xb7ae5430 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7ae5430 in __kernel_vsyscall ()
#1 0xb6a34d20 in raise () from /devel/root/lib/libc.so.6
#2 0xb6a36631 in abort () from /devel/root/lib/libc.so.6
#3 0xb6d0b680 in __gnu_cxx::__verbose_terminate_handler () from /devel/root/usr/lib/libstdc++.so.6
#4 0xb6d090e5 in std::set_unexpected () from /devel/root/usr/lib/libstdc++.so.6
#5 0xb6d09122 in std::terminate () from /devel/root/usr/lib/libstdc++.so.6
#6 0xb6d09845 in __cxa_pure_virtual () from /devel/root/usr/lib/libstdc++.so.6
#7 0xafe09525 in irr::CLogger::log (this=0xb929f950, text=0xb93ae380 "X Error: BadLength (poly request too large or internal Xlib length error)",
ll=irr::ELL_WARNING) at CLogger.cpp:42
#8 0xafe0937f in irr::CLogger::log (this=0xb929f950, text=0xafed1381 "X Error",
hint=0xbfe6c494 "BadLength (poly request too large or internal Xlib length error)", ll=irr::ELL_WARNING) at CLogger.cpp:59
#9 0xafe0a1d1 in irr::os::Printer::log (message=0xafed1381 "X Error", hint=0xbfe6c494 "BadLength (poly request too large or internal Xlib length error)",
ll=irr::ELL_WARNING) at os.cpp:179
#10 0xafe0411b in irr::IrrPrintXError (display=0xb9296b90, event=0xbfe6c5c8) at CIrrDeviceLinux.cpp:186
#11 0xb6defe7a in _XError () from /devel/root/usr/lib/libX11.so.6
#12 0xb6df1944 in _XReply () from /devel/root/usr/lib/libX11.so.6
#13 0xb6de877a in XSync () from /devel/root/usr/lib/libX11.so.6
#14 0xb6dc7aaa in XCloseDisplay () from /devel/root/usr/lib/libX11.so.6
#15 0xafe04380 in ~CIrrDeviceLinux (this=0xb9279280) at CIrrDeviceLinux.cpp:158
#16 0xb4d74979 in irr::IReferenceCounted::drop (this=0xb92793c0) at /devel/root/usr/local/include/irrlicht/IReferenceCounted.h:124
I've looked into what the CIrrDeviceLinux does and I noticed that it destroys and window and display in it's destructor. I am personally not too familiar with strait X usage, but I tried just commenting out the function that was in my backtrace "XCloseDisplay". This resolved my crash, and the window returned to the proper size and the game's dll got unloaded. The problem I then ran into was that allegro was no longer displaying or getting any messages from the window (input specifically).
what I set the windowID to...
Code: Select all
#include "allegro.h"
#include "xalleg.h"
...
irrProp.WindowID = (void*)(_xwin.window);
When I run this situation on Windows, irrlicht uses my hWnd and when I get rid of irrlicht my hWnd is still usable for the rest of the program's life. This makes me believe that this is not intended functionality.
Let me know if you would like to know any additional information. If you don't, please let me know if this is intended or a known issue etc. and if you guys are looking to resolve it anytime soon. Just want to know if I need to look at patching it myself (which I would like to avoid if you guys plan on doing it yourself) or if I just need to lrn2code.
thanks guys,
Aaron Melcher
Lead Game Developer
Merit Entertainment