Open thesammiller opened 4 years ago
Are you using the original pak0.pak & pak1.pak files from Quake? I’m trying to establish whether I can reproduce the issue in my own machine, to see what could be going on.
El 13 jul. 2020, a las 17:10, Sam Miller notifications@github.com escribió:
The game is crashing whenever I try to start a single player game. I am able to build and start running the app. App plays the demo game and outputs the game data. The game can't find any configs, but not sure that's the real issue.
It seems like there's a bad strcmp in PR_ExecuteProgram that's causing a memory error. I don't really understand the game logic in this section so sorry I can't be more specific. Am I missing something in my install?
./Quake_OSX -basedir "/Applications/Quake" Host_Init Added packfile /Applications/Quake/id1/pak0.pak (339 files) Added packfile /Applications/Quake/id1/pak1.pak (85 files) PackFile: /Applications/Quake/id1/pak0.pak : gfx.wad Console initialized. UDP Initialized Exe: 16:02:46 Jul 13 2020 16.0 megabyte heap PackFile: /Applications/Quake/id1/pak0.pak : gfx/palette.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/colormap.lmp 600k surface cache
Sound Initialization Sound sampling rate: 22050 PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/water1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/wind2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/hit.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/hknight/hit.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/tink1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/ric1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/ric2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/ric3.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/r_exp3.wav ========Quake Initialized========= PackFile: /Applications/Quake/id1/pak0.pak : quake.rc execing quake.rc PackFile: /Applications/Quake/id1/pak0.pak : gfx/conback.lmp PackFile: /Applications/Quake/id1/pak0.pak : default.cfg execing default.cfg FindFile: can't find config.cfg couldn't exec config.cfg FindFile: can't find autoexec.cfg couldn't exec autoexec.cfg 3 demo(s) in loop Playing demo from demo1.dem. PackFile: /Applications/Quake/id1/pak0.pak : demo1.dem
the Necropolis PackFile: /Applications/Quake/id1/pak0.pak : maps/e1m3.bsp PackFile: /Applications/Quake/id1/pak0.pak : progs/player.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/eyes.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/h_player.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/gib1.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/gib2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/gib3.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/s_bubble.spr PackFile: /Applications/Quake/id1/pak0.pak : progs/s_explod.spr PackFile: /Applications/Quake/id1/pak0.pak : progs/v_axe.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_shot.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_nail.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_rock.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_shot2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_nail2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_rock2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/bolt.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/bolt2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/bolt3.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/lavaball.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/missile.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/grenade.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/spike.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/s_spike.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/backpack.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/zom_gib.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/v_light.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/flame2.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/flame.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/zombie.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/h_zombie.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/w_g_key.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/ogre.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/h_ogre.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/wizard.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/h_wizard.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/w_spike.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/demon.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/h_demon.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/g_nail.mdl PackFile: /Applications/Quake/id1/pak0.pak : maps/b_shell1.bsp PackFile: /Applications/Quake/id1/pak0.pak : maps/b_bh25.bsp PackFile: /Applications/Quake/id1/pak0.pak : maps/b_bh10.bsp PackFile: /Applications/Quake/id1/pak0.pak : progs/g_shot.mdl PackFile: /Applications/Quake/id1/pak0.pak : maps/b_shell0.bsp PackFile: /Applications/Quake/id1/pak0.pak : maps/b_rock0.bsp PackFile: /Applications/Quake/id1/pak0.pak : maps/b_nail1.bsp PackFile: /Applications/Quake/id1/pak0.pak : progs/armor.mdl PackFile: /Applications/Quake/id1/pak0.pak : maps/b_nail0.bsp PackFile: /Applications/Quake/id1/pak0.pak : maps/b_rock1.bsp PackFile: /Applications/Quake/id1/pak0.pak : progs/g_rock.mdl PackFile: /Applications/Quake/id1/pak0.pak : progs/invisibl.mdl PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/rocket1i.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/sgun1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/guncock.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/spike2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/grenade.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/bounce.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/shotgn2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/dland2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/h2ohit1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/itembk2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/plyrjmp8.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/land.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/land2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/drown1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/drown2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/gasp1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/gasp2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/h2odeath.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/talk.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/teledth1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/r_tele1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/r_tele2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/r_tele3.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/r_tele4.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/r_tele5.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/lock4.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/pkup.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/armor1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/lhit.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/gib.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/udeath.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/tornoff2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain3.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain4.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain5.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/pain6.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/death1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/death2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/death3.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/death4.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/death5.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/weapons/ax1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/axhit1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/axhit2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/h2ojump.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/slimbrn2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/inh2o.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/inlava.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/outwater.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/lburn1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/player/lburn2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/water1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/water2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/medtry.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/meduse.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/stndr1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/stndr2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/null.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/plats/train2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/plats/train1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/buttons/switch02.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/drclos4.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/doormv1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/fire1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/basesec1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/basesec2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/latch2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/doors/winch2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_idle.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_idle1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_shot1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_gib.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_pain.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_pain1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_fall.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_miss.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/z_hit.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/zombie/idle_w2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/plats/medplat1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/plats/medplat2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/buttons/airbut1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/medkey.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/hum1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogdrag.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogdth.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogidle.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogidle2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogpain1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogsawatk.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ogre/ogwake.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/wattack.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/wdeath.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/widle1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/widle2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/wpain.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/wizard/wsight.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/ddeath.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/dhit2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/djump.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/dpain1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/idle1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/demon/sight2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/health1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/r_item1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/secret.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/inv1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/inv2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/items/inv3.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/drip1.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/swamp2.wav PackFile: /Applications/Quake/id1/pak0.pak : sound/ambience/swamp1.wav 600k surface cache You got the shells PackFile: /Applications/Quake/id1/pak0.pak : gfx/qplaque.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/ttl_main.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/mainmenu.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot4.lmp PackFile: /Applications/Quake/id1/pak0.pak : sound/misc/menu2.wav PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot5.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot6.lmp You got the Grenade Launcher PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot1.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot2.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/menudot3.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/ttl_sgl.lmp PackFile: /Applications/Quake/id1/pak0.pak : gfx/sp_menu.lmp PackFile: /Applications/Quake/id1/pak0.pak : progs.dat PackFile: /Applications/Quake/id1/pak0.pak : maps/start.bsp Segmentation fault: 11
Stack trace:
0 libsystem_platform.dylib 0x00007fff6dfdf813 _platform_strcmp + 19 1 Quake-OSX 0x000000010ed9a4be PR_ExecuteProgram + 1886 (pr_exec.c:504) 2 Quake-OSX 0x000000010edc40dd ED_LoadFromFile + 621 (pr_edict.c:916) 3 Quake-OSX 0x000000010ed8789a SV_SpawnServer + 1354 (sv_main.c:1178) 4 Quake-OSX 0x000000010ed9db96 Host_Map_f + 326 (host_cmd.c:285) 5 Quake-OSX 0x000000010ed9af3e Cmd_ExecuteString + 110 (cmd.c:632) 6 Quake-OSX 0x000000010ed9ae7c Cbuf_Execute + 412 (cmd.c:186) 7 Quake-OSX 0x000000010eddc01c _Host_FrameBeforeRender + 60 (host.c:654) 8 Quake-OSX 0x000000010eddc171 _Host_Frame + 49 (host.c:743) 9 Quake-OSX 0x000000010eddc2d1 Host_Frame + 49 (host.c:776) 10 Quake-OSX 0x000000010edda961 Sys_Frame + 17 (sys_osx.c:232) 11 Quake-OSX 0x000000010ede8cae ViewController.draw(in:) + 686 (ViewController.swift:172) 12 Quake-OSX 0x000000010edee884 @objc https://github.com/objc ViewController.draw(in:) + 68 13 com.apple.MetalKit 0x00007fff393ae849 -[MTKView draw] + 274 14 com.apple.MetalKit 0x00007fff393ae728 23-[MTKView initCommon]_block_invoke + 42 15 libdispatch.dylib 0x00007fff6dd90658 _dispatch_client_callout + 8 16 libdispatch.dylib 0x00007fff6dd92818 _dispatch_continuation_pop + 414 17 libdispatch.dylib 0x00007fff6dda24be _dispatch_source_invoke + 2084 18 libdispatch.dylib 0x00007fff6dd9bb6d _dispatch_main_queue_callback_4CF + 618 19 com.apple.CoreFoundation 0x00007fff33e2df11 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 20 com.apple.CoreFoundation 0x00007fff33dedd17 __CFRunLoopRun + 2028 21 com.apple.CoreFoundation 0x00007fff33decece CFRunLoopRunSpecific + 462 22 com.apple.HIToolbox 0x00007fff32a1babd RunCurrentEventLoopInMode + 292 23 com.apple.HIToolbox 0x00007fff32a1b7d5 ReceiveNextEventCommon + 584 24 com.apple.HIToolbox 0x00007fff32a1b579 _BlockUntilNextEventMatchingListInModeWithFilter + 64 25 com.apple.AppKit 0x00007fff31063829 _DPSNextEvent + 883 26 com.apple.AppKit 0x00007fff31062070 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 27 com.apple.AppKit 0x00007fff31053d7e -[NSApplication run] + 658 28 com.apple.AppKit 0x00007fff31025b86 NSApplicationMain + 777 29 Quake-OSX 0x000000010eddcd8d main + 13 (AppDelegate.swift:12) 30 libdyld.dylib 0x00007fff6dde9cc9 start + 1
There are two strcmps in PRExecuteProgram: Line 504
case OP_EQ_S: c->_float = !strcmp(pr_strings+a->string,pr_strings+b->string); break;
Line 523
case OP_NE_S: c->_float = strcmp(pr_strings+a->string,pr_strings+b->string); break;
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Izhido/Quake_For_OSX/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCNYHC27E63HYQXT6DOLDLR3OH5ZANCNFSM4OY6P5HA.
Yes, they are the original pak files. Thank you!
ETA: Running MacOS Catalina 10.15.5 on a 2015 MBP
I’ve been trying very hard to reproduce the issue with the original pakfiles, in a clean slate. So far, no luck.
This is not the first time, however, that I had to deal with strcmp / memcmp issues - apparently, not all memory in MacOS is created equal :D .
In the meantime, there is something I’d like you to try. I created another MacOS port of the engine, at https://bitbucket.org/Izhido/slipnfrag . You could say Slip & Frag is an advanced version of Quake_For_OSX, that manages memory very differently from it - and thus, is more stable and allows running many modern Quake maps & mods. Would you please try this engine, to see if the crash still persists?
An important thing, though: the new app no longer receives command-line arguments from Terminal - you specify them using a Settings screen, directly in the app. Other than that, it should perform the same (actually, better) than this app.
El 13 jul. 2020, a la(s) 17:17, Sam Miller notifications@github.com escribió:
Yes, they are the original pak files. Thank you!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Ha, always fun with memory. Slip N Frag works great. Thanks so much! Look forward to checking out your code. Really appreciate your quick response.
The game is crashing whenever I try to start a single player game in the MacOS build. I am able to compile and start running the app. App plays the demo game and outputs the game data. The game can't find any configs, but not sure that's the real issue.
It seems like there's a bad strcmp in PR_ExecuteProgram that's causing a memory error. I don't really understand the game logic in this section so sorry I can't be more specific. Am I missing something in my install?
Stack trace:
There are two strcmps in PR_ExecuteProgram: Line 504
Line 523