neuromancer / avp

Aliens vs Predator Linux enhanced with cutscene support and new screen resolutions
Other
42 stars 6 forks source link

segfaults on start - probably umlauts related #8

Open frostworx opened 3 years ago

frostworx commented 3 years ago

the game segfaults with german language with

Thread 1 "avp" received signal SIGSEGV, Segmentation fault.
0x0000555555818e88 in RenderSmallFontString_Wrapped (
    textPtr=0x5555564d6362 "cken Sie ENTER, um ein Profil auszuw\344hlen, oder BACKSPACE, um ein Profil zu l\366schen.", area=0x7fffffffe3d0, alpha=65536, 
    output_x=0x0, output_y=0x0) at /tmp/3/avp/src/menus.c:827
827                         if (srcPtr[0] || srcPtr[1] || srcPtr[2]) {
(gdb) where
#0  0x0000555555818e88 in RenderSmallFontString_Wrapped (
    textPtr=0x5555564d6362 "cken Sie ENTER, um ein Profil auszuw\344hlen, oder BACKSPACE, um ein Profil zu l\366schen.", area=0x7fffffffe3d0, alpha=65536, 
    output_x=0x0, output_y=0x0) at /tmp/3/avp/src/menus.c:827
#1  0x00005555557914ee in RenderHelpString () at /tmp/3/avp/src/avp/win95/frontend/avp_menus.c:2099
#2  0x000055555578f072 in AvP_UpdateMenus () at /tmp/3/avp/src/avp/win95/frontend/avp_menus.c:825
#3  0x000055555578eb06 in AvP_MainMenus () at /tmp/3/avp/src/avp/win95/frontend/avp_menus.c:481
#4  0x000055555581e89a in main (argc=1, argv=0x7fffffffe588) at /tmp/3/avp/src/main.c:1259

commenting out /avp/src/avp/win95/frontend/avp_menus.c:2099 workarounds the problem and the game starts fine (doesn't seem to be missing anthing important, but some words are missing umlauts as well)

d10sfan commented 3 years ago

How do you switch the language in the game? Does it automatically detect it based on your locale, or does it do it differently?

frostworx commented 3 years ago

I tried as well switching it to english, but there doesn't seem to be a valid way.

d10sfan commented 3 years ago

Ok, so it sounds like it defaults to German based on your locale? I was wondering if there was an easy way to switch for testing purposes.

One possibility would be to check in that function that the language is not english, and if not, don't call the function that you commented out. If you'd like and feel comfortable, you could create a change and I could test as well on english.

frostworx commented 3 years ago

Just found out that you can change the language directly in steam (righclick->language). when setting it to english there the files "CREDITS.txt" and "language.txt" are updated and the game works as it should (tried with a freshly downloaded luxtorpeda). Changing back to german crashes reproducable. I don't think anybody plays that game in german ( including me - I just only tested luxtorpeda :)) as the bug would have been detected already before :)