Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Assertion failure in -[TestRunState beginTest:] with 0.2.7 #620

Closed
juliangrosshauser opened this issue Oct 28, 2015 · 3 comments
Closed

Comments

@juliangrosshauser
Copy link

I'm getting the following assertion failure with xctool 0.2.7:

2015-10-28 17:18:51.736 xctool[33584:89817] *** Assertion failure in -[TestRunState beginTest:], /tmp/xctool20151025-93446-4sacdx/xctool-0.2.7/xctool/xctool/TestRunState.m:112

2015-10-28 17:18:51.804 xctool[33584:89817] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't find test state for '-[ActionParserTests testRichMediaExecuteActions]', check senTestList'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8cb55e32 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff911474fa objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8cb5ab0a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff93e68e16 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   xctool                              0x00000001068e296d -[TestRunState beginTest:] + 473
    5   xctool                              0x00000001068e1e3a -[Reporter handleEvent:] + 1160
    6   xctool                              0x00000001068e1992 -[Reporter parseAndHandleEvent:] + 151
    7   xctool                              0x00000001068ef60a -[LineReader processBuffer] + 85
    8   xctool                              0x00000001068ef773 -[LineReader dataAvailableNotification:] + 100
    9   CoreFoundation                      0x00007fff8cae1c9c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    10  CoreFoundation                      0x00007fff8cae1c2f ___CFXRegistrationPost_block_invoke + 63
    11  CoreFoundation                      0x00007fff8cae1ba7 _CFXRegistrationPost + 407
    12  CoreFoundation                      0x00007fff8cae1912 ___CFXNotificationPost_block_invoke + 50
    13  CoreFoundation                      0x00007fff8ca9e6d2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
    14  CoreFoundation                      0x00007fff8ca9d925 _CFXNotificationPost + 693
    15  Foundation                          0x00007fff93d7e0fa -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    16  Foundation                          0x00007fff93e41c50 _performFileHandleSource + 1660
    17  CoreFoundation                      0x00007fff8caeb8b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    18  CoreFoundation                      0x00007fff8cacb0ac __CFRunLoopDoSources0 + 556
    19  CoreFoundation                      0x00007fff8caca5cf __CFRunLoopRun + 927
    20  CoreFoundation                      0x00007fff8cac9fc8 CFRunLoopRunSpecific + 296
    21  CoreFoundation                      0x00007fff8cb0b961 CFRunLoopRun + 97
    22  xctool                              0x00000001068fe89c +[SimulatorWrapper runHostAppTests:device:arguments:environment:feedOutputToBlock:error:] + 716
    23  xctool                              0x00000001068ebea5 -[OCUnitIOSAppTestRunner runTestsAndFeedOutputTo:startupError:otherErrors:] + 2282
    24  xctool                              0x00000001068ed95b -[OCUnitTestRunner runTests] + 209
    25  xctool                              0x00000001068fb957 __158-[RunTestsAction blockForTestable:focusedTestCases:allTestCases:testableExecutionInfo:testableTarget:isApplicationTest:arguments:environment:testRunnerClass:]_block_invoke + 335
    26  xctool                              0x00000001068fd6ad __56-[RunTestsAction runTestables:options:xcodeSubjectInfo:]_block_invoke433 + 336
    27  xctool                              0x00000001068fcded -[RunTestsAction runTestables:options:xcodeSubjectInfo:] + 5030
    28  xctool                              0x00000001068fadec -[RunTestsAction performActionWithOptions:xcodeSubjectInfo:] + 1874
    29  xctool                              0x0000000106910436 -[TestAction performActionWithOptions:xcodeSubjectInfo:] + 106
    30  xctool                              0x00000001068e5c2c -[XCTool run] + 3316
    31  xctool                              0x00000001068e4572 main + 1064
    32  xctool                              0x00000001068e1224 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException

-[ActionParserTests testRichMediaExecuteActions] is a C++ Google Test.
With 0.2.6 everything is working fine.

I'd love to share an example reproducing this issue, but the only code that's triggering the assertion failure I found so far is closed source. I'm investigating further, trying to find the commit between 0.2.6 and 0.2.7 that introduced this problem. I just wanted to share this stack trace first, in the hope of that it looks familiar to someone.

@ExtremeMan
Copy link
Contributor

Do you use https://github.com/mattstevens/xcode-googletest? If yes, checkout my PR: mattstevens/xcode-googletest#3.

@juliangrosshauser
Copy link
Author

That PR fixed my issue. Thank you very much!

@ExtremeMan
Copy link
Contributor

Thanks for letting me know that it helps!

We hit similar issue at Facebook and I was happy to share a fix ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants