Posts

Post marked as solved
5 Replies
1.5k Views
Hi, I've seen a couple of crashes in iOS 15 that I've never seen before. From what I can tell it seems to be caused when a user pastes text from one application to another. Could somebody help me verify that: The crash is caused by pasting from another app. The crash is caused by an iOS defect and not a defect in my app. code-blockFatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x91cac __exceptionPreprocess 1 libobjc.A.dylib 0x14758 objc_exception_throw 2 Foundation 0x12361c _userInfoForFileAndLine 3 UIKitCore 0x10b6ffc -[_UITextKitTextPosition compare:] 4 UIKitCore 0x2065c -[UITextInputController comparePosition:toPosition:] 5 UIKitCore 0x10c1b5c -[UITextView comparePosition:toPosition:] 6 UIKitCore 0x108de4c -[UITextPasteController _clampRange:] 7 UIKitCore 0x108e5cc __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke 8 UIKitCore 0x108e7c8 __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke.174 9 UIKitCore 0x10b35e4 -[UITextInputController _pasteAttributedString:toRange:completion:] 10 UIKitCore 0x108e518 -[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:] 11 UIKitCore 0x108d820 __49-[UITextPasteController _executePasteForSession:]_block_invoke 12 libdispatch.dylib 0x632ec _dispatch_call_block_and_release 13 libdispatch.dylib 0x642f0 _dispatch_client_callout 14 libdispatch.dylib 0x109a0 _dispatch_main_queue_callback_4CF$VARIANT$mp 15 CoreFoundation 0x4d7f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 16 CoreFoundation 0xb0f8 __CFRunLoopRun 17 CoreFoundation 0x1dd8c CFRunLoopRunSpecific 18 GraphicsServices 0x19a0 GSEventRunModal 19 UIKitCore 0x4ee018 -[UIApplication _run] 20 UIKitCore 0x28229c UIApplicationMain 21 TOFS_AppStore 0x71b0 main + 18 (AppDelegate.swift:18) 22 ??? 0x1030f0190 (Missing)
Posted
by bduggan.
Last updated
.
Post not yet marked as solved
1 Replies
786 Views
I have asked a similar question https://stackoverflow.com/questions/57673551/what-exactly-is-gcd-overcommit-and-is-it-dangerous?noredirect=1#comment101796081_57673551I'm trying to understand what exactly an over commit queue is and if my code is dangerous because I'm seeing it referenced in my console.I started out wanting to create my thread with a run loop to do some experiments with realm and it's thread confinement.There's a nice example https://github.com/duemunk/ThreadIn my code I make use of__dispatch_queue_get_labelto print out the label of the queue I'm working on for debugging purposes.When ever I print this queue label from inside enqueuing on my custom thread it prints outcom.apple.root.default-qos.overcommitHere's a small example of my test codefunc currentQueueName() -> String? { let name = __dispatch_queue_get_label(nil) return String(cString: name, encoding: .utf8) } DispatchQueue.global().async { print(self.currentQueueName()) myThread.enqueue { print(self.currentQueueName()) //prints "com.apple.root.default-qos.overcommit" for i in 1...100 { print(i) } } }So my question really is, is my code safe?Is the overcommit queue just another normal type of queue in swift but one that is not managed directly by GCD?My (flakey)understanding of the over commit queue so far is that its a queue that doesn't try to limit the amount of threads spawned on it. Is that right?
Posted
by bduggan.
Last updated
.