I've been randomly running into this error when I use Testing
in Xcode. I've only encountered it in this current project, but I cannot fathom anything that is special or different about this project than usual. I'm pretty sure this falls more under bug report than asking for help.
Thread 7: Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: nil in test BigRationalModuleTests.InternalTests/floorDivision(args:)/InternalTests.swift:6:3
It seems to rear its head when I use @Test(arguments: [...])
, and stop when I remove the arguments. It also crashes more often on some tests than others. I can determine no pattern.
I've not been able to replicate in the command line, only in Xcode (Version 16.0 (16A242d)), but I also haven't found a way to run tests on repeat with swift test
either.
Here's the test code, console output, and a backtrace:
test code:
struct InternalTests {
@Test(arguments: [
(1, 2, 0),
(2, 2, 1),
(2, 1, 2),
(-1, 2, -1),
(-2, 2, -1),
(-2, 1, -2),
(1, -2, -1),
(2, -2, -1),
(2, -1, -2),
(-1, -2, 0),
(-2, -2, 1),
(-2, -1, 2),
(0, 1, 0),
(0, -1, 0),
(3, 4, 0),
(4, 4, 1),
(4, 3, 1),
(-3, 4, -1),
(-4, 4, -1),
(-4, 3, -2),
(3, -4, -1),
(4, -4, -1),
(4, -3, -2),
(-3, -4, 0),
(-4, -4, 1),
(-4, -3, 1),
(1, 4, 0),
(4, 4, 1),
(4, 1, 4),
(-1, 4, -1),
(-4, 4, -1),
(-4, 1, -4),
(1, -4, -1),
(4, -4, -1),
(4, -1, -4),
(-1, -4, 0),
(-4, -4, 1),
(-4, -1, 4),
])
func floorDivision(args: (a: Int, b: Int, expectation: Int)) throws {
let (a, b, expectation) = args
#expect(BigRationalModule.floorDivision(a, b) == expectation)
}
}
console output:
τ Iteration 5 started.
τ Suite InternalTests started.
τ Test floorDivision(args:) started.
τ Passing 1 argument args β (1, 2, 0) to floorDivision(args:)
τ Passing 1 argument args β (-1, 2, -1) to floorDivision(args:)
τ Passing 1 argument args β (2, 2, 1) to floorDivision(args:)
βτ Passing 1 argument args β (-2, 1, -2) to floorDivision(args:)
τ Passing 1 argument args β (1, -2, -1) to floorDivision(args:)
XCTest/HarnessEventHandler.swift:282: Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: nil in test BigRationalModuleTests.InternalTests/floorDivision(args:)/InternalTests.swift:6:3
τ Passing 1 argument args β (2, 1, 2) to floorDivision(args:)
τ Passing 1 argument args β (-2, 2, -1) to floorDivision(args:)
βτ Passing 1 argument args β (2, -2, -1) to floorDivision(args:)
βτ Passing 1 argument args β (2, -1, -2) to floorDivision(args:)
ββββτ Passing 1 argument args β (-2, -2, 1) to floorDivision(args:)
τ Passing 1 argument args β (-2, -1, 2) to floorDivision(args:)
τ Passing 1 argument args β (0, 1, 0) to floorDivision(args:)
τ Passing 1 argument args β (-1, -2, 0) to floorDivision(args:)
τ Passing 1 argument args β (0, -1, 0) to floorDivision(args:)
ββτ Passing 1 argument args β (3, 4, 0) to floorDivision(args:)
βββτ Passing 1 argument args β (4, 3, 1) to floorDivision(args:)
τ Passing 1 argument args β (-4, 4, -1) to floorDivision(args:)
τ Passing 1 argument args β (-3, 4, -1) to floorDivision(args:)
βτ Passing 1 argument args β (4, 4, 1) to floorDivision(args:)
and the backtrace:
(lldb) bt
* thread #10, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: nil in test BigRationalModuleTests.InternalTests/floorDivision(args:)/InternalTests.swift:6:3
* frame #0: 0x0000000195edd890 libswiftCore.dylib`_swift_runtime_on_report
frame #1: 0x0000000195f9cb10 libswiftCore.dylib`_swift_stdlib_reportFatalErrorInFile + 208
frame #2: 0x0000000195b6ed94 libswiftCore.dylib`closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 104
frame #3: 0x0000000195b6ded8 libswiftCore.dylib`Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 260
frame #4: 0x00000001001224c8 libXCTestSwiftSupport.dylib`XCTest.HarnessEventHandler.testCaseEnded(_: XCTest.SwiftTestingTestCase, for: XCTest.SwiftTestingTest, at: Foundation.Date) -> () + 1852
frame #5: 0x000000010011cedc libXCTestSwiftSupport.dylib`XCTest.HarnessEventHandler.handleEvent(_: XCTest.SwiftTestingEvent, in: XCTest.SwiftTestingEventContext) -> () + 7196
frame #6: 0x0000000100131c20 libXCTestSwiftSupport.dylib`XCTest.SwiftTestingExecutionExtension.handleEvent(_: XCTest.SwiftTestingEvent, in: XCTest.SwiftTestingEventContext) -> () + 320
frame #7: 0x0000000100136f20 libXCTestSwiftSupport.dylib`(2) suspend resume partial function for closure #1 @Sendable () async -> () in closure #3 @Sendable (Testing.Event, Testing.Event.Context) -> () in XCTest.SwiftTestingExecutionExtension.executeTests(_: Swift.Optional<__C.XCTTestIdentifierSet>, skipping: __C.XCTTestIdentifierSet) async throws -> Swift.Bool + 72
frame #8: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #9: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #10: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #11: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #12: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #13: 0x000000010012be44 libXCTestSwiftSupport.dylib`(4) await resume partial function for closure #1 () async -> () in XCTest.Queue.init(named: Swift.String, priority: Swift.Optional<Swift.TaskPriority>) -> XCTest.Queue
frame #14: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #15: 0x00000001000f3a20 libXCTestSwiftSupport.dylib`(1) await resume partial function for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)
frame #16: 0x00000001000f3738 libXCTestSwiftSupport.dylib`(1) await resume partial function for partial apply forwarder for reabstraction thunk helper <Ο_0_0, Ο_0_1 where Ο_0_0: Swift.Sendable, Ο_0_1 == Swift.Never> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out Ο_0_0) to @escaping @callee_guaranteed @async () -> (@out Ο_0_0, @error @owned Swift.Error)