macOS Catalina rebuild: SEGFAULT in armagetronad_main`ConnectToServerCore(nServerInfoBase*) + 152

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
georgemorgan
Posts: 1
Joined: Sun Jul 19, 2020 8:05 pm

macOS Catalina rebuild: SEGFAULT in armagetronad_main`ConnectToServerCore(nServerInfoBase*) + 152

Post by georgemorgan »

Code: Select all

(lldb) target create "./src/armagetronad_main"
run
Current executable set to '/Users/george/repos/armagetronad/src/armagetronad_main' (x86_64).
(lldb) run
Process 817 launched: '/Users/george/repos/armagetronad/src/armagetronad_main' (x86_64)
2020-07-19 11:56:27.821984-0700 armagetronad_main[817:10310] WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.6 instead of 10.15.6. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
Call location:
2020-07-19 11:56:27.823044-0700 armagetronad_main[817:10310] 0   CarbonCore                          0x00007fff2f685f22 ___Gestalt_SystemVersion_block_invoke + 112
2020-07-19 11:56:27.823071-0700 armagetronad_main[817:10310] 1   libdispatch.dylib                   0x00007fff68231658 _dispatch_client_callout + 8
2020-07-19 11:56:27.823076-0700 armagetronad_main[817:10310] 2   libdispatch.dylib                   0x00007fff682327de _dispatch_once_callout + 20
2020-07-19 11:56:27.823081-0700 armagetronad_main[817:10310] 3   CarbonCore                          0x00007fff2f627db8 _Gestalt_SystemVersion + 945
2020-07-19 11:56:27.823085-0700 armagetronad_main[817:10310] 4   CarbonCore                          0x00007fff2f6279cd Gestalt + 149
2020-07-19 11:56:27.823090-0700 armagetronad_main[817:10310] 5   libSDL-1.2.0.dylib                  0x00000001003c1bdd QZ_VideoInit + 54
2020-07-19 11:56:27.823094-0700 armagetronad_main[817:10310] 6   libSDL-1.2.0.dylib                  0x00000001003b9c0e SDL_VideoInit + 346
2020-07-19 11:56:27.879927-0700 armagetronad_main[817:10310] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x101f04f30> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-07-19 11:56:27.917638-0700 armagetronad_main[817:10310]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
2020-07-19 11:56:27.917914-0700 armagetronad_main[817:10310]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
2020-07-19 11:56:28.456084-0700 armagetronad_main[817:10542] flock failed to lock maps file: errno = 35
2020-07-19 11:56:28.457898-0700 armagetronad_main[817:10542] flock failed to lock maps file: errno = 35
Process 817 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001000329f8 armagetronad_main`ConnectToServerCore(nServerInfoBase*) + 152
armagetronad_main`ConnectToServerCore:
->  0x1000329f8 <+152>: movq   (%rbx), %rax
    0x1000329fb <+155>: movq   %rbx, %rdi
    0x1000329fe <+158>: callq  *0x28(%rax)
    0x100032a01 <+161>: movq   %rax, %rdi
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001000329f8 armagetronad_main`ConnectToServerCore(nServerInfoBase*) + 152
    frame #1: 0x0000000100033209 armagetronad_main`ConnectToServer(nServerInfoBase*) + 73
    frame #2: 0x000000010010f1b6 armagetronad_main`uMenu::HandleEvent(SDL_Event) + 582
    frame #3: 0x000000010010e137 armagetronad_main`uMenu::OnEnter() + 535
    frame #4: 0x000000010005ae6a armagetronad_main`gServerBrowser::BrowseServers() + 138
    frame #5: 0x000000010005ad7b armagetronad_main`gServerBrowser::BrowseSpecialMaster(nServerInfoBase*, char const*) + 171
    frame #6: 0x000000010010f1b6 armagetronad_main`uMenu::HandleEvent(SDL_Event) + 582
    frame #7: 0x000000010010e137 armagetronad_main`uMenu::OnEnter() + 535
    frame #8: 0x00000001000343c8 armagetronad_main`net_game() + 728
    frame #9: 0x000000010010f1b6 armagetronad_main`uMenu::HandleEvent(SDL_Event) + 582
    frame #10: 0x000000010010e137 armagetronad_main`uMenu::OnEnter() + 535
    frame #11: 0x000000010010f1b6 armagetronad_main`uMenu::HandleEvent(SDL_Event) + 582
    frame #12: 0x000000010010e137 armagetronad_main`uMenu::OnEnter() + 535
    frame #13: 0x0000000100035c50 armagetronad_main`MainMenu(bool) + 3408
    frame #14: 0x00000001000103a2 armagetronad_main`SDL_main + 4322
    frame #15: 0x0000000100143d34 armagetronad_main`-[SDLMain applicationDidFinishLaunching:] + 49
    frame #16: 0x00007fff2e21580f CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    frame #17: 0x00007fff2e2157a3 CoreFoundation`___CFXRegistrationPost1_block_invoke + 63
    frame #18: 0x00007fff2e215718 CoreFoundation`_CFXRegistrationPost1 + 372
    frame #19: 0x00007fff2e215384 CoreFoundation`___CFXNotificationPost_block_invoke + 80
    frame #20: 0x00007fff2e1e54fd CoreFoundation`-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1554
    frame #21: 0x00007fff2e1e49a9 CoreFoundation`_CFXNotificationPost + 1351
    frame #22: 0x00007fff30862786 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 59
    frame #23: 0x00007fff2b4994f3 AppKit`-[NSApplication _postDidFinishNotification] + 312
    frame #24: 0x00007fff2b499232 AppKit`-[NSApplication _sendFinishLaunchingNotification] + 208
    frame #25: 0x00007fff2b4962f3 AppKit`-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 549
    frame #26: 0x00007fff2b495f38 AppKit`-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 688
    frame #27: 0x00007fff3088da26 Foundation`-[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308
    frame #28: 0x00007fff3088d890 Foundation`_NSAppleEventManagerGenericHandler + 98
    frame #29: 0x00007fff2f592203 AE`___lldb_unnamed_symbol76$$AE + 2172
    frame #30: 0x00007fff2f591929 AE`___lldb_unnamed_symbol75$$AE + 41
    frame #31: 0x00007fff2f589bd7 AE`aeProcessAppleEvent + 449
    frame #32: 0x00007fff2ce5c7fa HIToolbox`AEProcessAppleEvent + 54
    frame #33: 0x00007fff2b4902d1 AppKit`_DPSNextEvent + 1547
    frame #34: 0x00007fff2b48e880 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
    frame #35: 0x00007fff2b48058e AppKit`-[NSApplication run] + 658
    frame #36: 0x000000010014429b armagetronad_main`main + 1124
    frame #37: 0x00007fff6828acc9 libdyld.dylib`start + 1
    frame #38: 0x00007fff6828acc9 libdyld.dylib`start + 1
Was perpetually getting this crash on macOS Catalina, version info as follows

Code: Select all

ProductName:	Mac OS X
ProductVersion:	10.15.6
BuildVersion:	19G73
In order to get the binary to run on Catalina (which removes support for 32-bit applications), I had to recompile from source using the latest llvm toolchain from brew.

Code: Select all

clang version 10.0.0
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
Hope this helps with future macOS Catalina support. :D

User avatar
Z-Man
God & Project Admin
Posts: 11427
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: macOS Catalina rebuild: SEGFAULT in armagetronad_main`ConnectToServerCore(nServerInfoBase*) + 152

Post by Z-Man »

We're currently lacking the capacity to maintain, build, test and especially automatically build for Mac :(
How exactly did you do the build? I see src/armagetronad_main, that's what the generic unix Makefiles spit out.

Post Reply