Hello,
When using the latest version of the code from "trunk", revision 2147 as of the time I'm writing this, I get a segmentation fault when playing Q3DM12 single player and pressing the "restart" button once the match finishes.
This happens on Slackware Linux -current as of today, x86_64 version. I can provide more information on request. I'll try to attach a core file I have, but it's 32 MB compressed. The backtrace looks like this:
(gdb) thread 2
[Switching to thread 2 (Thread 16373)]#0 0x0000000000477f3f in VM_CallInterpreted (vm=0x2090b80, args=0x7fffffffca20)
at code/qcommon/vm_interpreted.c:354
354 *(int *)&image[ programStack + 44] = args[9];
(gdb) where
#0 0x0000000000477f3f in VM_CallInterpreted (vm=0x2090b80, args=0x7fffffffca20) at code/qcommon/vm_interpreted.c:354
#1 0x00000000004775e8 in VM_Call (vm=0x2090b80, callnum=1) at code/qcommon/vm.c:826
#2 0x0000000000466ad4 in SV_ShutdownGameProgs () at code/server/sv_game.c:857
#3 0x00000000004682d9 in SV_Shutdown (finalmsg=0xd2cc40 "Server crashed: VM_Restart failed") at code/server/sv_init.c:756
#4 0x0000000000436899 in Com_Error (code=1, fmt=0x50a11d "VM_Restart failed") at code/qcommon/common.c:310
#5 0x0000000000476c88 in VM_Restart (vm=0x2090b80) at code/qcommon/vm.c:519
#6 0x0000000000466bb9 in SV_RestartGameProgs () at code/server/sv_game.c:904
#7 0x000000000045c90f in SV_MapRestart_f () at code/server/sv_ccmds.c:300
#8 0x0000000000435ff6 in Cmd_ExecuteString (text=0x7fffffffcdd0 "map_restart 0") at code/qcommon/cmd.c:779
#9 0x000000000043566d in Cbuf_Execute () at code/qcommon/cmd.c:248
#10 0x000000000043ad55 in Com_Frame () at code/qcommon/common.c:3171
#11 0x00000000004c7342 in main (argc=1, argv=0x7fffffffd7b8) at code/sys/sys_main.c:639
I think I have found the cause of the problem. When building from trunk, the building process creates a file baseq3/vm/qagame.qvm, like this:
Q3ASM build/release-linux-x86_64/baseq3/vm/cgame.qvm
Q3ASM build/release-linux-x86_64/baseq3/vm/qagame.qvm
Q3ASM build/release-linux-x86_64/baseq3/vm/ui.qvm
When I launch the game normally with everything in place, I cannot restart at least those matches because I get an error about that qagame.qvm file in the terminal, which triggers some error handling code and ends up in a segmentation fault for some reason.
==== ShutdownGame ====
VM_Restart()
Loading vm file vm/qagame.qvm...
Failed.
^3Warning: Couldn't open VM file vm/qagame.qvm
********************
ERROR: VM_Restart failed
********************
----- Server Shutdown (Server crashed: VM_Restart failed) -----
----- Client Shutdown (Received signal 11) -----
----- FS_Startup -----
Current search path:
/home/rg3/.q3a/baseq3
./baseq3
./baseq3/pak8.pk3 (9 files)
./baseq3/pak7.pk3 (4 files)
./baseq3/pak6.pk3 (64 files)
./baseq3/pak5.pk3 (7 files)
./baseq3/pak4.pk3 (272 files)
./baseq3/pak3.pk3 (4 files)
./baseq3/pak2.pk3 (148 files)
./baseq3/pak1.pk3 (26 files)
./baseq3/pak0.pk3 (3539 files)
handle 1: music/win.wav
----------------------
4073 files in pk3 files
RE_Shutdown( 1 )
Closing SDL audio device...
SDL audio device shut down.
-----------------------
----- Server Shutdown (Received signal 11) -----
Segmentation fault
However, if I put those "vm" files out of sight, the game works and does not crash, and it seems to take them from the official pak files.
==== ShutdownGame ====
VM_Restart()
Loading vm file vm/qagame.qvm...
File "vm/qagame.qvm" found in "./baseq3/pak8.pk3"
------- Game Initialization -------
gamename: baseq3
gamedate: Sep 30 2002
I'm attaching the generated .qvm files in case they are wrong.
Hello, When using the latest version of the code from "trunk", revision 2147 as of the time I'm writing this, I get a segmentation fault when playing Q3DM12 single player and pressing the "restart" button once the match finishes. This happens on Slackware Linux -current as of today, x86_64 version. I can provide more information on request. I'll try to attach a core file I have, but it's 32 MB compressed. The backtrace looks like this: (gdb) thread 2 [Switching to thread 2 (Thread 16373)]#0 0x0000000000477f3f in VM_CallInterpreted (vm=0x2090b80, args=0x7fffffffca20) at code/qcommon/vm_interpreted.c:354 354 *(int *)&image[ programStack + 44] = args[9]; (gdb) where #0 0x0000000000477f3f in VM_CallInterpreted (vm=0x2090b80, args=0x7fffffffca20) at code/qcommon/vm_interpreted.c:354 #1 0x00000000004775e8 in VM_Call (vm=0x2090b80, callnum=1) at code/qcommon/vm.c:826 #2 0x0000000000466ad4 in SV_ShutdownGameProgs () at code/server/sv_game.c:857 #3 0x00000000004682d9 in SV_Shutdown (finalmsg=0xd2cc40 "Server crashed: VM_Restart failed") at code/server/sv_init.c:756 #4 0x0000000000436899 in Com_Error (code=1, fmt=0x50a11d "VM_Restart failed") at code/qcommon/common.c:310 #5 0x0000000000476c88 in VM_Restart (vm=0x2090b80) at code/qcommon/vm.c:519 #6 0x0000000000466bb9 in SV_RestartGameProgs () at code/server/sv_game.c:904 #7 0x000000000045c90f in SV_MapRestart_f () at code/server/sv_ccmds.c:300 #8 0x0000000000435ff6 in Cmd_ExecuteString (text=0x7fffffffcdd0 "map_restart 0") at code/qcommon/cmd.c:779 #9 0x000000000043566d in Cbuf_Execute () at code/qcommon/cmd.c:248 #10 0x000000000043ad55 in Com_Frame () at code/qcommon/common.c:3171 #11 0x00000000004c7342 in main (argc=1, argv=0x7fffffffd7b8) at code/sys/sys_main.c:639Created attachment 2946 [details] qagame.qvmCreated attachment 2947 [details] cgame.qvmCreated attachment 2948 [details] ui.qvm