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

issues affecting Loki port of Sim City 3000 #339

Open
twolife opened this issue Jun 30, 2024 · 2 comments
Open

issues affecting Loki port of Sim City 3000 #339

twolife opened this issue Jun 30, 2024 · 2 comments
Assignees

Comments

@twolife
Copy link
Contributor

twolife commented Jun 30, 2024

I know that this is borderline "out-of-scope", as that game is an ancient SDL 1.1 game unplayable with a modern glibc without using some nasty hack like https://github.com/twolife/sc3u-nptl, but here it is, I'm running this game on a modern stack (including sdl12-compat) and it almost works perfectly :-)

The first issue is that the intro movie is flickering. I'm surprised as I saw issue #49 that was resolved, but the intro movie in SC3U is still affected.

Second issue is that the game segfault on exit
BUG! (Segmentation Fault)  Going down hard...
SimCity 3000 Unlimited 2.0.955a
Built with glibc-2.1 on x86
Stack dump:
{
  0x83fc566
  0xf66693b7
  0xf6669e01
  0xf664dba4
  0xf66b5a49
  0xf7f38e41
  0xf7936086
}
Please send a full bug report,
along with the contents of autosave to: [email protected]
Unable to execute loki_qagent - exiting

Those are very minor issues, but this is not happening with a real SDL-1.2, so i suppose it's a bug #sorry

Anyway, this is at least documented now.

@icculus
Copy link
Collaborator

icculus commented Jun 30, 2024

#sorry

We definitely fixed other issues in other Loki binaries, so this is 100% in scope, fwiw.

@icculus icculus self-assigned this Jun 30, 2024
@terinjokes
Copy link

terinjokes commented Jan 29, 2025

Thread 1 "sc3u.dynamic" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xf7df0cb3 in SDL_DestroyMutex (a=0x865d4d0) at /var/tmp/portage/media-libs/libsdl-1.2.68/work/sdl12-compat-release-1.2.68/src/SDL20_syms.h:179
#2  0x083fc566 in _._18cRZCriticalSection ()
#3  0xf6c223b7 in ?? () from /home/terin/SC3U/lib/libAudio.so
#4  0xf6c22e01 in ?? () from /home/terin/SC3U/lib/libAudio.so
#5  0xf6c06ba4 in ?? () from /home/terin/SC3U/lib/libAudio.so
#6  0xf6c6ea49 in _fini () from /home/terin/SC3U/lib/libAudio.so
#7  0xf7fcc2e9 in _dl_fini () at dl-fini.c:114
#8  0xf799ff4a in ?? () from /usr/lib/libc.so.6
#9  0xf79a0143 in exit () from /usr/lib/libc.so.6
#10 0xf798604f in ?? () from /usr/lib/libc.so.6
#11 0xf7986108 in __libc_start_main () from /usr/lib/libc.so.6
#12 0x08135901 in _start ()

I see the _fini for libsdl and libsdl2 have already been called at this point, so if I'm reading this correctly, the code is trying to destroy a mutex after SDL2 has been unloaded?


Edit (2025-01-30): I've loaded up SC3U in Mandrake 8.0 (March 2001, Linux 2.4.3) and I don't see an _dl_fini for libsdl1, so the SDL_DestroyMutex that the game's libAudio.so calls works fine.

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

3 participants