Code 11 segmentation fault Monterey

My main app, compiled in Xojo 2018, works fine on Catalina and Big Sur.
Immediate crash on Monterey on M1 machines, however.
What might I look for?

A crash report with stack trace.

1 Like

I have been send an ips file.
Is that what you mean - I cannot see much in the way of a stack trace in it…

Please start at the beginning: AppStore or non AppStore? Intel or ARM? Does the app crash for you or for your users or for the reviewer?

Why are you using such an old version of Xojo?

It’s not even supposed to be able to run on Catalina, if you managed to make it run for a while in Monterey it is amazing, kudos. But it should crash at some point.

non AppStore
Compiled for Intel
Only crashes for the beta tester - I don’t own an M1 mac at this stage.

Why are you using such an old version of Xojo?
It’s been reliable.

I have a licence up to 2021R3 but dont currently use it, because

  • I don’t have the time to invest the work involved in trying to make the code work on newer versions at the moment.
  • I need to keep the code compatible with Xojo 2015 on Windows, which is the only reliable version I can find. (anything after that has messed with the graphics engine and stops my app from working… long story)

So, last years version seems to work on Monterey fine.
Next years version crashes.
Something in my code has caused this effect, but I have no idea what it is.
The compiled app works on Big Sur and Catalina.
Im just about to try it on an intel Monterey.

Why?

Because changes in the underlying system (OS), introduced after the supported SDK and compiler in 2018 edition, are just not present in the generated content (objects, pure 64 bit codes and calls, plists, etc) and some clash will occur at some point. Catalina+, if I do recall correctly, MUST USE Xojo version 2019r3.2 or later (2019 3.2+)

@Jeff_Tullin

I suggest opening the project in 2021r3 and see if it’ll just compile as-is as many projects do.

1 Like

You know that this is not a good idea, yes? Let your beta tester send you the crash log.

I don’t doubt that there could be compatibility issues with newer versions of macOS when using older versions of Xojo but our app compiled with Xojo 2017r3 does not appear to have any issues.

And I’m sure there are.

AND if I do recall again, M1 support started to become ok on 2021R3 (sometimes works ok on pure M1 code, and sometimes you must enable Rosetta2, not sure if because of the use of plugins).

Which has been my experience to date, even on M1 machines.
Something in my code between June and now is upsetting them specifically.
I just need to work out what it is.

Let your beta tester send you the crash log.

I have an IPS file. Is that the crash log? It doesnt say anything to me that I can understand.

The Goggle doesn’t even tell me what an IPS file on macOS is. You need the crash log. Does your app do session logs so that you can see if the crash occurs before or after the first line of code?

  • Crash Reports: System and user reports about apps or processes that crash. Crash report names have the .ips extension.

If anyone can read it, the file I was sent is below.
I will be compiling a version with my internal debugging trace turned on so that I can see if any code is executed, and what succeeded before it dies.

Summary

