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

pachi: Crash on startup #257

Closed
smcv opened this issue Oct 13, 2022 · 5 comments
Closed

pachi: Crash on startup #257

smcv opened this issue Oct 13, 2022 · 5 comments

Comments

@smcv
Copy link
Contributor

smcv commented Oct 13, 2022

Prerequisites:

  • Debian testing (Debian 12 alpha)
  • Video: GNOME 43 in Wayland mode (with Mesa 22.2.0 on AMD Vega, if it matters)
  • Audio: Pipewire 0.3.59, with pipewire-pulse emulating PulseAudio
  • apt install pachi (Debian package version 1:1.0-10)
  • Some relevant libraries:
    • libsdl1.2-compat either 1.2.58-1 (packaged in Debian experimental) or commit 63e4393 (locally built)
    • libsdl2-2.0-0 version 2.24.1+dfsg-1
    • libsdl-mixer1.2 version 1.2.12-17+b2
    • libsdl1.2debian (real SDL 1.2) version 1.2.15+dfsg2-8

To reproduce:

  • ld.so /usr/games/pachi
  • LD_LIBRARY_PATH=.../sdl12-compat/_build ld.so /usr/games/pachi
  • SDL_VIDEODRIVER=wayland LD_LIBRARY_PATH=.../sdl12-compat/_build ld.so /usr/games/pachi

Expected result: it runs

Actual result: real SDL 1.2 works. sdl12-compat segfaults on startup with a very unhelpful stack trace (it seems debuginfod.debian.net doesn't have access to its debug symbols):

#0  0x00007fcbda72b25f in  ()
#1  0x00007ffc71daafa8 in  ()
#2  0x00007fcbda72b31f in  ()
#3  0x00007fcbda7273d0 in  ()
#4  0x0000000000000000 in  ()
@smcv
Copy link
Contributor Author

smcv commented Oct 13, 2022

I'm going to continue testing other games rather than focusing on this one, but let me know if you'd like me to do a rebuild with debug symbols so we can get a useful stack trace.

@icculus
Copy link
Collaborator

icculus commented Oct 19, 2022

but let me know if you'd like me to do a rebuild with debug symbols so we can get a useful stack trace.

I did it (I'm probably going to need it locally anyhow, and "apt-get source pachi" makes this easy enough.)

Thread 1 "pachi" received signal SIGSEGV, Segmentation fault.
0x000055555555c04c in init_intro () at /home/icculus/pachi-1.0/src/intro.c:33
33	    SDL_FillRect(temp, NULL, SDL_MapRGB(temp->format,0,0,0));
(gdb) bt
#0  0x000055555555c04c in init_intro() () at /home/icculus/pachi-1.0/src/intro.c:33
#1  0x000055555555c13b in intro() () at /home/icculus/pachi-1.0/src/intro.c:51
#2  0x00005555555634b6 in main(int, char**) (argc=1, argv=0x7fffffffe008) at faes.cpp:66

@icculus
Copy link
Collaborator

icculus commented Oct 19, 2022

temp is NULL here, hence the crash in the game and not sdl12-compat.

Created on the line before:

temp=SDL_CreateRGBSurface(SDL_SWSURFACE, screen_w, screen_h, screen_bpp, 255, 255, 255, 0);

screen_w, screen_h and screen_bpp are 800, 600, and 16, respectively.

@icculus
Copy link
Collaborator

icculus commented Oct 19, 2022

I guess the bogus masks are what causes this. This is a different angle on the same thing rockdodger does: a bogus surface that they immediately convert with SDL_DisplaySurface.

@smcv
Copy link
Contributor Author

smcv commented Oct 24, 2022

Confirmed fixed by 67f8b3a, 1.2.58 + 29 commits

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

No branches or pull requests

2 participants