Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamepad attached STK waits terminal keypress to run 'mainloop' #536

Closed
supertuxkart-sourceforge-migration opened this issue Feb 24, 2014 · 7 comments

Comments

@supertuxkart-sourceforge-migration

Author: aapoaapo

Ubuntu 11.04 amd64
(Linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux)

Compiled Irrlicht (svn 3843) with NDEBUG=1
Compiled STK (svn 10036) using cmake.

Game can be then started bin/supertuxkart and it works.

When I attach gamepad (tested with two different and working pads) and start game from terminal:
Loading screen works normally. Music starts for half a second and then stops. Main menu doesn't appear. When I focus back to terminal and press enter, main menu appears and music plays half a second. Then game is stucked again. I can click menu entry, nothing happens. Until I focus terminal and press enter, then I can see my click happens. I can keep enter pressed and see animations and hear music, but when I release enter, game freezes again.
(Is there any sense? This is weird behaviour, should I video record it?)

Deattaching gamepad and restarting game: game works.

@supertuxkart-sourceforge-migration

Author: aapoaapo
Same happens also with STK svn-8163 (first commit with only irrlicht-1.8 support). I will check even older versions with irrlicht-1.7. But I have no evidence that irrlicht is guilty, I'm just starting somewhere.

Is there any known other (FLOSS) game using Irrlicht-1.8?

@supertuxkart-sourceforge-migration

Author: aapoaapo
Same happens with svn-6009 (using Irrlicht 1.7.2+dfsg1-1).

This is only Warning I see:
WARNING: Music not playing when it should be. Source state: 4116

Turning audio off (game works normally if there are no gamepads) just hides Warning, but game doesn't still run.

@supertuxkart-sourceforge-migration

Author: auria
This sounds very weird and the only idea that comes to my mind is that the gamepad driver somehow hangs and fails to give control back to STK. Are you familiar enough with gdb to see where the game is when it's stuck?

gdb supertuxkart
run
... wait until it hangs, then press Ctrl+C ...
bt

and post the output here

@supertuxkart-sourceforge-migration

Author: aapoaapo
STK svn-head

Program received signal SIGINT, Interrupt.
0x00007ffff5a4e35d in read () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff5a4e35d in read () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000900a37 in irr::CIrrDeviceLinux::pollJoysticks() ()
#2 0x00000000009017c7 in irr::CIrrDeviceLinux::run() ()
#3 0x000000000070cf48 in IrrDriver::update (this=0x12461e0, dt=0.0500000007) at supertuxkart_svn/src/graphics/irr_driver.cpp:1212
#4 0x00000000006b56b4 in MainLoop::run (this=0x1a14b00) at supertuxkart_svn/src/main_loop.cpp:156
#5 0x00000000006aeab3 in main (argc=1, argv=0x7fffffffe168) at supertuxkart_svn//src/main.cpp:1211

I will check also Irrlicht with debug symbols. Is Irrlicth svn-3843 still the best (only?) working version?

@supertuxkart-sourceforge-migration

Author: aapoaapo
And full trace: (Irrlicht svn-3843 + STK svn-10036)
#0 0x00007ffff5a4e35d in read () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000987280 in irr::CIrrDeviceLinux::pollJoysticks (this=0x126a700) at CIrrDeviceLinux.cpp:1707
#2 0x0000000000983943 in irr::CIrrDeviceLinux::run (this=0x126a700) at CIrrDeviceLinux.cpp:1118
#3 0x000000000070cf48 in IrrDriver::update (this=0x12461e0, dt=0.0500000007) at supertuxkart_svn/src/graphics/irr_driver.cpp:1212
#4 0x00000000006b56b4 in MainLoop::run (this=0x1a14b00) at supertuxkart_svn/src/main_loop.cpp:156
#5 0x00000000006aeab3 in main (argc=1, argv=0x7fffffffe168) at supertuxkart_svn//src/main.cpp:1211

@supertuxkart-sourceforge-migration

Author: auria
Sorry, this does look like an error in either irrlicht or your driver - and since irrlicht works just fine for most people on linux I would rather assume your driver.

Given that I do not have this problem, unless you are yourself a developer and able to debug the issue, I don't see what I can do

@supertuxkart-sourceforge-migration

Author: aapoaapo
I tested another computer running newer Ubuntu (11.10) with same gamepads and same versions of STK+Irrlicht. Can't reproduce bug. Might relate gamepad driver of Ubuntu-11.04 (or some old settings I have).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant