jacklandrin / OnlySwitch

⚙️ All-in-One menu bar app, hide 💻MacBook Pro's notch, dark mode, AirPods, Shortcuts
https://jacklandrin.github.io/macos%20app/2021/12/01/onlyswitch.html
MIT License
3.84k stars 185 forks source link

Crashes on launch for macOS 15 Beta #132

Closed veilofsecurity closed 2 months ago

veilofsecurity commented 2 months ago

Describe the bug I know it's very early but just reporting since noone else has yet. Crashes on launch for macOS 15 Beta. Relevant line from the log appears to be "Symbol not found: _DisplayServicesBrightnessChanged".

To Reproduce Launch App

Crash Dump

Translated Report (Full Report Below)

Process: OnlySwitch [48524] Path: /Applications/Only Switch.app/Contents/MacOS/OnlySwitch Identifier: jacklandrin.OnlySwitch Version: 2.5.1 (184) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2024-06-11 14:50:51.8780 -0700 OS Version: macOS 15.0 (24A5264n) Report Version: 12 Anonymous UUID: BFCD0A23-4436-5D8F-F77C-0D009C5D2202

Time Awake Since Boot: 66000 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace DYLD, Code 4 Symbol missing Symbol not found: _DisplayServicesBrightnessChanged Referenced from: /Applications/Only Switch.app/Contents/MacOS/OnlySwitch Expected in: /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices (terminated at launch; ignore backtrace)

Thread 0 Crashed: 0 dyld 0x19f6f0d64 __abort_with_payload + 8 1 dyld 0x19f6f80a8 abort_with_payload_wrapper_internal + 104 2 dyld 0x19f6f80dc abort_with_payload + 16 3 dyld 0x19f692130 dyld4::halt(char const, dyld4::StructuredError const) + 300 4 dyld 0x19f68eb0c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const) + 3988 5 dyld 0x19f68db34 dyld4::start(dyld4::KernelArgs, void, void)::$_0::operator()() const + 544 6 dyld 0x19f68d034 start + 2264

Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016d3115c0 x3: 0x00000000000000c5 x4: 0x000000016d3111c0 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000490 x8: 0x0000000000000020 x9: 0x000000016d31113f x10: 0x000000000000000a x11: 0x0000000000000000 x12: 0x0000000000000034 x13: 0x0000000000000000 x14: 0x0000000216bf2210 x15: 0x000000016d313c38 x16: 0x0000000000000209 x17: 0x000000019f68a354 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016d3111c0 x21: 0x00000000000000c5 x22: 0x000000016d3115c0 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x0000000000001258 x26: 0x00000002049eb840 x27: 0x000000016d313140 x28: 0x000000016d313060 fp: 0x000000016d311190 lr: 0x000000019f6f80a8 sp: 0x000000016d311150 pc: 0x000000019f6f0d64 cpsr: 0x80001000 far: 0x0000000000000000 esr: 0x56000080 Address size fault

Binary Images: 0x102adc000 - 0x103027fff jacklandrin.OnlySwitch (2.5.1) /Applications/Only Switch.app/Contents/MacOS/OnlySwitch 0x19f687000 - 0x19f708c7b dyld () <94556bf3-ffa8-3dc8-aeae-d3d3a12c7f02> /usr/lib/dyld 0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ???

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0

VM Region Summary: ReadOnly portion of Libraries: Total=589.4M resident=0K(0%) swapped_out_or_unallocated=589.4M(100%) Writable regions: Total=8416K written=80K(1%) resident=80K(1%) swapped_out=0K(0%) unallocated=8336K(99%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 1 Stack 8176K 1 VM_ALLOCATE 16K 1 DATA 395K 3 DATA_CONST 296K 2 __DATA_DIRTY 7K 1 LINKEDIT 583.6M 2 TEXT 5944K 2 __TPRO_CONST 272K 1 mapped file 416K 3 page table in kernel 80K 1 shared memory 32K 1 =========== ======= ======= TOTAL 654.9M 19


Full Report

{"app_name":"OnlySwitch","timestamp":"2024-06-11 14:50:51.00 -0700","app_version":"2.5.1","slice_uuid":"d7e88a50-3abc-3f47-b775-dc8911873a76","build_version":"184","platform":1,"bundleID":"jacklandrin.OnlySwitch","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 15.0 (24A5264n)","roots_installed":0,"name":"OnlySwitch","incident_id":"077B1BB8-1E47-4FD0-B573-50DF888F8B68"} { "uptime" : 66000, "procRole" : "Default", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "Mac13,2", "coalitionID" : 6796, "osVersion" : { "train" : "macOS 15.0", "build" : "24A5264n", "releaseType" : "User" }, "captureTime" : "2024-06-11 14:50:51.8780 -0700", "codeSigningMonitor" : 1, "incident" : "077B1BB8-1E47-4FD0-B573-50DF888F8B68", "pid" : 48524, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-06-11 14:50:51.5512 -0700", "procStartAbsTime" : 1604010759335, "procExitAbsTime" : 1604018590077, "procName" : "OnlySwitch", "procPath" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "bundleInfo" : {"CFBundleShortVersionString":"2.5.1","CFBundleVersion":"184","CFBundleIdentifier":"jacklandrin.OnlySwitch"}, "storeInfo" : {"deviceIdentifierForVendor":"C8567384-0BAA-5BC1-AF74-5939D1EA9BE9","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "jacklandrin.OnlySwitch", "crashReporterKey" : "BFCD0A23-4436-5D8F-F77C-0D009C5D2202", "codeSigningID" : "jacklandrin.OnlySwitch", "codeSigningTeamID" : "B22726TNGH", "codeSigningFlags" : 570503953, "codeSigningValidationCategory" : 6, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"5AAAACABAAAoAQAAMAEAADgBAABAAQAASAEAAGQBAAAwQYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkTtk\/pe\/AwCR\/XvBqP8PX9bAA1\/WEC2A0g=="}, "bootSessionUUID" : "BA509C00-FB36-4B4D-89F6-48BF32EE1F04", "sip" : "enabled", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Symbol not found: _DisplayServicesBrightnessChanged","Referenced from: \/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch","Expected in: \/System\/Library\/PrivateFrameworks\/DisplayServices.framework\/Versions\/A\/DisplayServices"]}, "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":1304787,"threadState":{"x":[{"value":6},{"value":4},{"value":6126900672},{"value":197},{"value":6126899648},{"value":0},{"value":0},{"value":1168},{"value":32},{"value":6126899519},{"value":10},{"value":0},{"value":52},{"value":0},{"value":8971559440},{"value":6126910520},{"value":521},{"value":6969402196,"symbolLocation":420,"symbol":"simple_bprintf"},{"value":0},{"value":0},{"value":6126899648},{"value":197},{"value":6126900672},{"value":4},{"value":6},{"value":4696},{"value":8667445312,"symbolLocation":14320,"symbol":"dyld4::preallocator"},{"value":6126907712},{"value":6126907488}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6969852072},"cpsr":{"value":2147487744},"fp":{"value":6126899600},"sp":{"value":6126899536},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6969822564,"matchesCrashFrame":1},"far":{"value":0}},"frames":[{"imageOffset":433508,"symbol":"abort_with_payload","symbolLocation":8,"imageIndex":1},{"imageOffset":463016,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":1},{"imageOffset":463068,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":1},{"imageOffset":45360,"symbol":"dyld4::halt(char const, dyld4::StructuredError const)","symbolLocation":300,"imageIndex":1},{"imageOffset":31500,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const)","symbolLocation":3988,"imageIndex":1},{"imageOffset":27444,"symbol":"dyld4::start(dyld4::KernelArgs, void, void)::$_0::operator()() const","symbolLocation":544,"imageIndex":1},{"imageOffset":24628,"symbol":"start","symbolLocation":2264,"imageIndex":1}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4339908608, "CFBundleShortVersionString" : "2.5.1", "CFBundleIdentifier" : "jacklandrin.OnlySwitch", "size" : 5554176, "uuid" : "d7e88a50-3abc-3f47-b775-dc8911873a76", "path" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "name" : "OnlySwitch", "CFBundleVersion" : "184" }, { "source" : "P", "arch" : "arm64e", "base" : 6969389056, "size" : 531580, "uuid" : "94556bf3-ffa8-3dc8-aeae-d3d3a12c7f02", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6968590336, "size" : 4663967744, "uuid" : "de835d74-5cd7-37e9-8c67-8aca9547413f" }, "vmSummary" : "ReadOnly portion of Libraries: Total=589.4M resident=0K(0%) swapped_out_or_unallocated=589.4M(100%)\nWritable regions: Total=8416K written=80K(1%) resident=80K(1%) swapped_out=0K(0%) unallocated=8336K(99%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8176K 1 \nVM_ALLOCATE 16K 1 \nDATA 395K 3 \n__DATA_CONST 296K 2 \nDATA_DIRTY 7K 1 \nLINKEDIT 583.6M 2 \nTEXT 5944K 2 \n__TPRO_CONST 272K 1 \nmapped file 416K 3 \npage table in kernel 80K 1 \nshared memory 32K 1 \n=========== ======= ======= \nTOTAL 654.9M 19 \n", "legacyInfo" : { "threadTriggered" : {

} }, "logWritingSignature" : "a1d083b122796805c616d1b015a15434f83fb946", "trialInfo" : { "rollouts" : [ { "rolloutId" : "632c763c58740028737bfdd2", "factorPackIds" : { "SIRI_DIALOG_ASSETS" : "64a57d23fa6fd41b2353e2ae" }, "deploymentId" : 250000029 }, { "rolloutId" : "654d8c0661e7447155256fcd", "factorPackIds" : { "SIRI_TEXT_TO_SPEECH" : "6646a008b6a75d3dc3299393" }, "deploymentId" : 250000112 } ], "experiments" : [ { "treatmentId" : "2dffbe18-a39a-4f33-ada9-2cce30af39ca", "experimentId" : "6384d56b96e8d228551ec182", "deploymentId" : 400000032 }, { "treatmentId" : "3dff9c91-a8fb-424e-a656-c8d6e6037574", "experimentId" : "662152ede2d11d1408c4db33", "deploymentId" : 400000015 } ] } }

Model: Mac13,2, BootROM 11881.0.80.0.2, proc 20:16:4 processors, 64 GB, SMC Graphics: Apple M1 Ultra, Apple M1 Ultra, Built-In Display: LG HDR 4K, 6016 x 3384, Main, MirrorOff, Online Display: SAMSUNG, 6016 x 3384, MirrorOff, Online Display: LG HDR 4K, 6016 x 3384, MirrorOff, Online Display: LG HDR 4K, 6016 x 3384, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Apr 22 2024 07:24:59 version 20.10.1110.0.8.7.176 FWID 01-9bbe88a8 IO80211_driverkit-1302.55 "IO80211_driverkit-1302.55" May 30 2024 20:56:50 AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Ethernet, Ethernet, en0 Network Service: Wi-Fi, AirPort, en1 USB Device: USB31Bus USB Device: USB31Bus USB Device: USB31Bus USB Device: USB3.0 Hub USB Device: USB3.0 Hub USB Device: ASM225 USB Device: USB2.0 Hub USB Device: RTL9210B-CG USB Device: USB2.0 Hub USB Device: USB31Bus USB Device: USB31Bus USB Device: USB31Bus USB Device: USB31Bus USB Device: Stream Deck MK.2 USB Device: USB2.1 Hub USB Device: USB2.1 Hub USB Device: Sound BlasterX Katana USB Device: Back-UPS BGM1500 FW:31316S12-31320S10 USB Device: YubiKey OTP+FIDO+CCID USB Device: USB Receiver USB Device: USB PnP Audio Device USB Device: G815 RGB MECHANICAL GAMING KEYBOARD USB Device: USB3.1 Hub USB Device: USB3.1 Hub USB Device: Logitech BRIO Thunderbolt Bus: Mac Studio, Apple Inc. Thunderbolt Bus: Mac Studio, Apple Inc. Thunderbolt Bus: Mac Studio, Apple Inc. Thunderbolt Bus: Mac Studio, Apple Inc. Thunderbolt Bus: Mac Studio, Apple Inc. Thunderbolt Bus: Mac Studio, Apple Inc.

jacklandrin commented 2 months ago

Thanks for the report! TBH, I don't use any beta 1 generally, since there are often many bugs and they usually can be fixed in next beta by Apple. I will update my development device to the latest beta and check it.

veilofsecurity commented 2 months ago

So far most of the previews have been stable with only minor UI glitches. macOS has been least stable with OnlySwitch not working and a couple other apps randomly crashing but nothing super crazy. Happy to test if you get a beta version going.

JackYe200 commented 2 months ago

在macOS 15 beta2测试组新版本仍然不行,期待修复 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace DYLD, Code 4 Symbol missing Symbol not found: _DisplayServicesBrightnessChanged 谢谢

jacklandrin commented 2 months ago

Seems the private API of brightness doesn't work in macOS 15. Will provide a beta version to hide the dim screen switch temporally to avoid this crash.

JackYe200 commented 2 months ago

谢谢大佬

jacklandrin commented 2 months ago

@veilofsecurity @JackYe200 Hi, I created a beta build to attempt to hide the dim screen as a workaround to resolve the crash. Can you please test it? https://github.com/jacklandrin/OnlySwitch/releases/tag/beta_2.5.3

Weverses commented 2 months ago

I just tested it, but it still doesn't work on macOS beta2😢on MacBook Air M1. There are crash logs as below:

Full Report

{"app_name":"OnlySwitch","timestamp":"2024-06-30 01:44:58.00 +0800","app_version":"2.5.3","slice_uuid":"25a0983f-986f-3ad7-a7a1-36eda099c8ed","build_version":"195","platform":1,"bundleID":"jacklandrin.OnlySwitch","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 15.0 (24A5279h)","roots_installed":0,"name":"OnlySwitch","incident_id":"38B90DA0-B804-446A-9463-D00CC48C1F21"} { "uptime" : 170000, "procRole" : "Background", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookAir10,1", "coalitionID" : 25929, "osVersion" : { "train" : "macOS 15.0", "build" : "24A5279h", "releaseType" : "User" }, "captureTime" : "2024-06-30 01:44:57.7812 +0800", "codeSigningMonitor" : 1, "incident" : "38B90DA0-B804-446A-9463-D00CC48C1F21", "pid" : 22028, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-06-30 01:44:53.4056 +0800", "procStartAbsTime" : 4271655333008, "procExitAbsTime" : 4271759910574, "procName" : "OnlySwitch", "procPath" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "bundleInfo" : {"CFBundleShortVersionString":"2.5.3","CFBundleVersion":"195","CFBundleIdentifier":"jacklandrin.OnlySwitch"}, "storeInfo" : {"deviceIdentifierForVendor":"40C47F08-A411-5A63-8E15-E2F21079CB6C","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "jacklandrin.OnlySwitch", "crashReporterKey" : "372FFC19-CB41-87A7-AFAC-73221DE2B7FD", "codeSigningID" : "jacklandrin.OnlySwitch", "codeSigningTeamID" : "B22726TNGH", "codeSigningFlags" : 570503953, "codeSigningValidationCategory" : 6, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"5AAAACABAAAoAQAAMAEAADgBAABAAQAASAEAAGQBAAAwQYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkVxk\/pe\/AwCR\/XvBqP8PX9bAA1\/WEC2A0g=="}, "bootSessionUUID" : "DCDAA51B-CF0D-418E-9D48-28EBC7C7BEC4", "wakeTime" : 21381, "sleepWakeUUID" : "E9BF1E8B-F486-4483-8A3A-9E3ED21821DA", "sip" : "enabled", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Symbol not found: _DisplayServicesBrightnessChanged","Referenced from: <25A0983F-986F-3AD7-A7A1-36EDA099C8ED> \/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch","Expected in: \/System\/Library\/PrivateFrameworks\/DisplayServices.framework\/Versions\/A\/DisplayServices"]}, "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":2531837,"threadState":{"x":[{"value":6},{"value":4},{"value":6169646608},{"value":197},{"value":6169645584},{"value":0},{"value":0},{"value":1200},{"value":32},{"value":6169645455},{"value":10},{"value":0},{"value":50},{"value":0},{"value":8504813112},{"value":6169656488},{"value":521},{"value":6495863636,"symbolLocation":420,"symbol":"simple_bprintf"},{"value":0},{"value":0},{"value":6169645584},{"value":197},{"value":6169646608},{"value":4},{"value":6},{"value":4720},{"value":8198142016,"symbolLocation":14320,"symbol":"dyld4::preallocator"},{"value":6169653680},{"value":6169653456}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6496313376},"cpsr":{"value":2147487744},"fp":{"value":6169645536},"sp":{"value":6169645472},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6496283872,"matchesCrashFrame":1},"far":{"value":0}},"frames":[{"imageOffset":433376,"symbol":"abort_with_payload","symbolLocation":8,"imageIndex":1},{"imageOffset":462880,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":1},{"imageOffset":462932,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":1},{"imageOffset":45636,"symbol":"dyld4::halt(char const, dyld4::StructuredError const)","symbolLocation":300,"imageIndex":1},{"imageOffset":31644,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const)","symbolLocation":3996,"imageIndex":1},{"imageOffset":27580,"symbol":"dyld4::start(dyld4::KernelArgs, void, void)::$_0::operator()() const","symbolLocation":544,"imageIndex":1},{"imageOffset":24668,"symbol":"start","symbolLocation":2304,"imageIndex":1}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4297162752, "CFBundleShortVersionString" : "2.5.3", "CFBundleIdentifier" : "jacklandrin.OnlySwitch", "size" : 5636096, "uuid" : "25a0983f-986f-3ad7-a7a1-36eda099c8ed", "path" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "name" : "OnlySwitch", "CFBundleVersion" : "195" }, { "source" : "P", "arch" : "arm64e", "base" : 6495850496, "size" : 531560, "uuid" : "5bc7265e-eca4-3e70-9f29-627735be878e", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6495043584, "size" : 4684873728, "uuid" : "7a0f4fec-286b-3758-94b9-475956285bbc" }, "vmSummary" : "ReadOnly portion of Libraries: Total=592.0M resident=0K(0%) swapped_out_or_unallocated=592.0M(100%)\nWritable regions: Total=8416K written=80K(1%) resident=80K(1%) swapped_out=0K(0%) unallocated=8336K(99%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8176K 1 \nVM_ALLOCATE 16K 1 \nDATA 395K 3 \n__DATA_CONST 296K 2 \nDATA_DIRTY 7K 1 \nLINKEDIT 586.1M 2 \nTEXT 6024K 2 \n__TPRO_CONST 272K 1 \nmapped file 416K 3 \npage table in kernel 80K 1 \nshared memory 32K 1 \n=========== ======= ======= \nTOTAL 657.5M 19 \n", "legacyInfo" : { "threadTriggered" : {

} }, "logWritingSignature" : "6671b76bc19431a6bfe24db97b024e72209fbaaf", "trialInfo" : { "rollouts" : [ { "rolloutId" : "654d8c0661e7447155256fcd", "factorPackIds" : { "SIRI_TEXT_TO_SPEECH" : "666c8cdad96ac33f5269b6a6" }, "deploymentId" : 250000119 }, { "rolloutId" : "654439cdafbf5b61207873a9", "factorPackIds" : {

  },
  "deploymentId" : 250000003
}

], "experiments" : [ { "treatmentId" : "d6b840d8-f46f-4545-9161-f6e8039c6c8e", "experimentId" : "6675f38a7c96b0789c9c5b58", "deploymentId" : 500000001 }, { "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8", "experimentId" : "6643969b3099cf28e049862f", "deploymentId" : 400000004 } ] } }

Model: MacBookAir10,1, BootROM 11881.0.193.501.1, proc 8:4:4 processors, 8 GB, SMC Graphics: Apple M1, Apple M1, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Memory Module: LPDDR4, Micron AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: May 21 2024 17:20:32 version 18.20.451.0.7.8.170 FWID 01-2d41f3bc IO80211_driverkit-1302.61 "IO80211_driverkit-1302.61" Jun 15 2024 00:21:01 AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Air, Apple Inc. Thunderbolt Bus: MacBook Air, Apple Inc.

jacklandrin commented 2 months ago

@Weverses Thanks for testing it and providing the report. Unfortunately, I didn't find useful crash information in it such as crash thread stack.

Weverses commented 2 months ago

@jacklandrin I am sorry about that because I know little about macOS development. Please take a look at the crash log below to see if it is useful.😢

Translated Report (Full Report Below)

Process: OnlySwitch [33679] Path: /Applications/Only Switch.app/Contents/MacOS/OnlySwitch Identifier: jacklandrin.OnlySwitch Version: 2.5.3 (195) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2024-06-30 19:31:54.3491 +0800 OS Version: macOS 15.0 (24A5279h) Report Version: 12 Anonymous UUID: 372FFC19-CB41-87A7-AFAC-73221DE2B7FD

Sleep/Wake UUID: 32F43DA0-F2B4-41DE-808E-9EB346C76CF4

