ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.64k stars 615 forks source link

[TFC] engine/sv_main.c crash #1861

Open APGRoboCop opened 6 years ago

APGRoboCop commented 6 years ago

I've been doing some tests with using Linux GDB for TFC, and this is the backtrace I've received:-

Program received signal SIGSEGV, Segmentation fault. 0xf77ec368 in SV_LoadEntities () at ../engine/sv_main.c:7603 7603 ../engine/sv_main.c: No such file or directory. (gdb) bt

0 0xf77ec368 in SV_LoadEntities () at ../engine/sv_main.c:7603

1 0xf77bb953 in Host_Changelevel_f () at ../engine/host_cmd.c:1577

2 Host_Changelevel_f () at ../engine/host_cmd.c:1522

3 0xf77a32bd in Cmd_ExecuteString (text=0xffffc880 "changelevel cz2",

src=<optimized out>) at ../engine/cmd.c:1150

4 Cbuf_Execute () at ../engine/cmd.c:242

5 0xf77b9ea0 in _Host_Frame (time=0.103335217) at ../engine/host.c:1384

6 0xf77ba282 in Host_Frame (time=0.103335217, iState=1, stateInfo=0xffffcd6c)

at ../engine/host.c:1522

7 0xf77de93c in CEngine::Frame (this=0xf78756a0 )

at ../engine/sys_engine.cpp:245

8 0xf77dbca3 in RunFrame (this=)

at ../engine/sys_dll2.cpp:1235

9 CDedicatedServerAPI::RunFrame (

this=0xf7870d00 <__g_CDedicatedServerAPI_singleton>)
at ../engine/sys_dll2.cpp:1226

10 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766

11 0x08049472 in main (argc=23, argv=0xffffcfa4)

at ../dedicated/sys_ded.cpp:1146

(gdb)

I don't think this is a Metamod error or that, but I am using the older tfc_i386.so server binary because the latest version got the double shot and spy disguise glitches. Here is a list of Metamod Addons and the TFC version I'm using:-

22:00:25 Protocol version 48 Exe version 1.1.2.2/Stdio (tfc) Exe build: 17:35:12 Jul 5 2017 (7559)

[ 1] Adminmod, v2.50.60 (MM), Aug 22 2004, by Alfred Reynolds alfred@valvesoftware.com, see http://www.adminmod.org/ [ 2] LogDaemon, v1.0.0.6, 2004/01/11, by Will Day willday@metamod.org, Tim Thelin, Kndroc@hotmail.com, Pieter de Zwart, [ 3] AMX Mod X, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org [ 4] Anti spawn spam zones, v1.0, August, 18 2015, by [HCG] Mr.Coala#, see www.skillzworld.eu [ 5] FoxBot, v0.791-beta3, 11/02/2018, by Tom Simpson & RoboCop robocop@lycos.co.uk, see http://www.apg-clan.org/ [ 6] sparky utils v2, v2.02.1, 2004/04/08, by Steve Rabouin ruiner@konspiracy.org, see http://sparky.konspiracy.org/ [ 7] WEAPTFC_MM, v2.1, Mar 17 2004, by CyberMind - Kevin Masterson, see http://logd.sf.net/weaptfc/ [ 8] TfcX, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org [ 9] Engine, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org [ 10] FakeMeta, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org [ 11] Fun, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org [ 12] Ham Sandwich, v1.8.2, Feb 14 2013, by AMX Mod X Dev Team, see http://www.amxmodx.org

SamVanheer commented 6 years ago

If it's crashing in SV_LoadEntities then the world model (BSP data) is null.

Do you have a console log from this session? Does it say something like this:

Couldn't spawn server cz2

If you can reproduce it, try running with developer 2 to get any additional debug messages. It might show what's going wrong.

APGRoboCop commented 6 years ago

Yes the console had that cz2 error.

SamVanheer commented 6 years ago

Then it should say Error: could not load file maps/cz2.bsp with developer 1, and shut down with a fatal error if developer is >= 2.

Alternatively, it's running out of memory, in which case it should say Hunk_HighAlloc: failed on N bytes where N is the size of the file + 1.

APGRoboCop commented 6 years ago

Looks like the same error occurs for the latest TFC summer 2018 update as well:-

Thread 1 "hlds_linux" received signal SIGSEGV, Segmentation fault. 0xf7738498 in SV_LoadEntities () at ../engine/sv_main.c:7605 7605 ../engine/sv_main.c: No such file or directory. (gdb) bt

0 0xf7738498 in SV_LoadEntities () at ../engine/sv_main.c:7605

1 0xf77079f3 in Host_Changelevel_f () at ../engine/host_cmd.c:1577

2 Host_Changelevel_f () at ../engine/host_cmd.c:1522

3 0xf76ef35d in Cmd_ExecuteString (text=0xffffd1c0 "changelevel well",

src=<optimized out>) at ../engine/cmd.c:1150

4 Cbuf_Execute () at ../engine/cmd.c:242

5 0xf7705f40 in _Host_Frame (time=0.00953132659) at ../engine/host.c:1384

6 0xf7706322 in Host_Frame (time=0.00953132659, iState=1,

stateInfo=0xffffd6ac) at ../engine/host.c:1522

7 0xf772a9dc in CEngine::Frame (this=0xf77c16a0 )

at ../engine/sys_engine.cpp:245

8 0xf7727d43 in CDedicatedServerAPI::RunFrame (this=)

at ../engine/sys_dll2.cpp:1235

9 CDedicatedServerAPI::RunFrame (

this=0xf77bcd00 <__g_CDedicatedServerAPI_singleton>)
at ../engine/sys_dll2.cpp:1226

10 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766

11 0x08049472 in main (argc=20, argv=0xffffd8e4)

at ../dedicated/sys_ded.cpp:1146

(gdb)

SamVanheer commented 5 years ago

Does this still happen?

APGRoboCop commented 5 years ago

Not that I'm aware of no...