{“app_name”:“myapp”,“timestamp”:“2021-12-04 00:22:15.00 -0800”,“app_version”:“1700”,“slice_uuid”:“464f1bb6-98da-31d9-ae5b-ee066f63802b”,“build_version”:“17.0.0.2.1700”,“platform”:1,“bundleID”:“com.company.myapp”,“share_with_app_devs”:1,“is_first_party”:0,“bug_type”:“309”,“os_version”:“macOS 12.0.1 (21A559)”,“incident_id”:“77D66088-5788-4C06-94EE-6C4276B66464”,“name”:“myapp”}
{
“uptime” : 220000,
“procLaunch” : “2021-12-04 00:21:59.4963 -0800”,
“procRole” : “Foreground”,
“version” : 2,
“userID” : 501,
“deployVersion” : 210,
“modelCode” : “MacBookPro16,1”,
“procStartAbsTime” : 228896439314301,
“coalitionID” : 12346,
“osVersion” : {
“train” : “macOS 12.0.1”,
“build” : “21A559”,
“releaseType” : “User”
},
“captureTime” : “2021-12-04 00:22:05.0346 -0800”,
“incident” : “77D66088-5788-4C06-94EE-6C4276B66464”,
“bug_type” : “309”,
“pid” : 11924,
“procExitAbsTime” : 228901972523811,
“cpuType” : “X86-64”,
“procName” : “myapp”,
“procPath” : “/Applications/myapp.app/Contents/MacOS/myapp”,
“bundleInfo” : {“CFBundleShortVersionString”:“1700”,“CFBundleVersion”:“17.0.0.2.1700”,“CFBundleIdentifier”:“com.company.myapp”},
“storeInfo” : {“deviceIdentifierForVendor”:“7073F97E-835E-5F8B-9D22-7A63EA7162B0”,“thirdParty”:true},
“parentProc” : “launchd”,
“parentPid” : 1,
“coalitionName” : “com.company.myapp”,
“crashReporterKey” : “EBC462E4-CE7B-757B-C2F1-1A6EF0B5E39D”,
“wakeTime” : 5820,
“bridgeVersion” : {“build”:“19P548”,“train”:“6.0”},
“sleepWakeUUID” : “BA324D8A-5048-4769-85E7-892FC0E0CF51”,
“sip” : “enabled”,
“vmRegionInfo” : “0x8c is not in any region. Bytes before following region: 4519772020\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n—> \n __TEXT 10d664000-10f6cb000 [ 32.4M] r-x/rwx SM=COW …cOS/myapp”,
“isCorpse” : 1,
“exception” : {“codes”:“0x0000000000000001, 0x000000000000008c”,“rawCodes”:[1,140],“type”:“EXC_BAD_ACCESS”,“signal”:“SIGSEGV”,“subtype”:“KERN_INVALID_ADDRESS at 0x000000000000008c”},
“termination” : {“flags”:0,“code”:11,“namespace”:“SIGNAL”,“indicator”:“Segmentation fault: 11”,“byProc”:“exc handler”,“byPid”:11924},
“vmregioninfo” : “0x8c is not in any region. Bytes before following region: 4519772020\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n—> \n __TEXT 10d664000-10f6cb000 [ 32.4M] r-x/rwx SM=COW …cOS/myapp”,
“extMods” : {“caller”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“system”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“targeted”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“warnings”:0},
“faultingThread” : 0,
“threads” : [{“triggered”:true,“id”:1810104,“instructionState”:{“instructionStream”:{“bytes”:[16,72,137,5,16,66,7,0,72,133,192,116,11,72,137,223,72,131,196,8,91,93,255,224,72,131,196,8,91,93,195,85,72,137,229,72,131,236,16,72,137,249,72,141,85,240,72,199,66,8,0,0,0,0,72,141,61,115,65,7,0,255,23,72,139,48,72,137,50,72,137,16,72,139,5,193,13,7,0,72,139,68,1,8,72,139,13,253,253,6,0,255,76,8,92,72,137,215,232,135,4,0,0,72,131,196,16,93,195,85,72,137,229,232,214,171,255,255,176,4,8,5,98,249,6,0,8,5,108,253,6,0,8,5,38,0,7,0,8,5,72,254,6,0,8,5,90,2,7,0,8,5,244,13,7,0,8,5,214,14,7,0,8,5,24,16,7,0,8,5,250,16,7,0,8,5,220,17,7,0,8,5,190,18,7,0,8,5,160,19,7,0],“offset”:91}},“threadState”:{“r13”:{“value”:140701828988672},“rax”:{“value”:0},“rflags”:{“value”:66050},“cpu”:{“value”:0},“r14”:{“value”:4571819024,“symbolLocation”:0,“symbol”:“gCurrentException”},“rsi”:{“value”:0},“r8”:{“value”:4570127700,“symbolLocation”:0,“symbol”:“RuntimeStackCheck”},“cr2”:{“value”:140},“rdx”:{“value”:140701828988576},“r10”:{“value”:4571341192},“r9”:{“value”:4571418440},“r15”:{“value”:105553125584768},“rbx”:{“value”:105553125584768},“trap”:{“value”:14,“description”:"(no mapping for user data write)"},“err”:{“value”:6},“r11”:{“value”:4567621632},“rip”:{“value”:4625461339,“matchesCrashFrame”:1},“rbp”:{“value”:140701828988592},“rsp”:{“value”:140701828988576},“r12”:{“value”:105553155610336},“rcx”:{“value”:48},“flavor”:“x86_THREAD_STATE”,“rdi”:{“value”:4625936816}},“queue”:“com.apple.main-thread”,“frames”:[{“imageOffset”:28763,“imageIndex”:0},{“imageOffset”:1140390,“symbol”:“XmlDocument.__exit%%o”,“symbolLocation”:54,“imageIndex”:1},{“imageOffset”:2456911,“symbol”:“RuntimeUnlockObject”,“symbolLocation”:815,“imageIndex”:2},{“imageOffset”:19803683,“symbol”:“frmLaunch.frmLaunch.Event_Open%%o<frmLaunch.frmLaunch>”,“symbolLocation”:108611,“imageIndex”:1},{“imageOffset”:2529830,“symbol”:“FireWindowOpenEvents”,“symbolLocation”:218,“imageIndex”:2},{“imageOffset”:162668,“symbol”:“Window.Constructor%%o”,“symbolLocation”:60,“imageIndex”:1},{“imageOffset”:31254097,“symbol”:“myWindow.constructor%%o”,“symbolLocation”:657,“imageIndex”:1},{“imageOffset”:5304597,“symbol”:“myapp.Event_NewDocument%%o”,“symbolLocation”:4037,“imageIndex”:1},{“imageOffset”:863290,“imageIndex”:2},{“imageOffset”:2155414,“symbol”:"-[NSApplication _doOpenUntitled]",“symbolLocation”:417,“imageIndex”:3},{“imageOffset”:1737225,“symbol”:"__58-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]_block_invoke",“symbolLocation”:232,“imageIndex”:3},{“imageOffset”:281251,“symbol”:"-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]",“symbolLocation”:528,“imageIndex”:3},{“imageOffset”:280327,“symbol”:"-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]",“symbolLocation”:665,“imageIndex”:3},{“imageOffset”:217732,“symbol”:"-[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]",“symbolLocation”:308,“imageIndex”:4},{“imageOffset”:217334,“symbol”:"_NSAppleEventManagerGenericHandler",“symbolLocation”:80,“imageIndex”:4},{“imageOffset”:48424,“imageIndex”:5},{“imageOffset”:97232,“symbol”:“aeResumeTheCurrentEvent”,“symbolLocation”:389,“imageIndex”:5},{“imageOffset”:867531,“imageIndex”:2},{“imageOffset”:867026,“symbol”:“CocoaProcessOneEvent(signed char)”,“symbolLocation”:14,“imageIndex”:2},{“imageOffset”:2446869,“symbol”:“ModalEvents(unsigned char)”,“symbolLocation”:58,“imageIndex”:2},{“imageOffset”:1436435,“symbol”:“RuntimeDoEvents”,“symbolLocation”:16,“imageIndex”:2},{“imageOffset”:496491,“symbol”:“Application.DoEvents%%oi8”,“symbolLocation”:11,“imageIndex”:1},{“imageOffset”:19035224,“symbol”:“frmExtract.frmExtract.Event_Activate%%o<frmExtract.frmExtract>”,“symbolLocation”:26552,“imageIndex”:1},{“imageOffset”:983401,“imageIndex”:2},{“imageOffset”:482931,“symbol”:“CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER”,“symbolLocation”:12,“imageIndex”:6},{“imageOffset”:1127241,“symbol”:"___CFXRegistrationPost_block_invoke",“symbolLocation”:49,“imageIndex”:6},{“imageOffset”:1127110,“symbol”:"_CFXRegistrationPost",“symbolLocation”:496,“imageIndex”:6},{“imageOffset”:292742,“symbol”:"_CFXNotificationPost",“symbolLocation”:733,“imageIndex”:6},{“imageOffset”:39318,“symbol”:"-[NSNotificationCenter postNotificationName:object:userInfo:]",“symbolLocation”:82,“imageIndex”:4},{“imageOffset”:1971115,“symbol”:"-[NSWindow becomeKeyWindow]",“symbolLocation”:1380,“imageIndex”:3},{“imageOffset”:1527788,“symbol”:"-[NSWindow _changeKeyAndMainLimitedOK:]",“symbolLocation”:1012,“imageIndex”:3},{“imageOffset”:1526425,“symbol”:"-[NSWindow _makeKeyRegardlessOfVisibility]",“symbolLocation”:76,“imageIndex”:3},{“imageOffset”:1485112,“symbol”:"-[NSWindow makeKeyAndOrderFront:]",“symbolLocation”:40,“imageIndex”:3},{“imageOffset”:2796073,“symbol”:“Window::SelectWindow()”,“symbolLocation”:27,“imageIndex”:2},{“imageOffset”:2444460,“symbol”:“RuntimeShowModal”,“symbolLocation”:74,“imageIndex”:2},{“imageOffset”:164388,“symbol”:“Window.ShowModal%%o”,“symbolLocation”:36,“imageIndex”:1},{“imageOffset”:5755555,“symbol”:“myapp.ExtractStuff%%ob”,“symbolLocation”:4067,“imageIndex”:1},{“imageOffset”:7026263,“symbol”:“myapp.setusup%%o”,“symbolLocation”:2599,“imageIndex”:1},{“imageOffset”:5199291,“symbol”:“myapp.Event_Open%%o”,“symbolLocation”:7227,“imageIndex”:1},{“imageOffset”:868479,“symbol”:“CocoaFinishApplicationStartup()”,“symbolLocation”:149,“imageIndex”:2},{“imageOffset”:863146,“imageIndex”:2},{“imageOffset”:482931,“symbol”:“CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER”,“symbolLocation”:12,“imageIndex”:6},{“imageOffset”:1127241,“symbol”:"___CFXRegistrationPost_block_invoke",“symbolLocation”:49,“imageIndex”:6},{“imageOffset”:1127110,“symbol”:"_CFXRegistrationPost",“symbolLocation”:496,“imageIndex”:6},{“imageOffset”:292742,“symbol”:"_CFXNotificationPost",“symbolLocation”:733,“imageIndex”:6},{“imageOffset”:39318,“symbol”:"-[NSNotificationCenter postNotificationName:object:userInfo:]",“symbolLocation”:82,“imageIndex”:4},{“imageOffset”:291211,“symbol”:"-[NSApplication _postDidFinishNotification]",“symbolLocation”:305,“imageIndex”:3},{“imageOffset”:290525,“symbol”:"-[NSApplication _sendFinishLaunchingNotification]",“symbolLocation”:208,“imageIndex”:3},{“imageOffset”:257607,“symbol”:"_DPSNextEvent",“symbolLocation”:2253,“imageIndex”:3},{“imageOffset”:249692,“symbol”:"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]",“symbolLocation”:1411,“imageIndex”:3},{“imageOffset”:870489,“imageIndex”:2},{“imageOffset”:870557,“imageIndex”:2},{“imageOffset”:497397,“symbol”:“Application._CallFunctionWithExceptionHandling%%op”,“symbolLocation”:181,“imageIndex”:1},{“imageOffset”:2446759,“symbol”:“CallFunctionWithExceptionHandling(void (*)())”,“symbolLocation”:262,“imageIndex”:2},{“imageOffset”:870406,“imageIndex”:2},{“imageOffset”:193369,“symbol”:"-[NSApplication run]",“symbolLocation”:586,“imageIndex”:3},{“imageOffset”:2439453,“symbol”:“RuntimeRun”,“symbolLocation”:42,“imageIndex”:2},{“imageOffset”:1436147,“symbol”:“REALbasic._RuntimeRun”,“symbolLocation”:19,“imageIndex”:1},{“imageOffset”:32548232,“symbol”:"_Main",“symbolLocation”:536,“imageIndex”:1},{“imageOffset”:32460499,“symbol”:“main”,“symbolLocation”:19,“imageIndex”:1},{“imageOffset”:21758,“symbol”:“start”,“symbolLocation”:462,“imageIndex”:7}]},{“id”:1810252,“frames”:[{“imageOffset”:8204,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:8}]},{“id”:1810253,“frames”:[{“imageOffset”:8204,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:8}]},{“id”:1810261,“frames”:[{“imageOffset”:8204,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:8}]},{“id”:1810273,“frames”:[{“imageOffset”:8204,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:8}]},{“id”:1810274,“frames”:[{“imageOffset”:8204,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:8}]}],
“usedImages” : [
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4625432576,
“size” : 466944,
“uuid” : “2b1f5370-bef9-3194-9abb-ac630093cff8”,
“path” : “/Applications/myapp.app/Contents/Frameworks/XML.dylib”,
“name” : “XML.dylib”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4519772160,
“CFBundleShortVersionString” : “1700”,
“CFBundleIdentifier” : “com.company.myapp”,
“size” : 33976320,
“uuid” : “464f1bb6-98da-31d9-ae5b-ee066f63802b”,
“path” : “/Applications/myapp.app/Contents/MacOS/myapp”,
“name” : “myapp”,
“CFBundleVersion” : “17.0.0.2.1700”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4567621632,
“CFBundleShortVersionString” : “1.0”,
“CFBundleIdentifier” : “com.xojo.XojoFramework”,
“size” : 3796992,
“uuid” : “037f59d1-a949-3c51-847e-15c70858b863”,
“path” : “/Applications/myapp.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework”,
“name” : “XojoFramework”,
“CFBundleVersion” : “2”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703538483200,
“CFBundleShortVersionString” : “6.9”,
“CFBundleIdentifier” : “com.apple.AppKit”,
“size” : 15257600,
“uuid” : “dd0028a3-78e3-3a8a-a51b-ddd68123adef”,
“path” : “/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit”,
“name” : “AppKit”,
“CFBundleVersion” : “2113”
},

That’s not a crash log. Below is the start of an Arbed crash:

Process: Arbed [35343]
Path: /private/var/folders/*/Arbed.app/Contents/MacOS/Arbed
Identifier: org.tempel.arbed
Version: 1.9b6 (1.9.0.2.6)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Arbed [35343] User ID: 501
Date/Time: 2020-05-25 13:53:09.567 +0200
OS Version: Mac OS X 10.15.5 (19F83c)
Report Version: 12 Anonymous UUID: 7293FE3A-5A2F-CA61-3C6F-A22390FE8B35
Sleep/Wake UUID: 9ACD367D-67FC-45F2-AD47-607E6120C5A0
Time Awake Since Boot: 340000 seconds
Time Since Wake: 3200 seconds
System Integrity Protection: enabled
Notes: Translocated Process
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXCBADACCESS (SIGSEGV)
Exception Codes: EXCI386GPFLT
Exception Note: EXCCORPSENOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [35343]

I’ve got some articles on my blog:

How to locate a crash log:

Introduction into reading crash logs:

And you could post a download link for your app.

Never seen the IPS format before, interesting.

Here’s the important part, cleaned up and JSON prettified:

        "queue": "com.apple.main-thread",
        "frames": [
          {
            "imageOffset": 28763,
            "imageIndex": 0
          },
          {
            "imageOffset": 1140390,
            "symbol": "XmlDocument.__exit%%o",
            "symbolLocation": 54,
            "imageIndex": 1
          },
          {
            "imageOffset": 2456911,
            "symbol": "RuntimeUnlockObject",
            "symbolLocation": 815,
            "imageIndex": 2
          },
          {
            "imageOffset": 19803683,
            "symbol": "frmLaunch.frmLaunch.Event_Open%%o<frmLaunch.frmLaunch>",
            "symbolLocation": 108611,
            "imageIndex": 1
          },
          {
            "imageOffset": 2529830,
            "symbol": "FireWindowOpenEvents",
            "symbolLocation": 218,
            "imageIndex": 2
          },
          {
            "imageOffset": 162668,
            "symbol": "Window.Constructor%%o",
            "symbolLocation": 60,
            "imageIndex": 1
          },

Looks like it’s crasing in XmlDocument.__exit inside the frmLaunch.Open event.

Does that give you a hint?

Yes, that .ips is a “Crash Report” from Monterey.

You should open it in the Monterey Console for a most human readable inspection.
Maybe you need XCode installed.

You are correct, the file ending is now ips. But the content still is the same and not what Jeff showed above.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.