Menu

#17 Linux/SDL1.2: console retracts by itself, QS softlocks and needs to be killed

None
closed-invalid
nobody
None
5
2021-08-29
2016-12-18
No

Reported by Shamblernaut here:
http://celephais.net/board/view_thread.php?id=60452&start=2633&end=2633

System, ubuntu 16.04, running latest quakespasm, quakespasm executable (does not occur in quakespasm-sdl2) lauched from terminal without any parameters.

Replicating the bug:

Upon load of the game, new game is selected. Just before the console retreats all the way to the top the tilde key is pressed and the console comes down again.

Here is where the bug occurs, the console, instead of staying down, goes back up. Now every time the console button is hit, the console will drop, then return back to the top.

This also affects other keys, if you then hit escape and go to "new game", when you're prompted "Are you sure you want to start a new game", the game will accept no input.

Alt-Enter is locked, so I can't quit the game, Escape is locked so I can't return to the menu. All I can do is change terminals (ctrl-alt-F1) and kill quakespasm.

I've reproduced this before but I forget what was happening. I think SDL1.2 is sending us some bogus keys, probably "in_debugkeys 1" will help.

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2016-12-18

    This reproducible only on linux, and not on osx or win?

     
  • Ozkan Sezer

    Ozkan Sezer - 2016-12-18

    Is it possible that it is related to this?
    https://bugzilla.libsdl.org/show_bug.cgi?id=2325

     
  • Eric Wasylishen

    Eric Wasylishen - 2016-12-18

    Yes, I have only ever seen this on linux.

    Possibly SDL bug #2325 could be related. I think I've only tested this with Ubuntu packages of SDL1.2, not sure if those packages would have https://hg.libsdl.org/SDL/rev/0aade9c0203f applied.

     
  • Ozkan Sezer

    Ozkan Sezer - 2016-12-18

    No, debian/ubuntu don't have that fix applied, AFAIK. The
    issue was reported to them, though:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809070

     
  • Eric Wasylishen

    Eric Wasylishen - 2016-12-18

    Yeah, I confirmed that the patch is not applied in:
    https://anonscm.debian.org/cgit/pkg-sdl/packages/libsdl1.2.git/
    From that email, it sounds like debian won't patch it unless there is a new SDL1.2 release.

    For some reason I can't reproduce it now, even though my system should be the same as Shamblernaut's (ubuntu 16.04). Tried button mashing esc/tilde with no luck.
    The bug report indicates it's a race condition though, so it could just be bad luck that I can't reproduce right now.

     
  • Ozkan Sezer

    Ozkan Sezer - 2017-01-17

    Status? What do we do with this?

     
  • Eric Wasylishen

    Eric Wasylishen - 2017-01-17

    Tried again, still can't reproduce. I asked Shamblernaut if he can still reproduce it or has any suggestions

     
  • Eric Wasylishen

    Eric Wasylishen - 2017-01-17

    OK, got a reliable way to reproduce. Ubutu 16.04, default Unity session, qs running windowed, sdl1.2.

    • Start a new game, wait for console to retract, then open it with the backtick key.
    • Press and release both the Escape and backtick keys at the same time, it should close the console
    • After the console closes, press the backtick key again.
    • The console should open up, then close on its own. With in_debugkeys 1 you can see a constant spam of SDL_KEYDOWN with the backtick symbol

    Still not sure if we can do anything about it

     
  • Eric Wasylishen

    Eric Wasylishen - 2017-01-18

    Yes, I confirmed that this SDL1.2 commit fixes the problem https://hg.libsdl.org/SDL/rev/0aade9c0203f
    and reverting to the previous commit https://hg.libsdl.org/SDL/rev/22a7f096bb9d reintroduces it.

    I don't see anything we can do to work around it.

    IMHO for the next QS release, we should just say SDL1.2 is unsupported on Linux, unless you compile SDL yourself from hg. Distros should package the SDL2 version.

     
  • Ozkan Sezer

    Ozkan Sezer - 2021-08-29
    • status: open --> closed-invalid
     
  • Ozkan Sezer

    Ozkan Sezer - 2021-08-29

    Not a QS bug, this is an SDL-1.2 bug for which there is a fix.
    Closing as invalid.

     

Log in to post a comment.