Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when mocking Invert Colors status on iOS 17 simulator #193

Closed
NickEntin opened this issue Jan 24, 2024 · 1 comment · Fixed by #194
Closed

Crash when mocking Invert Colors status on iOS 17 simulator #193

NickEntin opened this issue Jan 24, 2024 · 1 comment · Fixed by #194
Labels
bug Something isn't working as expected P0: Urgent Issues that prevent the core functionality of the framework from be used.

Comments

@NickEntin
Copy link
Collaborator

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x1eac7c478)
  * frame #0: 0x0000000102504008 AccessibilitySnapshot`perform_rebinding_with_section(rebindings=0x00006000005b3c80, section=0x00000001905f0510, slide=0, symtab=0x00000002072a8b00, strtab="", indirect_symtab=0x00000002014e2630) at UIAccessibilityStatusUtility.m:209:49
    frame #1: 0x0000000102503ce0 AccessibilitySnapshot`rebind_symbols_for_image(rebindings=0x00006000005b3c80, header=0x00000001905f0000, slide=0) at UIAccessibilityStatusUtility.m:287:21
    frame #2: 0x0000000102503994 AccessibilitySnapshot`_rebind_symbols_for_image(header=0x00000001905f0000, slide=0) at UIAccessibilityStatusUtility.m:295:5
    frame #3: 0x00000001010c5664 dyld_sim`invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 260
    frame #4: 0x00000001010aa01c dyld_sim`dyld4::RuntimeLocks::withLoadersReadLock(void () block_pointer) + 68
    frame #5: 0x00000001010c52bc dyld_sim`dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 136
    frame #6: 0x00000001025035a8 AccessibilitySnapshot`rebind_symbols(rebindings=0x000000016ee8a340, rebindings_nel=1) at UIAccessibilityStatusUtility.m:306:9
    frame #7: 0x00000001025034f8 AccessibilitySnapshot`-[UIAccessibilityStatusUtility mockStatusForFunction:named:](self=0x0000600000034090, _cmd="mockStatusForFunction:named:", function=0x00000001847c739c, functionName="UIAccessibilityIsInvertColorsEnabled") at UIAccessibilityStatusUtility.m:93:5
    frame #8: 0x0000000102503420 AccessibilitySnapshot`-[UIAccessibilityStatusUtility mockInvertColorsStatus](self=0x0000600000034090, _cmd="mockInvertColorsStatus") at UIAccessibilityStatusUtility.m:78:5
    frame #9: 0x000000010252233c AccessibilitySnapshot`FBSnapshotTestCase.snapshotVerifyWithInvertedColors(view=0x000000014fe33940, identifier="", perPixelTolerance=0, overallTolerance=0, self=0x0000000102141520) at FBSnapshotTestCase+ObjCSupport.swift:135:23
    frame #10: 0x000000010252295c AccessibilitySnapshot`@objc FBSnapshotTestCase.snapshotVerifyWithInvertedColors(_:identifier:perPixelTolerance:overallTolerance:) at <compiler-generated>:0
    frame #11: 0x0000000102089368 SnapshotTests`-[ImpreciseObjectiveCTests testViewWithInvertedColors](self=0x0000000102141520, _cmd="testViewWithInvertedColors") at ImpreciseObjectiveCTests.m:89:5
    frame #12: 0x0000000180497750 CoreFoundation`__invoking___ + 144
    frame #13: 0x0000000180494ab4 CoreFoundation`-[NSInvocation invoke] + 276
    frame #14: 0x0000000101e2afa0 XCTestCore`+[XCTFailableInvocation invokeStandardConventionInvocation:completion:] + 64
    frame #15: 0x0000000101e2af58 XCTestCore`__90+[XCTFailableInvocation invokeInvocation:withTestMethodConvention:lastObservedErrorIssue:]_block_invoke_3 + 24
    frame #16: 0x0000000101e2a7d8 XCTestCore`__81+[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:]_block_invoke + 300
    frame #17: 0x0000000101ded9e4 XCTestCore`__49+[XCTSwiftErrorObservation observeErrorsInBlock:]_block_invoke + 28
    frame #18: 0x0000000101d476a8 libXCTestSwiftSupport.dylib`function signature specialization <Arg[5] = [Closure Propagated : reabstraction thunk helper from @callee_unowned @convention(block) () -> () to @escaping @callee_guaranteed () -> (), Argument Types : [@callee_unowned @convention(block) () -> ()]> of function signature specialization <Arg[2] = [Closure Propagated : closure #1 () -> () in static (extension in XCTest):__C.XCTSwiftErrorObservation.(_observeErrors in _B0397D3B80CBC8D7FB9A5B33AB2A74B8)(in: () -> ()) -> () -> Swift.Optional<XCTest.XCTIssue>, Argument Types : [@callee_guaranteed () -> ()]> of generic specialization <Swift.Optional<XCTest.ErrorTracker>, ()> of Swift.TaskLocal.withValue<τ_0_0>(_: τ_0_0, operation: () throws -> τ_1_0, file: Swift.String, line: Swift.UInt) throws -> τ_1_0 + 104
    frame #19: 0x0000000101d47598 libXCTestSwiftSupport.dylib`function signature specialization <Arg[0] = [Closure Propagated : reabstraction thunk helper from @callee_unowned @convention(block) () -> () to @escaping @callee_guaranteed () -> (), Argument Types : [@callee_unowned @convention(block) () -> ()]> of static __C.XCTSwiftErrorObservation._observeErrors(in: () -> ()) -> () -> Swift.Optional<XCTest.XCTIssue> + 360
    frame #20: 0x0000000101d4773c libXCTestSwiftSupport.dylib`@objc static __C.XCTSwiftErrorObservation._observeErrors(in: () -> ()) -> () -> Swift.Optional<XCTest.XCTIssue> + 48
    frame #21: 0x0000000101ded8e0 XCTestCore`+[XCTSwiftErrorObservation observeErrorsInBlock:] + 184
    frame #22: 0x0000000101e2a5b8 XCTestCore`+[XCTFailableInvocation invokeWithAsynchronousWait:lastObservedErrorIssue:block:] + 184
    frame #23: 0x0000000101e2aca8 XCTestCore`+[XCTFailableInvocation invokeInvocation:withTestMethodConvention:lastObservedErrorIssue:] + 432
    frame #24: 0x0000000101e2b02c XCTestCore`+[XCTFailableInvocation invokeInvocation:lastObservedErrorIssue:] + 68
    frame #25: 0x0000000101e1ecbc XCTestCore`__24-[XCTestCase invokeTest]_block_invoke.78 + 96
    frame #26: 0x0000000101de4ad4 XCTestCore`-[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 160
    frame #27: 0x0000000101e1e888 XCTestCore`-[XCTestCase invokeTest] + 668
    frame #28: 0x0000000101e200d0 XCTestCore`__26-[XCTestCase performTest:]_block_invoke.116 + 32
    frame #29: 0x0000000101de4ad4 XCTestCore`-[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 160
    frame #30: 0x0000000101e1fb94 XCTestCore`__26-[XCTestCase performTest:]_block_invoke.106 + 492
    frame #31: 0x0000000101e03244 XCTestCore`+[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
    frame #32: 0x0000000101e03144 XCTestCore`+[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100
    frame #33: 0x0000000101e1f640 XCTestCore`-[XCTestCase performTest:] + 248
    frame #34: 0x0000000101dd0a38 XCTestCore`-[XCTest runTest] + 44
    frame #35: 0x0000000101e061bc XCTestCore`-[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64
    frame #36: 0x0000000101e06088 XCTestCore`__27-[XCTestSuite performTest:]_block_invoke + 160
    frame #37: 0x0000000101e05b3c XCTestCore`__59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
    frame #38: 0x0000000101e03244 XCTestCore`+[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
    frame #39: 0x0000000101e03144 XCTestCore`+[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100
    frame #40: 0x0000000101e05ab8 XCTestCore`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 152
    frame #41: 0x0000000101e05d60 XCTestCore`-[XCTestSuite performTest:] + 192
    frame #42: 0x0000000101dd0a38 XCTestCore`-[XCTest runTest] + 44
    frame #43: 0x0000000101e061bc XCTestCore`-[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64
    frame #44: 0x0000000101e06088 XCTestCore`__27-[XCTestSuite performTest:]_block_invoke + 160
    frame #45: 0x0000000101e05b3c XCTestCore`__59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
    frame #46: 0x0000000101e03244 XCTestCore`+[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
    frame #47: 0x0000000101e03144 XCTestCore`+[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100
    frame #48: 0x0000000101e05ab8 XCTestCore`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 152
    frame #49: 0x0000000101e05d60 XCTestCore`-[XCTestSuite performTest:] + 192
    frame #50: 0x0000000101dd0a38 XCTestCore`-[XCTest runTest] + 44
    frame #51: 0x0000000101e061bc XCTestCore`-[XCTestSuite runTestBasedOnRepetitionPolicy:testRun:] + 64
    frame #52: 0x0000000101e06088 XCTestCore`__27-[XCTestSuite performTest:]_block_invoke + 160
    frame #53: 0x0000000101e05b3c XCTestCore`__59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
    frame #54: 0x0000000101e03244 XCTestCore`+[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
    frame #55: 0x0000000101e03144 XCTestCore`+[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100
    frame #56: 0x0000000101e05ab8 XCTestCore`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 152
    frame #57: 0x0000000101e05d60 XCTestCore`-[XCTestSuite performTest:] + 192
    frame #58: 0x0000000101dd0a38 XCTestCore`-[XCTest runTest] + 44
    frame #59: 0x0000000101dd2b88 XCTestCore`__89-[XCTTestRunSession executeTestsWithIdentifiers:skippingTestsWithIdentifiers:completion:]_block_invoke + 100
    frame #60: 0x0000000101e03244 XCTestCore`+[XCTContext _runInChildOfContext:forTestCase:markAsReportingBase:block:] + 172
    frame #61: 0x0000000101e03144 XCTestCore`+[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 100
    frame #62: 0x0000000101dd2a50 XCTestCore`-[XCTTestRunSession executeTestsWithIdentifiers:skippingTestsWithIdentifiers:completion:] + 252
    frame #63: 0x0000000101e3e44c XCTestCore`__72-[XCTExecutionWorker enqueueTestIdentifiersToRun:testIdentifiersToSkip:]_block_invoke_2 + 108
    frame #64: 0x0000000101e3e5ac XCTestCore`-[XCTExecutionWorker runWithError:] + 124
    frame #65: 0x0000000101dffcec XCTestCore`__25-[XCTestDriver _runTests]_block_invoke.183 + 52
    frame #66: 0x0000000101ddd094 XCTestCore`-[XCTestObservationCenter _observeTestExecutionForTestBundle:inBlock:] + 180
    frame #67: 0x0000000101dff784 XCTestCore`-[XCTestDriver _runTests] + 1024
    frame #68: 0x0000000101dd1014 XCTestCore`_XCTestMain + 88
    frame #69: 0x000000010167f27c libXCTestBundleInject.dylib`__RunTests_block_invoke_2 + 16
    frame #70: 0x00000001803f1ce0 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
    frame #71: 0x00000001803f1428 CoreFoundation`__CFRunLoopDoBlocks + 352
    frame #72: 0x00000001803ebccc CoreFoundation`__CFRunLoopRun + 788
    frame #73: 0x00000001803eb5a4 CoreFoundation`CFRunLoopRunSpecific + 572
    frame #74: 0x000000018e9fbae4 GraphicsServices`GSEventRunModal + 160
    frame #75: 0x00000001852f02e4 UIKitCore`-[UIApplication _run] + 868
    frame #76: 0x00000001852f3f5c UIKitCore`UIApplicationMain + 124
    frame #77: 0x0000000100f895c4 AccessibilitySnapshotDemo`main at AppDelegate.swift:20:7
    frame #78: 0x00000001010a5544 dyld_sim`start_sim + 20
    frame #79: 0x0000000101141f28 dyld`start + 2236
@NickEntin NickEntin added bug Something isn't working as expected P0: Urgent Issues that prevent the core functionality of the framework from be used. labels Jan 24, 2024
@NickEntin
Copy link
Collaborator Author

Looks like this might have been fixed in facebook/fishhook#87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected P0: Urgent Issues that prevent the core functionality of the framework from be used.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant