Author Topic: [bug] Game crashes after exiting fullscreen  (Read 3347 times)

Offline tarkalak

  • Commander
  • *****
  • Posts: 1460
    • View Profile
[bug] Game crashes after exiting fullscreen
« on: May 13, 2022, 10:49:28 pm »
I get the following error and the game crashes:

[q]./OpenXcomEx.sh
[13-05-2022_22-16-29]   [DEBUG]   loadArgs(): config -> ./user
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  153 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x2a00003
  Serial number of failed request:  248
  Current serial number in output stream:  250
[/q]

OpenXcom.sh is a script that simply runs "./OpenXcomEx -config ./user"

I am on Ubuntu 20.04, running the Linux build.

My desktop resolution is 1920x1080, I run the game in 1368x768 fullscreen mode. When I press Alt-Enter to switch to windowed the game crashes and my desktop resolution is switched to 1368x768. If I run it again, or switch game resolution to match desktop it doesn't crash. I would prefer to run it in the smaller resolution, because I don't have to scale down screenshots afterwards.

OXCE Version is Extended-7.5.3-f94c8c56f-2022-02-07-bionic-x86_64
I use the XComFiles mod with version after 2.7.0 (master from a few days ago) and Dark Geoscope 1.0.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3346
    • View Profile
Re: [bug] Game crashes after exiting fullscreen
« Reply #1 on: May 14, 2022, 12:06:38 am »
Look like some error between SDL and XWin

Offline tarkalak

  • Commander
  • *****
  • Posts: 1460
    • View Profile
Re: [bug] Game crashes after exiting fullscreen
« Reply #2 on: May 14, 2022, 08:44:04 pm »
So not something that OXCE can fix?

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3346
    • View Profile
Re: [bug] Game crashes after exiting fullscreen
« Reply #3 on: May 14, 2022, 09:34:35 pm »
In some cases bugs like this can be avoided by some workarounds, but hard to say if its possible in this case.

First of all, how make your executable? Is form some public place or you compile it yourself?

It could be caused by old version of SDL or too new version of SDL. There s possibility to try hack SDL1 to run on SDL2 that could avoid this bug too

Offline tarkalak

  • Commander
  • *****
  • Posts: 1460
    • View Profile
Re: [bug] Game crashes after exiting fullscreen
« Reply #4 on: May 14, 2022, 10:41:37 pm »
In some cases bugs like this can be avoided by some workarounds, but hard to say if its possible in this case.

First of all, how make your executable? Is form some public place or you compile it yourself?

It could be caused by old version of SDL or too new version of SDL. There s possibility to try hack SDL1 to run on SDL2 that could avoid this bug too

I just downloaded it from https://openxcom.org/forum/index.php/topic,5258.msg78462.html#msg78462.

For the sdl and the other libraries I installed them with:
Code: [Select]
sudo apt install --no-install-recommends libsdl1.2debian libsdl-gfx1.2-5 libsdl-image1.2 libsdl-mixer1.2

Here is the OXCE I use without mods.
« Last Edit: May 14, 2022, 10:43:35 pm by tarkalak »

Offline tarkalak

  • Commander
  • *****
  • Posts: 1460
    • View Profile
Re: [bug] Game crashes after exiting fullscreen
« Reply #5 on: May 27, 2022, 11:30:51 am »
In the end I set the resolution to the native one, changed scaling to 3x and live with it.