Has anyone seen this Rosetta error during debugging in Xcode?

Recently, I've seen this error come up during debugging a MacOS Intel build on an M1 Pro in Xcode

13.4.1 (on Monterey 12.6.7):


rosetta error: unable to get state for thread the runtime suspended


Then the app crashes (debugger shut down first):


Crashed Thread:        2 

com.apple.rosetta.debugserver


Exception Type:        EXC_BREAKPOINT (SIGTRAP)

Exception Codes:       0x0000000000000001, 0x00007ff7fff0c9b0

Exception Note:        EXC_CORPSE_NOTIFY


Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5

Terminating Process:   exc handler [1290]


External Modification Warnings:

Thread creation by external task.


Thread 0::  Dispatch queue: com.apple.main-thread


0   <translation info unavailable>                       0x10ba58fb8 ???

1   <translation info unavailable>                       0x10ba58f98 ???

2   MyApp                                 0x104adcf1a -[RetinaEditTextView ThingEditCommandDispatch:] + 1290 (RetinaEditTextView.mm:1172)

3   AppKit                              0x7ff80b27f08e -[NSApplication(NSResponder) sendAction:to:from:] + 288

4   AppKit                              0x7ff80b373c10 -[NSMenuItem _corePerformAction] + 413

5   AppKit                              0x7ff80b373932 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 95

6   AppKit                              0x7ff80b69ead7 -[NSMenu _performActionForItem:atIndex:fromEvent:] + 197

7   AppKit                              0x7ff80b372c7a -[NSMenu performKeyEquivalent:] + 418

8   AppKit                              0x7ff80b7d154d routeKeyEquivalent + 656

9   AppKit                              0x7ff80b1ea7f0 -[NSApplication(NSEvent) sendEvent:] + 1132

10  AppKit                            0x7ff80b4a314b -[NSApplication _handleEvent:] + 65

11  AppKit                            0x7ff80b06bcfe -[NSApplication run] + 623

12  AppKit                            0x7ff80b03fc57 NSApplicationMain + 817

13  MyApp                            0x1055a2272 main + 34 (main.mm:15)

14  dyld                                    0x20746252e start + 462


Thread 1::com.apple.rosetta.exceptionserver


0   runtime                           0x7ff7ffef3944 0x7ff7ffeef000 + 18756

1   runtime                           0x7ff7fff013e0 0x7ff7ffeef000 + 74720

2   runtime                           0x7ff7fff02e58 0x7ff7ffeef000 + 81496


Thread 2 Crashed:: com.apple.rosetta.debugserver


0   runtime                           0x7ff7fff0c9b0 0x7ff7ffeef000 + 121264

1   runtime                           0x7ff7fff0c9f8 0x7ff7ffeef000 + 121336

2   runtime                           0x7ff7fff085fc 0x7ff7ffeef000 + 103932

3   runtime                           0x7ff7fff0829c 0x7ff7ffeef000 + 103068

4   runtime                           0x7ff7fff12d94 0x7ff7ffeef000 + 146836


Big, long, complex, mature application. This is happening after I've made some calls to the NSBookmark creation / resolution API, then crashing downstream after issuing a menu command. Any clue as to what this means, or how to determine why it's happening?


MacBook Pro 15″, macOS 10.14

Posted on Jul 23, 2023 04:23 PM

Reply

Similar questions

2 replies

Jul 23, 2023 08:12 PM in response to MrHoffman

Awww, dang -- even though the Rosetta error persisted across a full restart, across a full day of debugging, I tried a build where I enabled Thread Sanitizer, Undefined Behavior Sanitizer, and Main Thread Checker -- and the problem went away. I turned those off and did a clean build -- and now the error is GONE!


We don't have a native build (yet) -- it was successfully tested two years ago by an Apple engineer when M1 hardware was being beta tested, but we haven't built it since. But clearly a native build would avoid any Rosetta problem...


What’s happening at [RetinaEditTextView ThingEditCommandDispatch:] + 1290


Table-driven menu command dispatch. Nothing changed in months and dozens of releases.


[What’s happening at] main + 34 (main.mm:15)?


int main(int argc, const char * argv[]) {
   return NSApplicationMain(argc, argv);
}



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Has anyone seen this Rosetta error during debugging in Xcode?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.