Exception Handling

RSS for tag

Monitor and debug exceptional conditions in code using Exception Handling.

Exception Handling Documentation

Pinned Posts

Posts under Exception Handling tag

12 Posts
Sort by:
Post marked as solved
4 Replies
129 Views
class SecondViewController: UIViewController {     @IBOutlet weak var myNameTextField: UITextField!              @IBOutlet var myNameLabel: UIView!               override func viewDidLoad() {         super.viewDidLoad()         // Do any additional setup after loading the view.     }          @IBAction func onSubmitClick(_ sender: Any) {                  if(myNameTextField.text != ""){             myNameLabel.text=myNameTextField.text          }     }
Posted Last updated
.
Post not yet marked as solved
0 Replies
78 Views
General: DevForums tags: Debugging, LLDB, Graphical Debugger Xcode > Debugging documentation Diagnosing Memory, Thread, and Crash Issues Early documentation Diagnosing Issues Using Crash Reports and Device Logs documentation Choosing a Network Debugging Tool documentation What is an exception? DevForums post Standard Memory Debugging Tools DevForums post Posting a Crash Report DevForums post Implementing Your Own Crash Reporter DevForums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
Posted
by eskimo.
Last updated
.
Post not yet marked as solved
2 Replies
1.8k Views
After iOS 15 release, we seeing a lot NO_CRASH_STACK crashes from Xcode organizer with so many different crash stack. But look into the crash logs, we find some regular pattern: Most happens on old devices like iPhone 8.x or iPhone 9.x. Most of them happened in 10 seconds after launch. There is no crash reason in log. All crash code is 0x00. Most of them have "Kernel Triage: VM - Fault hit memory shortage" or "Kernel Triage: VM - Compressor failed a blocking pager_get". So I have no idea how to solve it because it looks like our app killed by system with some reason that not shown in log. I guess maybe is memory issue but I have no idea how to locate the problem logic or function in our code. I also posted a report: FB9816327 Does anyone get some issue? Is there any idea how I can locate the issue and fix these crashes? Here are some of the crash logs: 2021-12-14_18-37-39.7484_-0500-4682f855e1ea6f228c8c9b4fed485f7da408873b.crash 2021-12-14_18-49-23.9214_-0500-f7cbe972659e973071da1e83300c1b56cc7b2b8f.crash 2021-12-15_00-41-06.8845_+0100-2092455ce72e7244d3edc7320929f68144198d80.crash 2021-12-15_14-56-50.0465_-0500-baa010cb0afb8c6093500690e9c933aba56e9607.crash 2021-12-20_09-16-31.5066_+0800-045c2f4d3c9d100631312677fdb037543f9ca972.crash
Posted
by lei.
Last updated
.
Post not yet marked as solved
1 Replies
805 Views
Hello everyone. I have an issue with an iOS react-native app after the iOS 15 upgrade but with not a crash. If someone opens the app after ~1 hour from the last time he/she opened it, the app skips the SplashScreen, and after that nothing renders correctly. The positioning and order of components are wrong. also only happens in some devices like iPhone 12 pro max running 15.1.1  any help would be highly appreciated I'm counting on these forms other than that there is no way to debug such an issue or to put any log because even log will not identify issue
Posted Last updated
.
Post marked as solved
1 Replies
462 Views
I have this JSON-File coming from a MySQL-Database via PHP: [ { "id":1, "partner":{ "id":1, "name":"Migros Bank", "image":"migrosbank" }, "name":"Testkonto 1", "type":"bank", "iban":"CH12 1234 1234 1234 1234 1", "datapoints":[ { "id":1, "depot_id":1, "date":"2021-12-28", "amount":5811.490234375 }, { "id":2, "depot_id":1, "date":"2021-12-29", "amount":7736.89013671875 } ] }, { "id":2, "partner":{ "id":1, "name":"Migros Bank", "image":"migrosbank" }, "name":"Testkonto 2", "type":"bank", "iban":"CH12 1234 1234 1234 1234 2", "datapoints":[ { "id":3, "depot_id":2, "date":"2021-12-28", "amount":500 }, { "id":4, "depot_id":2, "date":"2021-12-29", "amount":1500 } ] } ] In SwiftUI I try to decode it to a custom struct called Depot which consists of one instance of the custom struct Partner and an array of Instances of the custom struct Depotstand: import Foundation import SwiftUI struct Partner: Hashable, Codable, Identifiable { var id: Int var name: String var image: String var imageName: Image { Image(image) } } struct Depotstand: Hashable, Codable, Identifiable { var id: Int var depot_id: Int var date: Date var amount: Double } struct Depot: Hashable, Codable, Identifiable { var id: Int var partner: Partner var name: String var type: String var iban: String var datapoints: [Depotstand] } I've added a data-model, to get the JSON-data from my webserver - this part works fine - and then I try to decode the data to the custom struct Depot, which fails (it works, if I simplify the JSON/struct to only the simple Depot struct without depending on Partner and Depotstand instances): import Foundation final class ModelDataDepot: ObservableObject { @Published var depots = [Depot]() init(){ let url = URL(string: "https://api.webcoders.ch/index.php")! URLSession.shared.dataTask(with: url) { (data, response, error) in do { if let data = data { let decodedData = try JSONDecoder().decode([Depot].self, from: data) DispatchQueue.main.async { self.depots = decodedData } } else { print("No Data!") } } catch { print("JSON-Error: \(error)") } }.resume() } } Here is the error I get which contains mainly data-type errors, but I have no idea to get around this: JSON-Error: typeMismatch(Swift.Double, Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "datapoints", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "date", intValue: nil)], debugDescription: "Expected to decode Double but found a string/data instead.", underlyingError: nil)) I've already tried some different data-casting, even using Numberformatters etc. but I can't get it to work... Thanks for helping me out! P.s: I am an absolute beginner to SwiftUI and mobile development in general... My coding background is mainly PHP, PowerShell and such, so please be patient with me. :-)
Posted Last updated
.
Post not yet marked as solved
8 Replies
3.5k Views
One of our customers provided us with stack log crash . The crash is coming from within the SDK. It seems that the crash start to happen on iOS 15. (We were unable to reproduce it on the simulator and haven't tried it on device yet) We would like to have more insights about the crash and its reason as according to the reference refernce there is no Termination Reason or Code. CrashLogObfuscated.txt
Posted Last updated
.
Post not yet marked as solved
0 Replies
305 Views
Hi everyone, I have an app that uses the front-facing TrueDepthCamera for functionality. I.e., taking a photo is essential for functionality. My problem, as quoted from App Store review team, is as follows: App crashed when we tapped to take a picture Review device details: Device type: iPad OS version: iOS 15.1 I have tested this app on iPhone 13, 12, and 11 successfully. I intended to make this an iPhone ONLY app (changed hardware requirements in info.plist. Didn't change target deployment info though... i.e. iPad still selected there). I have spent hours trying to figure out the following: is there any way to restrict an app to iPhone only for testing and publishing? I am a solo developer who has spent lots of time on trying to make this a reality, and am unfortunately stuck on this issue. All help is appreciated!
Posted
by jzooms.
Last updated
.
Post not yet marked as solved
1 Replies
495 Views
Our unity gaming apps were very stable on OS versions before 14.7.1, since this version release we are observing an increase in crashes due to memory availability or access file storage. We went through release notes of 14.7.1 & other latest iOS version and didn't found any thing which can cause these issues. The unusual thing is, the same app which was excellently performing on 14.6 started to give crashes on 14.7.1 and later versions. Is there anything i am missing with respect to any changes to make apps compatible with iOS version 14.7.1 and above. We use Unity to create gaming applications and apps group capabilities too.
Posted Last updated
.
Post not yet marked as solved
5 Replies
543 Views
Xcode12.5 These crashes mostly happened after app launch for several seconds on iOS14 Thread 0 Crashed: 0 libobjc.A.dylib 0x00000001a2ab7978 objc_msgSend + 24 1 UIKitCore 0x000000019113bea4 -[UIKeyboardImpl unmarkText:] + 200 2 UIKitCore 0x0000000191141eec __59-[UIKeyboardImpl handleAcceptedCandidate:executionContext:]_block_invoke_2 + 432 3 UIKitCore 0x0000000191174478 -[UIKeyboardTaskEntry execute:] + 184 4 UIKitCore 0x0000000191172f6c -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 320 5 UIKitCore 0x00000001911738d0 -[UIKeyboardTaskQueue waitUntilTaskIsFinished:] + 168 6 UIKitCore 0x00000001911739e4 -[UIKeyboardTaskQueue performSingleTask:] + 152 7 UIKitCore 0x000000019114e9c8 -[UIKeyboardImpl acceptCurrentCandidateForInput:] + 296 8 UIKitCore 0x0000000190fa3a44 -[UIKeyboardCandidateController candidateView:didAcceptCandidate:atIndexPath:inGridType:generateFeedback:] + 176 9 UIKitCore 0x0000000190fa396c -[UIKeyboardCandidateController candidateView:didAcceptCandidate:atIndexPath:inGridType:] + 96 10 TextInputUI 0x0000000196979c2c -[TUICandidateView candidateGrid:didAcceptCandidate:atIndexPath:] + 204 11 TextInputUI 0x0000000196992a58 -[TUICandidateGrid collectionView:didSelectItemAtIndexPath:] + 180 12 UIKitCore 0x0000000190a96104 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:deselectPrevious:performCustomSelectionAction:] + 896 13 UIKitCore 0x0000000190abfe7c -[UICollectionView touchesEnded:withEvent:] + 572 14 UIKitCore 0x0000000191392200 forwardTouchMethod + 340 15 UIKitCore 0x00000001913922fc -[UIResponder touchesEnded:withEvent:] + 60 16 UIKitCore 0x0000000191392200 forwardTouchMethod + 340 17 UIKitCore 0x00000001913922fc -[UIResponder touchesEnded:withEvent:] + 60 18 UIKitCore 0x0000000191392200 forwardTouchMethod + 340 19 UIKitCore 0x00000001913922fc -[UIResponder touchesEnded:withEvent:] + 60 20 UIKitCore 0x00000001913a0c04 -[UIWindow _sendTouchesForEvent:] + 984 21 UIKitCore 0x00000001913a256c -[UIWindow sendEvent:] + 3972 22 UIKitCore 0x000000019137c190 -[UIApplication sendEvent:] + 708 23 UIKitCore 0x0000000191403560 __dispatchPreprocessedEventFromEventQueue + 7356 24 UIKitCore 0x00000001914064b8 __processEventQueue + 6456 25 UIKitCore 0x00000001913fda3c __eventFetcherSourceCallback + 156 26 CoreFoundation 0x000000018e9bf81c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 27 CoreFoundation 0x000000018e9bf718 __CFRunLoopDoSource0 + 204 28 CoreFoundation 0x000000018e9bea28 __CFRunLoopDoSources0 + 264 29 CoreFoundation 0x000000018e9b8d20 __CFRunLoopRun + 820 30 CoreFoundation 0x000000018e9b84bc CFRunLoopRunSpecific + 596 31 GraphicsServices 0x00000001a543d820 GSEventRunModal + 160 32 UIKitCore 0x000000019135c734 -[UIApplication _run] + 1068 33 UIKitCore 0x0000000191361e10 UIApplicationMain + 164 34 sohuhy 0x0000000103892b88 main (main.m:14) 35 libdyld.dylib 0x000000018e67fe60 start + 0 My question is How to location this crash call stack in App Source Code?
Posted
by hong290.
Last updated
.
Post not yet marked as solved
0 Replies
801 Views
Our Xamarin iPhone App works great on local emulators and local phone devices for both Debug AND Release configurations. When deployed to Testlfight and downloaded on iPhone device, the app immediately crashes. Crash log (attached) shows a generic exception: Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4373528576 Was also able to generate run logs (attached) for iOS 14 and 15 but I don't see anything helpful. iOS 15 log does show this, which might be relevant but I don't see an entitlement that matches. Error getting value for entitlement 'com.apple.private.dt.xctest.internal-client': Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" PC Visual Studio version 16.1.1.5 Xamarin 16.11.0.17 Xamarin.ios 15.0.0.8 Mac Xamarin.iOS version 15.0.0.8 Linker Behavior is "Link Framework SDKs Only" (If I try to use "Don't Link" I get a native linking error) NuGet packages installed: Newtonsoft.Json (13.0.1) sqlite-net-pcl (1.8.116) Xam.Plugins.Settings (3.1.1) Xamarin.Auth (1.7.0) Xamarin.Essentials (1.7.0) Xamarin.Forms (5.0.0.2125) Obviously have googled as much as I could but haven't found any solutions. Would really appreciate any and all suggestions - thank you so much! ios 15 error log.txt ios 14 error log.txt crashlog.crash
Posted
by Mmendelow.
Last updated
.
Post not yet marked as solved
5 Replies
906 Views
Hi, I am creating an example app to demonstrate the integration of our text to speech (university research) C++ api. This app is specifically for iOS using swift/swiftui. The C++ api makes use of exceptions when things are not as it wants it - yep, it basically sits down and sulks ! At this stage, I cannot change that. My research has done no more than confuse me as to if I can catch any C++ exception from within swift. I am not interested in backtraces, just being able to access the reason for the exception (std::exception.what()). Can this be done ? If so, how, please ?
Posted Last updated
.
Post marked as solved
2 Replies
652 Views
Could someone help me with a good direction on where or how could I start debugging for this: Incident Identifier: 3743F085-71E0-4B60-B9D8-A96984C3F1E0 CrashReporter Key: C9383FFF-4F94-8C39-442A-EB09860CA71C Hardware Model: MacBookAir10,1 Process: IBAgent-iOS [52244] Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS Identifier: com.apple.dt.Xcode Version: 12.5.1 (18212) Code Type: X86-64 (Native) Role: Unspecified Parent Process: ibtoold [52179] Coalition: com.apple.dt.Xcode [2177] Responsible Process: Xcode [52141] Date/Time: 2021-07-19 11:02:47.9410 +0530 Launch Time: 2021-07-19 11:02:47.7783 +0530 OS Version: macOS 12.0 (21A5268h) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4308725760 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> mapped file 100d1f000-100d23000 [ 16K] r-x/r-x SM=COW ...t_id=80c8ed4b Exception Note: EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [52244] Triggered by Thread: 0 Application Specific Information: Thread 0 Crashed: 0 ??? 0x7ff7ffda7118 ??? 1 <translation info unavailable> 0x100d4ea44 ??? 2 dyld 0x20101fa32 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 890 3 dyld 0x20101e6b5 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244 4 dyld 0x20101e4b4 start + 388 5 dyld 0x201019000 ??? Thread 1:: com.apple.rosetta.exceptionserver 0 ??? 0x7ff7ffd94984 ??? 1 ??? 0x7ff7ffdac320 ??? Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000108da6af8 rcx: 0x0000000000000000 rdx: 0x0000000000000001 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x0000000109443000 r8: 0x0cbcc942c48900ff r9: 0x0000000000000000 r10: 0x0000000109443000 r11: 0x0000000109267010 r12: 0x0000000000000000 r13: 0x0000000109267060 r14: 0x000000020108d080 r15: 0x0000000000000000 rip: <unavailable> rfl: 0x0000000000000283 tmp0: 0x0000000100d3dd98 tmp1: 0x0000000100d3d090 tmp2: 0x0000000201038a13 Binary Images: 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? 0x201019000 - 0x201080fff dyld (*) <1051784a-31a4-3307-b922-6e65e511ff69> /usr/lib/dyld EOF
Posted Last updated
.