[GEM-dev] gem bugs ?

IOhannes m zmoelnig zmoelnig at iem.at
Thu Mar 2 15:34:12 CET 2006


Georg Holzmann wrote:
> Hallo!
> 
> Just discovered 2 bugs (or at least strange behaviours):
> 
> 1) 
> create a gemwin, then close the gemwin with the mouse (clicking on the "x"
> right above the window ...) -> crash (also if there is no gemhead ...)
> the console tells me:
> 
> GEM: Only using 8 color bits
> Direct Rendering enabled!
> GEM: Start rendering
> X connection to :0.0 broken (explicit kill or server shutdown).
> pd_gui: pd process exited

on my machine this does not crash.
however, it does crash, when you  "create" the gem-window, close it with
the mouse and then hit the "destroy" button.

actually the problem is that when a display/window-handle becomes
invalid (because you the window gets destroyed by someone else) and then
you access this invalid handle, the X-server will crash.

in theory, i see 3 solutions to this problem:
a) perform a check whether the handle is still valid before doing any
critical operation on it: unfortunately i haven't found any possibility
to do so
b) register a callback function that gets called whenever the window is
destroyed - similar to resize-callbacks: unfortunately i haven't managed
to do so...
c) provide X with an error-handler that gets called whenever something
really bad has happened (like a critical operation on an invalid
handle): unfortunately there IS already an error-handler, which for some
unknown reason does not get called. (if it did, then the ErrorHandler
would need to be fleshed out, in order to prevent a crash; but that is
just a minor issue...)

i guess i need some help here by some oldschool X-programmers. (günter...?)

> 
> 2)
> If I want to make a fullscreen Gem-window with [fullscreen 1( my window
> manager (kde3.5) is really messed up ...
> I don't know how to explain ... resolution is really low and if I move the
> mouse I get out of the gemwin and see the rest of the screen (the patch,
> console ...) in a really low resolution ...

"fullscreen" tries to go in fullscreen-mode with the current dimension
of the gemwindow (and not that of the display).
so if you make do [dimen 640 480, fullscreen 1, create(, your monitor
should go into fullscreen-mode @ 640x480.
if this is not possible (e.g. your dimension is 500x500 and hardly any
hardware supports that in fullscreen), Gem tries to find the "best"
available resolution as reported by the X-server.
when it finds a suitable resolution which is lower than your current
one, it will switch to that; X will then make a virtual desktop.

you can change the resolutions back with Ctrl+Alt+"+"

solutions:
 + specify the current resolution as dimen before creating the
fullscreen window.
 + only specify the resolutions you really want in your xorg.conf

btw, i am quite happy with this behaviour, as it allows me to go into
fullscreen mode and still access the pd-patch in case of emergency.

mfg.asdr.
IOhannes




More information about the GEM-dev mailing list