Project cloned from this repository. Running 2D_01_AnimatedSprite
executable runs into assertion failure upon launch:
GateEngine/Entity.swift:50: Assertion failed: Component "SpriteComponent" is not a member of this entity.
* thread #2, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = Assertion failed: Component "SpriteComponent" is not a member of this entity.
frame #0: 0x00000001b58c896c libswiftCore.dylib`_swift_runtime_on_report
frame #1: 0x00000001b59719f8 libswiftCore.dylib`_swift_stdlib_reportFatalErrorInFile + 208
frame #2: 0x00000001b5567330 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: 0x00000001b5566428 libswiftCore.dylib`Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 260
* frame #4: 0x0000000100054b2c 2D_01_AnimatedSprite`Entity.subscript.getter(type=GateEngine.SpriteComponent, self=0x0000600000c75800) at Entity.swift:50:13
frame #5: 0x0000000100055604 2D_01_AnimatedSprite`Entity.configure<T, ResultType>(type=GateEngine.SpriteComponent, config=0x100c93dd8, self=0x0000600000c75800) at Entity.swift:100:29
frame #6: 0x00000001000072ec 2D_01_AnimatedSprite`AnimatedSpriteSystem.setup(game=0x000060000330c460, input=0x000060000175c080, self=0x0000600000246d80) at AnimatedSprite.swift:55
frame #7: 0x00000001000600a8 2D_01_AnimatedSprite`System.willUpdate(game=0x000060000330c460, input=0x000060000175c080, deltaTime=0.0280027911, self=0x0000600000246d80) at System.swift:31
frame #8: 0x0000000100050bd0 2D_01_AnimatedSprite`ECSContext.shouldRenderAfterUpdate(deltaTime=0.0280027911, self=0x000060000290c380) at ECSContext.swift:251
frame #9: 0x0000000100076c4c 2D_01_AnimatedSprite`closure #1 in Game.gameLoop(self=0x000060000330c460) at Game.swift:141
frame #10: 0x0000000100077284 2D_01_AnimatedSprite`partial apply for closure #1 in Game.gameLoop() at <compiler-generated>:0
frame #11: 0x000000010005d5fc 2D_01_AnimatedSprite`thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) at <compiler-generated>:0
frame #12: 0x000000010005dbd4 2D_01_AnimatedSprite`thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A)partial apply at <compiler-generated>:0
Crashes occurred on simulator as well, so I'm hoping it's just an issue with the logic. Nonetheless here is machine details:
2021 MacBook Pro (M1 Pro chip)
macOS Ventura 13.5.1
Swift version 5.7.2
Xcode 14.2