Exception Handling

RSS for tag

Monitor and debug exceptional conditions in code using Exception Handling.

Posts under Exception Handling tag

25 Posts

Post

Replies

Boosts

Views

Activity

No reason crash on iOS 15 EXC_CRASH (SIGKILL)
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
6
0
5.7k
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
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
1
0
2.8k
Jan ’22
Decoding JSON coming from MySQL via PHP to a complex Struct in SwiftUI
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. :-)
1
0
2.7k
Jan ’22
Crash in ios15 EXC_CRASH (SIGKILL)
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
8
0
10k
Dec ’21
App Keeps Crashing on iPAD - App Store Review
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!
3
0
1.2k
Nov ’21
No reason crash on iOS 15 EXC_CRASH (SIGKILL)
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
Replies
6
Boosts
0
Views
5.7k
Activity
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
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
Replies
1
Boosts
0
Views
2.8k
Activity
Jan ’22
Decoding JSON coming from MySQL via PHP to a complex Struct in SwiftUI
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. :-)
Replies
1
Boosts
0
Views
2.7k
Activity
Jan ’22
Crash in ios15 EXC_CRASH (SIGKILL)
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
Replies
8
Boosts
0
Views
10k
Activity
Dec ’21
App Keeps Crashing on iPAD - App Store Review
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!
Replies
3
Boosts
0
Views
1.2k
Activity
Nov ’21