wesnoth icon indicating copy to clipboard operation
wesnoth copied to clipboard

Game crash when opening preferences dialog.

Open gfgtdf opened this issue 1 year ago • 13 comments

Game and System Information

  • Version: 1.16.8
  • Downloaded from: GitHub
  • Build info: built with scons
  • OS: Ubuntu 22.04

Description of the bug

When opening the preferences dialog, the game sometimes crashes with:

X Error of failed request:  BadRROutput (invalid Output parameter)
  Major opcode of failed request:  139 (RANDR)
  Minor opcode of failed request:  9 (RRGetOutputInfo)
  Serial number of failed request:  1065147
  Current serial number in output stream:  1065147
Segmentation fault (core dumped)

It doesn't always happen and so far it only happend when i opened the preferences dialog from playing a game.

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

gfgtdf avatar Mar 24 '23 22:03 gfgtdf

It mentions the "X Error", so this sounds like it's a problem with the desktop environment perhaps? Wesnoth itself certainly doesn't attempt to interact with X directly.

Pentarctagon avatar Mar 24 '23 22:03 Pentarctagon

But indirectly, and i forgot the last line, the segfault could be on our end. maybe we don't check for an SDL function returning NULL or simething like that.

That said, i have no idea how to debug the destktop environment.

gfgtdf avatar Mar 24 '23 22:03 gfgtdf

Can't say I've encountered this. 1.16 or master, Linux or Windows.

Ever happen with a fresh preferences file?

Wedge009 avatar Mar 24 '23 23:03 Wedge009

Stacktrace :

....
#10 0x00007fed6a464495 in __run_exit_handlers
    (status=1, listp=0x7fed6a638838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#11 0x00007fed6a464610 in __GI_exit (status=<optimized out>)
    at ./stdlib/exit.c:143
#12 0x00007fed69b527cb in  () at /lib/x86_64-linux-gnu/libX11.so.6
#13 0x00007fed69b528f4 in _XError () at /lib/x86_64-linux-gnu/libX11.so.6
#14 0x00007fed69b529f7 in  () at /lib/x86_64-linux-gnu/libX11.so.6
#15 0x00007fed69b544d5 in _XReply () at /lib/x86_64-linux-gnu/libX11.so.6

#16 0x00007fed69ac2fa2 in XRRGetOutputInfo ()
    at /lib/x86_64-linux-gnu/libXrandr.so.2
--Type <RET> for more, q to quit, c to continue without paging--
#17 0x00007fed6ad5afe3 in  () at /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#18 0x00007fed6ad32f0e in  () at /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#19 0x000055ca792816f5 in CVideo::get_available_resolutions(bool)
    (this=0x55ca7a5d7ae0, include_current=include_current@entry=true)
    at src/video.cpp:436
...

video.cpp:436 calls SDL_GetNumDisplayModes (but these stacktrace always have a change of not being 100% exact)

Seems to happen rather consistantly now

gfgtdf avatar Mar 24 '23 23:03 gfgtdf

Steps to replicate? I still cannot confirm - at least with Steam Linux release - and don't see anyone else confirming, so not sure it's not unconfirmed.

Wedge009 avatar Mar 25 '23 01:03 Wedge009

I mean, i can reproduce it and i'm a developer of wesnoth which should be enough. But of course it depends what the intention behind the "unconfirmed" label is.

This bug is by nature platform-specific and also not that easy to reproduce, it now happend 3 times, so far always during longer games. I didn't manage to reproduce it in a quick way yet.

gfgtdf avatar Mar 25 '23 01:03 gfgtdf

It's fairly bizarre that getting a list of available resolutions would succeed or fail based on how long a game has been going - the list of available resolutions is constant per screen. How long of a game does it take for you to be able to reproduce the issue?

Pentarctagon avatar Mar 25 '23 01:03 Pentarctagon

Hmm, I know some other SDL projects have problems when left running for very long (like a couple days long) and most issues pointing to that are closed as driver issues - maybe it's again a driver problem?

Zireael07 avatar Mar 25 '23 10:03 Zireael07

. How long of a game does it take for you to be able to reproduce the issue?

Idk it doesn't always happen and so far it always happens when i didn't expect it. Often (but i don't think always) i have the game open for quite some time, so something else and then come back to wesnoth.

maybe it's again a driver problem?

Maybe, not sure, but i have every little knowledge in that area to say something here.

gfgtdf avatar Mar 26 '23 02:03 gfgtdf

Just happend again, i started wesnoth (current master), then went outside to go biking, and when i went home an opened the preferences dialog i got this error :/

gfgtdf avatar Jun 03 '23 19:06 gfgtdf

Do you still get this with 1.18?

Wedge009 avatar Mar 27 '24 02:03 Wedge009

I didn't play that much recently, so i cannot really tell for now.

gfgtdf avatar Mar 28 '24 01:03 gfgtdf

I'm not sure if this should remain open since it looks like no-one besides gfgtdf has encountered the issue, and not for quite some time, it seems.

Wedge009 avatar May 02 '24 22:05 Wedge009