Skip to content

Commit

Permalink
Fixed failing crash report test after removing mach diagnosis collect…
Browse files Browse the repository at this point in the history
…ion (#274)
  • Loading branch information
matux authored Mar 28, 2023
1 parent cb70967 commit 6e895bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Thread 0 Crashed:
3 libswiftCore.dylib 0x000000018bd55564 _assertionFailure(_:_:file:line:flags:) + 228
4 libswiftCore.dylib 0x000000018bd36eb8 _ArrayBuffer._checkInoutAndNativeTypeCheckedBounds(_:wasNativeTypeChecked:) + 276
5 libswiftCore.dylib 0x000000018bd3abf0 Array.subscript.getter + 84
6 iosAppSwift 0x0000000104733590 Example.outOfBounds() + 72
7 iosAppSwift 0x000000010473353c $s11iosAppSwift11ContentViewV4bodyQrvg0C2UI05TupleE0VyAE0E0PAEE7paddingyQrAE4EdgeO3SetV_12CoreGraphics7CGFloatVSgtFQOyAE4TextV_Qo__AE6VStackVyAGyAiEEAJyQrAN_ARtFQOyAC6button_6actionQrSS_yyctFQOy_Qo__Qo__AE5GroupVyAGyAZ_AZA_tGGA1_yAGyAZ_A_tGGA3_A5_A1_yAGyAZ_A2ZtGGtGGtGyXEfU_A8_yXEfU_A2_yXEfU1_yycAA7ExampleVcfu_yycfu0_ + 28
6 iosAppSwift 0x0000000104733590 0x010472c000 + 30096
7 iosAppSwift 0x000000010473353c 0x010472c000 + 30012
8 SwiftUI 0x0000000109acfa18 __swift_memcpy3_1 + 8096
9 SwiftUI 0x0000000109ad02a0 __swift_memcpy3_1 + 10280
10 SwiftUI 0x0000000109ad0210 __swift_memcpy3_1 + 10136
Expand Down Expand Up @@ -92,8 +92,8 @@ Thread 0 Crashed:
38 SwiftUI 0x000000010a4490d4 OUTLINED_FUNCTION_51 + 496
39 SwiftUI 0x000000010a448f7c OUTLINED_FUNCTION_51 + 152
40 SwiftUI 0x0000000109baeb60 OUTLINED_FUNCTION_10 + 88
41 iosAppSwift 0x000000010473d638 static iosAppSwiftApp.$main() + 40
42 iosAppSwift 0x000000010473e484 main + 12
41 iosAppSwift 0x000000010473d638 0x010472c000 + 71224
42 iosAppSwift 0x000000010473e484 0x010472c000 + 74884
43 ? 0x0000000104a79fa0 ? + 4373061536
44 ? 0x0000000104b5de50 ? + 4373995088

Expand Down Expand Up @@ -140,7 +140,7 @@ Thread 8:
0 libsystem_kernel.dylib 0x00000001b05455e0 __semwait_signal + 8
1 libsystem_c.dylib 0x0000000180127050 nanosleep + 216
2 libsystem_c.dylib 0x0000000180126e4c sleep + 48
3 iosAppSwift 0x00000001047a4788 monitorCachedData + 128
3 iosAppSwift 0x00000001047a4788 0x010472c000 + 493448
4 libsystem_pthread.dylib 0x00000001b059e4e4 _pthread_start + 116

Thread 9 name: KSCrash Exception Handler (Secondary)
Expand All @@ -149,7 +149,7 @@ Thread 9:
1 libsystem_kernel.dylib 0x00000001b0553154 mach_msg2_internal + 76
2 libsystem_kernel.dylib 0x00000001b054a4b8 mach_msg_overwrite + 536
3 libsystem_kernel.dylib 0x00000001b054261c mach_msg + 20
4 iosAppSwift 0x00000001047b11b8 handleExceptions + 184
4 iosAppSwift 0x00000001047b11b8 0x010472c000 + 545208
5 libsystem_pthread.dylib 0x00000001b059e4e4 _pthread_start + 116

Thread 10 name: KSCrash Exception Handler (Primary)
Expand All @@ -166,7 +166,7 @@ Thread 11:
5 CoreFoundation 0x000000018036d03c __CFRunLoopRun + 1152
6 CoreFoundation 0x000000018036c7a4 CFRunLoopRunSpecific + 584
7 Foundation 0x0000000180bcf02c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208
8 iosAppSwift 0x00000001047650c4 -[RollbarThread run] + 316
8 iosAppSwift 0x00000001047650c4 0x010472c000 + 233668
9 Foundation 0x0000000180bf4a10 __NSThread__start__ + 704
10 libsystem_pthread.dylib 0x00000001b059e4e4 _pthread_start + 116

Expand Down Expand Up @@ -711,4 +711,4 @@ Binary Images:
0x01b05a7000 - 0x01b05aaffb libsystem_sim_platform.dylib arm64 <72646f55234832fd8054c975f7f896ac> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_sim_platform.dylib
0x01b05ab000 - 0x01b05abfff libsystem_sim_platform_host.dylib arm64 <9907e3c864183cfea0d4636b318ccde7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_sim_platform_host.dylib
0x01b05ac000 - 0x01b05acffb libsystem_sim_pthread.dylib arm64 <89ed25512cd13018952a00a7703e5925> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_sim_pthread.dylib
0x01b05ad000 - 0x01b05adfff libsystem_sim_pthread_host.dylib arm64 <2544ef58c14d30b1a9fcce9d35e10cb0> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_sim_pthread_host.dylib
0x01b05ad000 - 0x01b05adfff libsystem_sim_pthread_host.dylib arm64 <2544ef58c14d30b1a9fcce9d35e10cb0> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_sim_pthread_host.dylib
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ final class RollbarCrashReportTests: XCTestCase {
}

XCTAssertEqual(report.crash.diagnosis, "Fatal error: Unexpectedly found nil while unwrapping an Optional value (iosAppSwift/ContentView.swift:117)")
XCTAssertEqual(report.crash.diagnostics.count, 3)
XCTAssertEqual(report.crash.diagnostics.count, 1)
XCTAssertEqual(report.crash.diagnostics[0].source, "libswiftCore.dylib")
XCTAssertEqual(report.crash.diagnostics[1].source, "Exception Type")
XCTAssertEqual(report.crash.diagnostics[2].source, "Exception Subtype")
XCTAssertEqual(report.crash.diagnostics[0].diagnosis, "Fatal error: Unexpectedly found nil while unwrapping an Optional value (iosAppSwift/ContentView.swift:117)")
XCTAssertEqual(report.crash.diagnostics[1].diagnosis, "EXC_BREAKPOINT (SIGTRAP)")
XCTAssertEqual(report.crash.diagnostics[2].diagnosis, "KERN_INVALID_ADDRESS at 0x000000018b87eac4")
}
}

Expand All @@ -43,7 +39,7 @@ final class RollbarCrashReportTests: XCTestCase {

let expectReport = Bundle.module
.url(forResource: "report.crash", withExtension: .none)
.flatMap { try? String(contentsOf: $0) }
.flatMap { try! String(contentsOf: $0) }

XCTAssertNotNil(diagnosedCrash)
XCTAssertNotNil(expectReport)
Expand All @@ -56,7 +52,7 @@ final class RollbarCrashReportTests: XCTestCase {
XCTAssertNotNil(reports?.first as? String)
XCTAssertEqual(reports?.count, 1)

guard let report = reports?.first as? String, let expectReport = expectReport else {
guard let report = reports?.first as? String, let expectReport else {
return XCTFail()
}

Expand Down

0 comments on commit 6e895bf

Please sign in to comment.