BUG: Apple Silicon (M1) bus error when connecting
Closed this issue · 8 comments
Please search for existing issues and check for potential duplicates before filing yours.
ezQuake version:
Built from master (ca25d05) on Apple M1
Describe the bug
It seems fine when starting a map locally but when I do connect to any server, it crashes with a simple message in the terminal:
❯ ./ezquake-darwin-arm
[1] 55952 bus error ./ezquake-darwin-arm
❯ ./ezquake-darwin-arm
[1] 55972 segmentation fault ./ezquake-darwin-arm
To Reproduce
Steps to reproduce the behavior:
- Build from master
- Run, use /connect
@fzwoch I have something like this:
Process 56242 launched: '/Users/aambrozkiewicz/Downloads/ezquake/ezquake-darwin-arm' (arm64)
2022-10-03 15:56:23.546844+0200 ezquake-darwin-arm[56242:4260740] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000226ba0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2022-10-03 15:56:23.579496+0200 ezquake-darwin-arm[56242:4261020] [aqme] MEMixerChannel.cpp:1629 client <AudioQueueObject@0x1088d4200; [0]; play> got error 2003332927 while sending format information
2022-10-03 15:56:23.665369+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bc6a: TCC deny IOHIDDeviceOpen
2022-10-03 15:56:23.665386+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bc6a: TCC deny IOHIDDeviceOpen
2022-10-03 15:56:23.665631+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bcd4: TCC deny IOHIDDeviceOpen
2022-10-03 15:56:23.665639+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bcd4: TCC deny IOHIDDeviceOpen
2022-10-03 15:56:23.666202+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bc7b: TCC deny IOHIDDeviceOpen
2022-10-03 15:56:23.666208+0200 ezquake-darwin-arm[56242:4261054] [default] 0x10002bc7b: TCC deny IOHIDDeviceOpen
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/cmodel.o' has changed (actual time is 2022-10-03 14:33:07.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/cmd.o' has changed (actual time is 2022-10-03 14:33:07.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/com_msg.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/common.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/crc.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:26.000000000) since this executable was linked, file will be ignored
Process 56242 stopped
* thread #11, name = 'AudioQueue thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x343203580)
frame #0: 0x0000000196b627cc libsystem_pthread.dylib`pthread_mutex_lock + 12
libsystem_pthread.dylib`pthread_mutex_lock:
-> 0x196b627cc <+12>: ldr x8, [x0]
0x196b627d0 <+16>: mov w9, #0x545a
0x196b627d4 <+20>: movk w9, #0x4d55, lsl #16
0x196b627d8 <+24>: cmp x8, x9
Target 0: (ezquake-darwin-arm) stopped.
Maybe there is something, that I'm doing wrong? @fzwoch which commit do use build that it work for you? You do use m1 as well?
Yeah maybe permissions?
But wth is this:
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/cmodel.o' has changed (actual time is 2022-10-03 14:33:07.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/cmd.o' has changed (actual time is 2022-10-03 14:33:07.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/com_msg.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/common.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:25.000000000) since this executable was linked, file will be ignored
error: ezquake-darwin-arm debug map object file '/Users/aambrozkiewicz/Downloads/ezquake-source/.ezquake/crc.o' has changed (actual time is 2022-10-03 14:33:08.000000000, debug map time is 2022-10-03 12:52:26.000000000) since this executable was linked, file will be ignored
?
Build broken?
When it crashes you are supposed to type bt
to get a call stack trace.
I have more of these:
Process 17595 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x107c98000)
frame #0: 0x0000000100051ef0 ezquake-darwin-arm`Mod_LoadAliasModel [inlined] Mod_LoadAliasGroup(pin=0x0000000111ff960c, frame=<unavailable>, posenum=<unavailable>) at r_aliasmodel.c:948:23 [opt]
945
946 ptemp = (void *)pin_intervals;
947 for (i = 0; i < numframes; i++) {
-> 948 poseverts[*posenum] = (trivertx_t *)((daliasframe_t *)ptemp + 1);
949 (*posenum)++;
950
951 ptemp = (trivertx_t *)((daliasframe_t *)ptemp + 1) + pheader->numverts;
Target 0: (ezquake-darwin-arm) stopped.
warning: ezquake-darwin-arm was compiled with optimization - stepping may behave oddly; variables may not be available.
and for bt
:
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x107c98000)
* frame #0: 0x0000000100051ef0 ezquake-darwin-arm`Mod_LoadAliasModel [inlined] Mod_LoadAliasGroup(pin=0x0000000111ff960c, frame=<unavailable>, posenum=<unavailable>) at r_aliasmodel.c:948:23 [opt]
frame #1: 0x0000000100051e10 ezquake-darwin-arm`Mod_LoadAliasModel(mod=0x0000000101aff150, buffer=<unavailable>, filesize=<unavailable>, loadname=<unavailable>) at r_aliasmodel.c:849:38 [opt]
frame #2: 0x0000000100065c98 ezquake-darwin-arm`Mod_LoadModel(mod=0x0000000101aff150, crash=false) at r_model.c:289:3 [opt]
frame #3: 0x00000001000662a4 ezquake-darwin-arm`Mod_ForName(name=<unavailable>, crash=<unavailable>) at r_model.c:313:9 [opt] [artificial]
frame #4: 0x00000001000c7000 ezquake-darwin-arm`VWepModel_NextDownload at cl_parse.c:692:30 [opt]
frame #5: 0x00000001000c73d4 ezquake-darwin-arm`Model_NextDownload at cl_parse.c:763:2 [opt]
frame #6: 0x00000001000c7548 ezquake-darwin-arm`Sound_NextDownload at cl_parse.c:796:2 [opt] [artificial]
frame #7: 0x00000001000c909c ezquake-darwin-arm`CL_ParseModellist(extended=<unavailable>) at cl_parse.c:1820:2 [opt]
frame #8: 0x00000001000cd480 ezquake-darwin-arm`CL_ParseServerMessage at cl_parse.c:3981:6 [opt]
frame #9: 0x00000001000c56b4 ezquake-darwin-arm`CL_ReadPackets at cl_main.c:1635:3 [opt]
frame #10: 0x00000001000c4e80 ezquake-darwin-arm`CL_Frame(time=<unavailable>) at cl_main.c:2534:5 [opt]
frame #11: 0x0000000100022df8 ezquake-darwin-arm`Host_Frame(time=0.00001000010000100001) at host.c:479:2 [opt]
frame #12: 0x00000001001aaf68 ezquake-darwin-arm`main(argc=<unavailable>, argv=<unavailable>) at sys_posix.c:347:3 [opt]
frame #13: 0x0000000107d9108c dyld`start + 520
That looks like a corrupted model.. I guess?
It really is. I deleted all files except for pak0 and it worked! Thanks!