Author Topic: Unresponsive menus and dialogs after 3.8 on Linux  (Read 425 times)

0 Members and 1 Guest are viewing this topic.

Offline Hellzed

  • 28
Unresponsive menus and dialogs after 3.8 on Linux
After upgrading fs2 open from 3.7.2 to 3.8 with Knossos, on Ubuntu 18.04, I'm encountering a weird bug:
the game launches just fine, but after I create a pilot and click "select", the main menu appears and just goes unresponsive.
Cursor moves but I can't click on anything and mouseover animations won't appear. To quit, I have to alt-tab out of the game and kill it.

Sometimes, the main menu will work properly, until I bring up a dialog (like restart mission, quit game), then it will go unresponsive.
The behaviour is identical on retail and MediaVPs.

In fast debug mode, the debug log will remain empty.

I thought maybe that was a library issue with the AppImage used by Knossos and built the game myself from the master branch available on GitHub, but the issue is the same with that build.

Reverting to 3.7.2, the menu and dialogs work again. I have no idea what could be wrong here...

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
What happens when you use 3.7.4? Can you determine when this started happening by using the nightly builds?

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
I can't find a 3.7.4 tag on git, which commit should I checkout?

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
I think 3.7.4 was released before we used tags in git. You can use the source code package from the release post though.

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
I just tried with 3.7.4, all good. I'm not encountering the issue on this build.

Going to bisect it right now.
« Last Edit: August 25, 2018, 05:55:58 pm by Hellzed »

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
Something happened after 3.7.3 or 3.7.4... As soon as builds are tagged 3.7.5, the bug appears.
Bisecting didn't help much, since fso didn't build on linux for a long time, and I had to skip some big antipodes merge with 100k+ changes.
« Last Edit: August 25, 2018, 11:09:12 pm by Hellzed »

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
That is the SDL2 merge and I suspected that it was an issue with that. This must be something specific to your installation or distribution since I don't have such an issue on my Linux system. Have you tried running FSO in a window?

Also, it is weird that the log is staying empty since at least something should be written to it even before the first window appears. Are you sure that you are looking at the right log in the right location? You can find more information on where the right log file will be located here: https://www.hard-light.net/forums/index.php?topic=56279.msg1180359#msg1180359

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
Indeed, no bug in windowed mode.

Now, here's a fullscreen debug log:
https://fsnebula.org/log/5b828d14cb0d331d2b549753

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
There are some weird log entries that show some weird behavior:
Code: [Select]
OpenGL Debug: Source:OpenGL Type:Performance ID:18 Severity:Medium Message:Stalling on the GPU for mapping a busy buffer object

OpenGL Debug: Source:OpenGL Type:Performance ID:19 Severity:Medium Message:CPU mapping a busy "bufferobj" BO stalled and took 2.026 ms.

Frame  0 too long!!: frametime = 1.670 (1.670)
Frame  0 too long!!: frametime = 1.391 (1.391)
Frame  0 too long!!: frametime = 4.590 (4.590)
Frame  0 too long!!: frametime = 1.019 (1.019)
Frame  0 too long!!: frametime = 2.105 (2.105)
Frame  0 too long!!: frametime = 0.936 (0.936)
Frame  0 too long!!: frametime = 1.520 (1.520)
Frame  0 too long!!: frametime = 4.164 (4.164)

Do you know how to use gdb for debugging a program? I would like to know where that GPU warning came from but that requires running the game in a debugger.

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
Yeah, after reading that log about the GPU I switched on my nvidia card (same laptop), tried again: no bug.
So that's likely an issue with mesa/xorg-video-intel.

I know some gdb basics, but the bigger issue is that I can't remember how to launch fs open whithout knossos :p

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
Hmm, I can't help you with Knossos unfortunately...

If you find a way to get it to work then the relevant function is debug_callback in gropengl.cpp. Just set a breakpoint in that function and post the backtrace here. Maybe that will shed some light on why this issue might be occurring.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Unresponsive menus and dialogs after 3.8 on Linux
I know some gdb basics, but the bigger issue is that I can't remember how to launch fs open whithout knossos :p

It should be as simple as:

Code: (in a terminal) [Select]
cd KNOSSOS_DIR/FS2
/path/to/your/git/clone/build/bin/fs2_open_3_8_1_x64
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
That works, but now I can't use my build with the breakpoint in gdb because it has no debug symbols... What option do I use cmake with to generate a debug build?

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
You need to use -DCMAKE_BUILD_TYPE=Debug.

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
Done. Now i load fs2_open_3_8_1_x64-DEBUG with gdb, but immediately bet a black screen. How do I reach the function that interests us?
I used:
Code: [Select]
break debug_callback
« Last Edit: August 26, 2018, 01:46:25 pm by Hellzed »

 

Offline m!m

  • 211
Re: Unresponsive menus and dialogs after 3.8 on Linux
The OpenGL output from your log is generated by that function so it should be called when the window freezes. I don't know why you only see a black screen. Maybe there is a warning dialog you are not seeing? Running the game in fullscreen and gdb can be a bit tricky some times.

 

Offline Hellzed

  • 28
Re: Unresponsive menus and dialogs after 3.8 on Linux
Actually the black screen is caused by a bunch of shader issues that trigger debug_callback first, when the program starts
Code: [Select]
OpenGL Debug: Source:Shader Compiler Type:Other ID:6 Severity:UnknownMessage:FS SIMD16 shader: 2 inst, 0 loops, 0 cycles, 0:0 spills:fills, Promoted 0 constants, compacted 32 to 32 bytes.
Btw, the errors really come from the Intel driver: https://github.com/skeggsb/Mesa/blob/master/src/mesa/drivers/dri/i965/intel_buffer_objects.c
« Last Edit: August 26, 2018, 02:23:57 pm by Hellzed »