Post

Replies

Boosts

Views

Activity

Reply to What does Arg[0] = Dead in a UICollectionViewDataSource crash mean?
But why would a Dead argument cause a crash? The didSelectItemAt would look like this: class CollectionViewDataSource: NSObject, UICollectionViewDelegate, UICollectionViewDataSource { var sectionAHandler: (() -> Void)? var sectionBandler: ((URL) -> Void)? … public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { guard let section = Section(rawValue: indexPath.section), let item = self.item else { return } switch section { case .sectionA: sectionAHandler?() case .sectionB: if case .someEnum(let url) = item.urlKind { sectionBHandler?(url) } } } … } I try to resolve an enum defining the available sections, check if some item is available and if that is case, I switch on the section enum and call some function if available.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’22
Reply to What does Arg[0] = Dead in a UICollectionViewDataSource crash mean?
Yes, I have the full crash log at hand. The crashed thread looks like this: Exception Type: SIGTRAP Exception Codes: TRAP_BRKPT at 0x102f59f38 Crashed Thread: 0 Thread 0 Crashed: 0 MyApp 0x0000000102f59f38 function signature specialization <Arg[0] = Dead> of MyApp.MyDataSource.collectionView(_: __C.UICollectionView, didSelectItemAt: Foundation.IndexPath) -> () (<compiler-generated>:0) 1 MyApp 0x0000000102f59258 @objc MyApp.MyDataSource.collectionView(_: __C.UICollectionView, didSelectItemAt: Foundation.IndexPath) -> () (<compiler-generated>:0) 2 UIKitCore 0x0000000183ab06e8 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:deselectPrevious:performCustomSelectionAction:] + 896 3 UIKitCore 0x0000000183e4a300 -[UICollectionView touchesEnded:withEvent:] + 612 4 UIKitCore 0x00000001839940f8 forwardTouchMethod + 340 5 UIKitCore 0x00000001839940f8 forwardTouchMethod + 340 6 UIKitCore 0x00000001839940f8 forwardTouchMethod + 340 7 UIKitCore 0x0000000183903574 _UIGestureEnvironmentUpdate + 6704 8 UIKitCore 0x00000001839360b0 -[UIGestureEnvironment _updateForEvent:window:] + 780 9 UIKitCore 0x0000000183943250 -[UIWindow sendEvent:] + 4424 10 UIKitCore 0x0000000183af3918 -[UIApplication sendEvent:] + 824 11 UIKitCore 0x0000000183916464 __dispatchPreprocessedEventFromEventQueue + 7900 12 UIKitCore 0x000000018390b250 __processEventQueue + 6756 13 UIKitCore 0x00000001839106fc __eventFetcherSourceCallback + 168 14 CoreFoundation 0x00000001813b30d0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 15 CoreFoundation 0x00000001813c3d90 __CFRunLoopDoSource0 + 204 16 CoreFoundation 0x00000001812fe098 __CFRunLoopDoSources0 + 264 17 CoreFoundation 0x00000001813038a4 __CFRunLoopRun + 816 18 CoreFoundation 0x0000000181317468 CFRunLoopRunSpecific + 596 19 GraphicsServices 0x000000019cea338c GSEventRunModal + 160 20 UIKitCore 0x0000000183cb9088 -[UIApplication _run] + 1096 21 UIKitCore 0x0000000183a37958 UIApplicationMain + 2088 22 MyApp 0x0000000102ea2870 main (MyAppDelegate.swift:15) 23 ??? 0x0000000103885aa4 0x0 + 0 Thread 1: 0 libsystem_kernel.dylib 0x00000001b88c5504 mach_msg_trap + 8 1 CoreFoundation 0x00000001812ff738 __CFRunLoopServiceMachPort + 368 2 CoreFoundation 0x0000000181303a2c __CFRunLoopRun + 1208 3 CoreFoundation 0x0000000181317468 CFRunLoopRunSpecific + 596 4 Foundation 0x0000000182b33c94 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 5 Foundation 0x0000000182b74dc8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 6 UIKitCore 0x0000000183c32230 -[UIEventFetcher threadMain] + 520 7 Foundation 0x0000000182b8340c __NSThread__start__ + 804 8 libsystem_pthread.dylib 0x00000001f1d639a4 _pthread_start + 144 9 libsystem_pthread.dylib 0x00000001f1d62ea0 thread_start + 4 Thread 2: … Thread 3: … Thread 4: … Thread 5: … Thread 0 crashed with arm64 Thread State: x21: 0x40000002826da4c0 x2: 0x0000000000000001 x16: 0x0000000185a20ea8 x3: 0x0000000150928fa0 x22: 0x0000000103fa2aa8 x4: 0x0000000000000280 x17: 0x04f80001dbbb7688 cpsr: 0x0000000020000000 x5: 0x0000000150928fa0 x23: 0x00000001509285d0 x6: 0x0000000000000029 x18: 0x000000015500b940 x10: 0x00000000000d9f00 lr: 0x0000000102f59cc0 x7: 0x0000000000000001 x24: 0xc000000000000024 x11: 0x0000000000179f41 x8: 0x0000000000000003 x19: 0x00000002826c3780 x25: 0x000000016cf605d0 x9: 0x0000000000000005 x12: 0x00000000000030ef fp: 0x000000016cf605c0 x26: 0x000000016cf60080 x13: 0x00000000c7700670 pc: 0x0000000102f59f38 x27: 0x000000016cf60150 x14: 0x00000001041a4b60 x20: 0x000000016cf605d0 x0: 0x0000000000000005 sp: 0x000000016cf60080 x28: 0x0000000103fa2fc0 x15: 0x00000000c7700675 x1: 0x0000000000000005 And yes, it seems as if something gets deallocated faster than some other code would expect it to be gone. At least that's my assumption now.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’22
Reply to Problems installing iOS 18.4 SDK on Intel iMac
If I try to remove that "unknown Platform Simulator" in Xcode, I get this error message: Unable to remove SimulatorRuntime Domain: com.apple.DVTFoundation Code: -1 User Info: { DVTErrorCreationDateKey = "2025-04-05 12:46:30 +0000"; } -- Unable to remove SimulatorRuntime Domain: com.apple.DVTFoundation Code: -1 -- SimulatorInfo is missing RuntimeInfo for <DVTSimulatorInfo> { | identifier: 7E6FC6E4-F04C-4F98-BA77-AAD62F4CB8B5 | kind: 3 | sizeInBytes: 8825558354 | lastUsedAt: (null) | state: 4 | stateDisplayString: Unusable | canDelete: 1 | unusableStateError: Error Domain=SimDiskImageErrorDomain Code=5 "(-67061 invalid signature (code or signature have been modified)" UserInfo={NSLocalizedDescription=(-67061 invalid signature (code or signature have been modified), unusableErrorDetail=} | userInfo: { DVTDownloadableIdentifier = "com.apple.dmg.iPhoneSimulatorSDK18_4"; DVTDownloadableOperationUniqueIdentifier = "5E937CD3-1EDD-4789-B6CC-3D427A6D4DDD-5843-0000029B5534E7EF"; DVTDownloadablePlatformIdentifier = "com.apple.platform.iphoneos"; } | runtimeInfo: (null) | imageURL.path: /Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-C1F1888C-8630-4D4F-8032-3F41EF54AE6B/Restore/090-44334-323.dmg | parentImageURL.path: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/6fb1e5fe25ee1c372f7116516e615c556906bd4e.asset/AssetData/090-44150-318.dmg } Domain: DVTFoundation.DVTDownloadableManagerErrors Code: 0 -- System Information macOS Version 15.4 (Build 24E248) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-04-05T14:46:30+02:00 I tried to delete the file at "/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime" - but the system wouldn't let me, even a sudo wouldn't help.
Apr ’25
Reply to Problems installing iOS 18.4 SDK on Intel iMac
I've run the commands you mentioned and run them in order to demonstrate my problem: $ xcrun simctl runtime list == Disk Images == -- tvOS -- tvOS 18.4 (22L254) - C5A9C190-ABF9-4949-9112-D063E82ECA5B (Ready) -- watchOS -- watchOS 11.4 (22T250) - EB2C6365-BB36-4E19-99C2-0CE20CDD3C96 (Ready) Total Disk Images: 2 (8.5G) $ xcodebuild -downloadPlatform iOS Downloading iOS 18.4 Simulator (22E238): Preparing to download...2025-04-11 08:07:03.506 xcodebuild[4333:39611] DVTDownloadable: Observed finish. Cancelling download asset. { assetId = 6fb1e5fe25ee1c372f7116516e615c556906bd4e; assetIdHash = 9d684dee0a7bae81ba9c4f79475976f41789eaf3; assetType = "com.apple.MobileAsset.iOSSimulatorRuntime"; attributesHash = 99e0653b3c175e32d4a045cb9be856573b2938c1; contentHash = d4aad730490a4476d8179d4cdb7c1fcae8dd388a; nonIdHash = be7dd5950580ff7c8e1f822b24bd76d58c08b8aa; pallasDynamicAssetIdHash = d7904ac1d93cc3702244074c49aafad923a6e2b4; policyHash = d3700ca0e5058eb1d7b21fd74b1c225a66f5e74e; urlHash = fc93246f74e44ae2b94a727bfd9bac228f69f961; }, error: (null) Downloading iOS 18.4 Simulator (22E238): Error: Error Domain=SimDiskImageErrorDomain Code=5 "(-67061 invalid signature (code or signature have been modified)" UserInfo={NSLocalizedDescription=(-67061 invalid signature (code or signature have been modified), unusableErrorDetail=} $ xcrun simctl runtime list == Disk Images == -- tvOS -- tvOS 18.4 (22L254) - C5A9C190-ABF9-4949-9112-D063E82ECA5B (Ready) -- watchOS -- watchOS 11.4 (22T250) - EB2C6365-BB36-4E19-99C2-0CE20CDD3C96 (Ready) -- unknown -- <unknown platform> - 4C2932FD-404F-49EA-B8F4-9ED904C97F4E (Unusable - Other Failure: (-67061 invalid signature (code or signature have been modified)) Total Disk Images: 3 (16.7G) $ xcrun simctl runtime delete 4C2932FD-404F-49EA-B8F4-9ED904C97F4E $ xcrun simctl runtime list == Disk Images == -- tvOS -- tvOS 18.4 (22L254) - C5A9C190-ABF9-4949-9112-D063E82ECA5B (Ready) -- watchOS -- watchOS 11.4 (22T250) - EB2C6365-BB36-4E19-99C2-0CE20CDD3C96 (Ready) Total Disk Images: 2 (8.5G) $ xcodebuild -downloadPlatform iOS Downloading iOS 18.4 Simulator (22E238): Preparing to download...2025-04-11 08:11:02.639 xcodebuild[4563:45093] DVTDownloadable: Observed finish. Cancelling download asset. { assetId = 6fb1e5fe25ee1c372f7116516e615c556906bd4e; assetIdHash = 9d684dee0a7bae81ba9c4f79475976f41789eaf3; assetType = "com.apple.MobileAsset.iOSSimulatorRuntime"; attributesHash = 99e0653b3c175e32d4a045cb9be856573b2938c1; contentHash = d4aad730490a4476d8179d4cdb7c1fcae8dd388a; nonIdHash = be7dd5950580ff7c8e1f822b24bd76d58c08b8aa; pallasDynamicAssetIdHash = d7904ac1d93cc3702244074c49aafad923a6e2b4; policyHash = d3700ca0e5058eb1d7b21fd74b1c225a66f5e74e; urlHash = fc93246f74e44ae2b94a727bfd9bac228f69f961; }, error: (null) Downloading iOS 18.4 Simulator (22E238): Error: Error Domain=SimDiskImageErrorDomain Code=5 "(-67061 invalid signature (code or signature have been modified)" UserInfo={NSLocalizedDescription=(-67061 invalid signature (code or signature have been modified), unusableErrorDetail=} However, in the end, the installation always fails … Christian
Apr ’25
Reply to Problems installing iOS 18.4 SDK on Intel iMac
I found a workaround to get the runtime installed on my iMac. Using a second computer which had the runtime installed, I executed the following command: $ xcodebuild -downloadPlatform iOS -exportPath . Finding content...All available platforms are downloaded Exported 'com.apple.CoreSimulator.SimRuntime.iOS-18-4' to /Users/cmittendorf/Desktop/iphonesimulator_18.4_22E238.dmg The DMG file was copied over to my iMac and then installed using: $ xcrun simctl runtime add iphonesimulator_18.4_22E238.dmg C: F5BC51BD-6280-42AE-B85B-7FA96C6C5C4A iOS (18.4 - 22E238) (Ready)
Apr ’25