Page 1 of 2

pressing ALT causes lags?!

Posted: Tue Mar 11, 2008 4:55 pm
by switch_case
hey everyone.
i have a misterious bug in irrlicht, every programm i write has the same bug.
everytime i run a programm, everything works fine. but at the time you start to press [ALT], the programm gets slower and slower, and finally stops. it takes a few seconds (depends on how long you pressed ALT), and it goes on.

i don't know if im the only one who has this bug, maybe its caused by my hardware (keyboard or whatever), but i would appreciate if someone would test it on his computer...

thanks so far. :)

Posted: Tue Mar 11, 2008 5:00 pm
by JP
I certainly found a few keys which would cause irrlicht to completey stop (instantly) but would then resume normally once the key was pressed again... Rather strange, and i've got a feeling the alt key may have been one of them.

Posted: Tue Mar 11, 2008 5:01 pm
by CuteAlien
I can't reproduce that here. Which irrlicht version, which OS and which renderer are you using?

Posted: Tue Mar 11, 2008 5:51 pm
by Dorth
That is rather huge. :?
Please, more info ^^

Posted: Tue Mar 11, 2008 7:23 pm
by switch_case
i have WIN XP, irrlicht 1.4, and it happens with every renderer, no matter if openGL, directX or software.
but it doesnt happen this way with other programs (written by people in this fourm) i downloaded. but the problem there is, for example, that if you move through a level with [W], and press [ALT], the players node wont stop moving untill you release [ALT], no matter if [W] is still pressed...
its so strange i dont understand it... :P
maybe it is a keyboard problem? i have a wireless keyboard and mouse (both logitech, but different receivers)?!

Posted: Tue Mar 11, 2008 7:32 pm
by rogerborg
Does it happen in the SDK sample apps?

If not, can you please post a minimal example that shows it happening.

Posted: Tue Mar 11, 2008 7:45 pm
by switch_case
i tried it with the collision example, wich is in the \bin\win32-visualStudio folder. and yes, it starts lagging.
do you want to see a video or what do you mean ? :)

Posted: Tue Mar 11, 2008 9:49 pm
by CuteAlien
I still can't reproduce the lag, but I also get the other problem that the movement in the collision example won't stop when you press alt before releasing the movement button. So that problem seems to be a bug.

No idea why it does get slower for you. Maybe you have some other functionality mapped onto the alt-key on your computer?

Posted: Wed Mar 12, 2008 6:31 am
by BlindSide
Wouldn't the alt-key on windows system just try to access the windows system menu? (Eg, Close, Move, etc). This happens fullscreen sometimes too, so you don't actually see the menu pop-up.

Posted: Wed Mar 12, 2008 8:23 am
by switch_case
good idea... but why does it lag only with programs compiled on my computer?
and for example in computer games wich i bought (battlefield or whatever) it doesnt lag or cause problems at all, so i think it is a weird thing caused by the irrlicht engine...

and i am very sure i have no other functions on [ALT], because i wrote my own event handler, and all it can use is WASD + - and the mouse.
and also the camera is not a -FPS, but an usual ISceneNodeCamera, so it wont do anything, if not moved by my event handler.

Posted: Wed Mar 12, 2008 2:30 pm
by twilight17
If you use the Built in cameras (maya or FPS) if you press ALT (for me at least) it will pause the game completely until I hit it again... I didn't think this was a bug.. more of a feature!

Posted: Wed Mar 12, 2008 4:21 pm
by switch_case
but why does it still happen?
i dont use a fps or maya cam ;)

it must happen somewhere else in the engine...

Posted: Wed Mar 12, 2008 5:41 pm
by MasterGod
Can you post a binary for me (us) to check please?

And a test-case code for that behavior.

Posted: Wed Mar 12, 2008 5:46 pm
by rogerborg
Urgh, that's nasty behaviour with the FPS camera under Windows. There's nothing in Irrlicht that handles the ALT key (KEY_MENU) specially. Possibly that's the problem - there should be something that handles it.

Posted: Thu Mar 13, 2008 12:28 am
by Spintz
http://irrlicht.sourceforge.net/phpBB2/ ... 359#146359

This post by me shows how to add support for Win Keys and F10, which in Windows acts as if pressing alt (activates the window menu). Even if the menu is hidden, it still exists. Adding Alt catches (I'm going to do this in 3Demon), is very simple.