Time Awake Since Boot: 190000 seconds Time Since Wake: 541 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace DYLD, Code 4 Symbol missing Symbol not found: _DisplayServicesBrightnessChanged Referenced from: <25A0983F-986F-3AD7-A7A1-36EDA099C8ED> /Applications/Only Switch.app/Contents/MacOS/OnlySwitch Expected in: /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices (terminated at launch; ignore backtrace)

Thread 0 Crashed: 0 dyld 0x183356ce0 __abort_with_payload + 8 1 dyld 0x18335e020 abort_with_payload_wrapper_internal + 104 2 dyld 0x18335e054 abort_with_payload + 16 3 dyld 0x1832f8244 dyld4::halt(char const, dyld4::StructuredError const) + 300 4 dyld 0x1832f4b9c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const) + 3996 5 dyld 0x1832f3bbc dyld4::start(dyld4::KernelArgs, void, void)::$_0::operator()() const + 544 6 dyld 0x1832f305c start + 2304

Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016d151610 x3: 0x00000000000000c5 x4: 0x000000016d151210 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x00000000000004b0 x8: 0x0000000000000020 x9: 0x000000016d15118f x10: 0x000000000000000a x11: 0x0000000000000000 x12: 0x0000000000000033 x13: 0x0000000000000000 x14: 0x00000001faed2638 x15: 0x000000016d153ca8 x16: 0x0000000000000209 x17: 0x00000001832f0354 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016d151210 x21: 0x00000000000000c5 x22: 0x000000016d151610 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x0000000000001270 x26: 0x00000001e8a5b840 x27: 0x000000016d1531b0 x28: 0x000000016d1530d0 fp: 0x000000016d1511e0 lr: 0x000000018335e020 sp: 0x000000016d1511a0 pc: 0x0000000183356ce0 cpsr: 0x80001000 far: 0x0000000000000000 esr: 0x56000080 Address size fault

Binary Images: 0x102c9c000 - 0x1031fbfff jacklandrin.OnlySwitch (2.5.3) <25a0983f-986f-3ad7-a7a1-36eda099c8ed> /Applications/Only Switch.app/Contents/MacOS/OnlySwitch 0x1832ed000 - 0x18336ec67 dyld () <5bc7265e-eca4-3e70-9f29-627735be878e> /usr/lib/dyld 0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ???

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0

VM Region Summary: ReadOnly portion of Libraries: Total=592.0M resident=0K(0%) swapped_out_or_unallocated=592.0M(100%) Writable regions: Total=8416K written=80K(1%) resident=80K(1%) swapped_out=0K(0%) unallocated=8336K(99%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 1 Stack 8176K 1 VM_ALLOCATE 16K 1 DATA 395K 3 DATA_CONST 296K 2 __DATA_DIRTY 7K 1 LINKEDIT 586.1M 2 TEXT 6024K 2 __TPRO_CONST 272K 1 mapped file 416K 3 page table in kernel 80K 1 shared memory 32K 1 =========== ======= ======= TOTAL 657.5M 19


Full Report

{"app_name":"OnlySwitch","timestamp":"2024-06-30 19:31:54.00 +0800","app_version":"2.5.3","slice_uuid":"25a0983f-986f-3ad7-a7a1-36eda099c8ed","build_version":"195","platform":1,"bundleID":"jacklandrin.OnlySwitch","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 15.0 (24A5279h)","roots_installed":0,"name":"OnlySwitch","incident_id":"81C86246-F4C3-41EF-8334-522CF182CE1B"} { "uptime" : 190000, "procRole" : "Default", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookAir10,1", "coalitionID" : 25929, "osVersion" : { "train" : "macOS 15.0", "build" : "24A5279h", "releaseType" : "User" }, "captureTime" : "2024-06-30 19:31:54.3491 +0800", "codeSigningMonitor" : 1, "incident" : "81C86246-F4C3-41EF-8334-522CF182CE1B", "pid" : 33679, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-06-30 19:31:48.7124 +0800", "procStartAbsTime" : 4648750552170, "procExitAbsTime" : 4648885633730, "procName" : "OnlySwitch", "procPath" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "bundleInfo" : {"CFBundleShortVersionString":"2.5.3","CFBundleVersion":"195","CFBundleIdentifier":"jacklandrin.OnlySwitch"}, "storeInfo" : {"deviceIdentifierForVendor":"40C47F08-A411-5A63-8E15-E2F21079CB6C","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "jacklandrin.OnlySwitch", "crashReporterKey" : "372FFC19-CB41-87A7-AFAC-73221DE2B7FD", "codeSigningID" : "jacklandrin.OnlySwitch", "codeSigningTeamID" : "B22726TNGH", "codeSigningFlags" : 570503953, "codeSigningValidationCategory" : 6, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"5AAAACABAAAoAQAAMAEAADgBAABAAQAASAEAAGQBAAAwQYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkVxk\/pe\/AwCR\/XvBqP8PX9bAA1\/WEC2A0g=="}, "bootSessionUUID" : "DCDAA51B-CF0D-418E-9D48-28EBC7C7BEC4", "wakeTime" : 541, "sleepWakeUUID" : "32F43DA0-F2B4-41DE-808E-9EB346C76CF4", "sip" : "enabled", "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":4,"flags":518,"namespace":"DYLD","indicator":"Symbol missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Symbol not found: _DisplayServicesBrightnessChanged","Referenced from: <25A0983F-986F-3AD7-A7A1-36EDA099C8ED> \/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch","Expected in: \/System\/Library\/PrivateFrameworks\/DisplayServices.framework\/Versions\/A\/DisplayServices"]}, "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":2821603,"threadState":{"x":[{"value":6},{"value":4},{"value":6125065744},{"value":197},{"value":6125064720},{"value":0},{"value":0},{"value":1200},{"value":32},{"value":6125064591},{"value":10},{"value":0},{"value":51},{"value":0},{"value":8504813112},{"value":6125075624},{"value":521},{"value":6495863636,"symbolLocation":420,"symbol":"simple_bprintf"},{"value":0},{"value":0},{"value":6125064720},{"value":197},{"value":6125065744},{"value":4},{"value":6},{"value":4720},{"value":8198142016,"symbolLocation":14320,"symbol":"dyld4::preallocator"},{"value":6125072816},{"value":6125072592}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6496313376},"cpsr":{"value":2147487744},"fp":{"value":6125064672},"sp":{"value":6125064608},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6496283872,"matchesCrashFrame":1},"far":{"value":0}},"frames":[{"imageOffset":433376,"symbol":"abort_with_payload","symbolLocation":8,"imageIndex":1},{"imageOffset":462880,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":1},{"imageOffset":462932,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":1},{"imageOffset":45636,"symbol":"dyld4::halt(char const, dyld4::StructuredError const)","symbolLocation":300,"imageIndex":1},{"imageOffset":31644,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const)","symbolLocation":3996,"imageIndex":1},{"imageOffset":27580,"symbol":"dyld4::start(dyld4::KernelArgs, void, void)::$_0::operator()() const","symbolLocation":544,"imageIndex":1},{"imageOffset":24668,"symbol":"start","symbolLocation":2304,"imageIndex":1}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64", "base" : 4341743616, "CFBundleShortVersionString" : "2.5.3", "CFBundleIdentifier" : "jacklandrin.OnlySwitch", "size" : 5636096, "uuid" : "25a0983f-986f-3ad7-a7a1-36eda099c8ed", "path" : "\/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch", "name" : "OnlySwitch", "CFBundleVersion" : "195" }, { "source" : "P", "arch" : "arm64e", "base" : 6495850496, "size" : 531560, "uuid" : "5bc7265e-eca4-3e70-9f29-627735be878e", "path" : "\/usr\/lib\/dyld", "name" : "dyld" }, { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } ], "sharedCache" : { "base" : 6495043584, "size" : 4684873728, "uuid" : "7a0f4fec-286b-3758-94b9-475956285bbc" }, "vmSummary" : "ReadOnly portion of Libraries: Total=592.0M resident=0K(0%) swapped_out_or_unallocated=592.0M(100%)\nWritable regions: Total=8416K written=80K(1%) resident=80K(1%) swapped_out=0K(0%) unallocated=8336K(99%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8176K 1 \nVM_ALLOCATE 16K 1 \nDATA 395K 3 \n__DATA_CONST 296K 2 \nDATA_DIRTY 7K 1 \nLINKEDIT 586.1M 2 \nTEXT 6024K 2 \n__TPRO_CONST 272K 1 \nmapped file 416K 3 \npage table in kernel 80K 1 \nshared memory 32K 1 \n=========== ======= ======= \nTOTAL 657.5M 19 \n", "legacyInfo" : { "threadTriggered" : {

} }, "logWritingSignature" : "6671b76bc19431a6bfe24db97b024e72209fbaaf", "trialInfo" : { "rollouts" : [ { "rolloutId" : "654d8c0661e7447155256fcd", "factorPackIds" : { "SIRI_TEXT_TO_SPEECH" : "666c8cdad96ac33f5269b6a6" }, "deploymentId" : 250000119 }, { "rolloutId" : "654439cdafbf5b61207873a9", "factorPackIds" : {

  },
  "deploymentId" : 250000003
}

], "experiments" : [ { "treatmentId" : "d6b840d8-f46f-4545-9161-f6e8039c6c8e", "experimentId" : "6675f38a7c96b0789c9c5b58", "deploymentId" : 500000001 }, { "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8", "experimentId" : "6643969b3099cf28e049862f", "deploymentId" : 400000004 } ] } }

