ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
664 stars 59 forks source link

[BUG] [Duke 3D] "Address not mapped to object" when trying to run the game on 1.9.1 #1056

Closed daemonspudguy closed 5 months ago

daemonspudguy commented 6 months ago

Raze version

Raze 1.9.1

Which game are you running with Raze?

Duke Nukem 3D

What Operating System are you using?

Linux x86_64

Please describe your specific OS version

Arch Linux

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

I get the error message "Address not mapped to object" when trying to run Duke 3D.

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Open the game
  2. It crashes. gdb.txt raze-crash.log

Your configuration

No response

Provide a Log

No response

mrmatteastwood commented 6 months ago

Experiencing the same issue, but not with Duke 3D. Instead, it happens when attempting to run Blood (One Unit Whole Blood) and Cryptic Passage.

Also tried Duke3D, Shadow Warrior + Wanton Destruction and Redneck + the 2 expansions. They all work. Linux Mint 21.1 Cinnamon.

image

Crash Log raze-crash.log

My system info https://termbin.com/u29j

daemonspudguy commented 6 months ago

God, what the hell did Graf and team do between 1.8.1 and 1.9? I'm almost impressed with how utterly broken 1.9 has been.

madame-rachelle commented 6 months ago

Graf was mostly solo these past few versions with very little help, can't expect much considering he had a lot of other IRL stuff going on too. That being said, 1.8 might have been a little rushed following the filesystem rewrites, unfortunately, I have complained about the new code with regards to how it affected GZDoom in another Discord server.

coelckers commented 6 months ago

All I can say is "doesn't crash for me". The crashes on display here are precisely the one thing that I fixed between 1.9.0 and 1.9.1 so I have no idea why they are still there on Linux but not on Windows.

daemonspudguy commented 6 months ago

1.8 did work, so whatever filesystem changes might have happened in 1.9 are likely the cause of Raze being completely useless on Linux.

mrmatteastwood commented 6 months ago

Anything else I can provide to help get to the bottom of this bug?

mrmatteastwood commented 6 months ago

I read through bug #1054 and it gave me the idea to check the terminal output:

thebrightside@POISONPUPPY:~/Appdata/Games/Raze$ ./raze
Raze 1.9.1 - 2024-01-01 07:47:40 +0100 - SDL version
Compiled on Jan  1 2024

Log started: 2024-01-05 12:23:04
OS: Linux Mint 21.1, Linux 6.1.0-1027-oem on x86_64
Can't find file 'BLOOD.GRP' in '/home/thebrightside/Appdata/Games/Raze/raze-cfg/blood'
adding /home/thebrightside/Appdata/Games/Raze/raze.pk3, 3756 lumps
adding /home/thebrightside/Appdata/Games/Raze/raze-cfg/blood/BLOOD.RFF, 678 lumps
adding /home/thebrightside/Appdata/Games/Raze/raze-cfg/blood/SOUNDS.RFF, 1747 lumps
adding /home/thebrightside/Appdata/Games/Raze/raze-cfg/blood/GUI.RFF, 7 lumps
adding /home/thebrightside/Appdata/Games/Raze/raze-cfg/blood/, 105 lumps

*** Fatal Error ***
Address not mapped to object (signal 11)
Address: 0x8

Generating raze-crash.log and killing process 49490, please wait... Killed

One thing I noticed is that it's looking for a BLOOD.GRP but from what I can tell, that file never existed. My memory from 1997 might be failing me, but I searched my whole PC and all my backups for a BLOOD.GRP and then I looked online. No BLOOD.GRP in sight anywhere!

mjr4077au commented 6 months ago

Confirmed against GCC and Clang builds under Linux. I receive the following log spew before a segfault:

Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_bk.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_dn.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_fr.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_lf.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_rt.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/amsterdam/amsterdam_up.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/bigorbit1/bigorbit1_bk.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/bigorbit1/bigorbit1_dn.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/bigorbit1/bigorbit1_fr.tga
Invalid data encountered for texture /home/mrichters/.config/raze/Duke Nukem 3D Twentieth Anniversary World Tour/:textures/skybox/bigorbit1/bigorbit1_lf.tga

The fault and backtrace are:

Thread 1 "raze" received signal SIGSEGV, Segmentation fault.
FileSys::FileReader::Read (this=this@entry=0x7fffffffceb0, len=160196) at /home/mrichters/Repos/Raze/source/common/filesystem/source/files.cpp:410
410         Size length = mReader->Read(buffer.allocate(len), len);
(gdb) bt
#0  FileSys::FileReader::Read (this=this@entry=0x7fffffffceb0, len=160196) at /home/mrichters/Repos/Raze/source/common/filesystem/source/files.cpp:410
#1  0x0000555555be48f8 in FileSys::FResourceFile::Read (this=0x555556fe83e0, entry=70) at /home/mrichters/Repos/Raze/source/common/filesystem/source/resourcefile.cpp:727
#2  0x0000555555bdab3f in FileSys::FileSystem::ReadFile (this=this@entry=0x5555560c6e40 <fileSystem>, lump=<optimized out>) at /home/mrichters/Repos/Raze/source/common/filesystem/source/filesystem.cpp:1295
#3  0x00005555558a1f7c in GetStringFromLump (lump=<optimized out>, zerotruncate=zerotruncate@entry=true) at /home/mrichters/Repos/Raze/source/common/utility/cmdlib.cpp:1047
#4  0x00005555559fbbe0 in Duke3d::ConCompiler::compilecon (this=this@entry=0x7fffffffcf90, filenam=0x555555e14f1b "game.con") at /home/mrichters/Repos/Raze/source/games/duke/src/gamedef.cpp:3108
#5  0x00005555559fbf02 in Duke3d::loadcons () at /home/mrichters/Repos/Raze/source/games/duke/src/gamedef.cpp:3227
#6  0x00005555559fc621 in Duke3d::GameInterface::app_init (this=<optimized out>) at /home/mrichters/Repos/Raze/source/games/duke/src/game.cpp:436
#7  0x0000555555785fbd in RunGame () at /home/mrichters/Repos/Raze/source/core/gamecontrol.cpp:1161
#8  0x0000555555786b58 in GameMain () at /home/mrichters/Repos/Raze/source/core/gamecontrol.cpp:621
#9  0x0000555555668c54 in main (argc=<optimized out>, argv=0x7fffffffe7b8) at /home/mrichters/Repos/Raze/source/common/platform/posix/sdl/i_main.cpp:199
coelckers commented 5 months ago

Yes, sounds related.