Model: MacBookAir10,1, BootROM 11881.0.193.501.1, proc 8:4:4 processors, 8 GB, SMC Graphics: Apple M1, Apple M1, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Memory Module: LPDDR4, Micron AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: May 21 2024 17:20:32 version 18.20.451.0.7.8.170 FWID 01-2d41f3bc IO80211_driverkit-1302.61 "IO80211_driverkit-1302.61" Jun 15 2024 00:21:01 AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Air, Apple Inc. Thunderbolt Bus: MacBook Air, Apple Inc.

veilofsecurity commented 2 months ago

Same issue as before: terminated at launch; ignore backtrace)"],"reasons":["_Symbol not found: DisplayServicesBrightnessChanged","Referenced from: <25A0983F-986F-3AD7-A7A1-36EDA099C8ED> \/Applications\/Only Switch.app\/Contents\/MacOS\/OnlySwitch","Expected in: \/System\/Library\/PrivateFrameworks\/DisplayServices.framework\/Versions\/A\/DisplayServices"]}

veilofsecurity commented 2 months ago

Was able to open in Xcode and debug. The issue is line 41 in DisplayManager. Comment out that line and build succeeds and OnlySwitch runs.

Additionally, I had to delete OnlySwitch from the /Applications as even with the line commented out, when I tried to open settings it was somehow launching that version instead of my debug version and crashing. After deleting 2.5.2 from Applications I was able to run and open settings.

I'm doing this on a Mac Studio with external non-Apple screens so I'm not sure if just commenting out the line lets screen dimming still function as line 40 appears to be a different DisplayServicesSetBrightness call that works and I don't get any crashes or errors with it enabled (just can't see if it actually does anything).

jacklandrin commented 2 months ago

@veilofsecurity Thank you for your solution! Can you please test my new beta again? https://github.com/jacklandrin/OnlySwitch/releases/tag/beta2_2.5.3

veilofsecurity commented 2 months ago

Worked for me. Was able to open settings and clicked through all menus with no crashing.

twinkpig commented 2 months ago

@veilofsecurity Thank you for your solution! Can you please test my new beta again? https://github.com/jacklandrin/OnlySwitch/releases/tag/beta2_2.5.3

Worked, thx.

jacklandrin commented 2 months ago

This crash was fixed in version 2.5.3

bxdcxdx commented 2 months ago

@jacklandrin Hi, I am experiencing the same issue with version 2.5.3 of OnlySwitch. I have installed it using the DMG file, but I cannot access the Preferences menu to switch any settings. I then completely deleted the application and reinstalled it using Homebrew, but this version does not allow me to open the windows to access the About information or any other menus.

I also restarted my laptop but still the same issue.

I have checked all permissions in Privacy & Security, and everything appears to be in order with nothing being disallowed.

Also i have no crash log file for today.

jacklandrin commented 2 months ago

Hi @bxdcxdx Thank you for the feedback. It sounds like another issue about the windows instead of crash. I upgraded macOS 15 beta2 on my intel laptop, but unfortunately, cannot reproduce your issue. May I confirm the Preferences menu you said indicate the below image?

Screenshot 2024-07-07 at 11 50 33
bxdcxdx commented 2 months ago

@jacklandrin Thank you for your response. I discovered that my issue was due to another menu bar management app named Ice, which hides the OnlySwitch icon by default. I initially thought that the Preferences and About windows would be displayed as separate windows rather than in the menu bar. I apologize for the confusion.

I appreciate your help!

Thank you!