Closed 1Conan closed 10 months ago
Crashes only occur on release builds at this line https://github.com/kabiroberai/node-swift/blob/master/Sources/NodeAPI/NodeContext.swift#L34
An excerpt from the crash log
frame #0: 0x000000011eb9098e dyld`__abort_with_payload + 10 frame #1: 0x000000011eba6a72 dyld`abort_with_payload_wrapper_internal + 80 frame #2: 0x000000011eba6aa4 dyld`abort_with_payload + 9 frame #3: 0x0000000111491593 dyld_sim`abort_with_payload + 26 frame #4: 0x000000011143ef1e dyld_sim`dyld4::halt(char const*) + 375 frame #5: 0x0000000111464c8e dyld_sim`dyld4::APIs::_dyld_missing_symbol_abort() + 34 frame #6: 0x0000000111a0fe67 NodeAPI`function signature specialization <Arg[0] = Dead> of generic specialization <NodeAPI.WeakBox<NodeAPI.NodeValueBase>> of Swift.getContiguousArrayStorageType<τ_0_0>(for: τ_0_0.Type) -> Swift._ContiguousArrayStorage<τ_0_0>.Type + 23 frame #7: 0x0000000111a0febe NodeAPI`function signature specialization <Arg[2] = Dead> of generic specialization <NodeAPI.WeakBox<NodeAPI.NodeValueBase>> of Swift._ContiguousArrayBuffer.init(_uninitializedCount: Swift.Int, minimumCapacity: Swift.Int) -> Swift._ContiguousArrayBuffer<τ_0_0> + 30 frame #8: 0x0000000111a0ddb7 NodeAPI`generic specialization <NodeAPI.WeakBox<NodeAPI.NodeValueBase>> of Swift._ArrayBuffer._consumeAndCreateNew(bufferIsUnique: Swift.Bool, minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> Swift._ArrayBuffer<τ_0_0> + 167 frame #9: 0x0000000111a07301 NodeAPI`generic specialization <NodeAPI.WeakBox<NodeAPI.NodeValueBase>> of Swift.Array._makeUniqueAndReserveCapacityIfNotUnique() -> () + 97 frame #10: 0x0000000111a1ba20 NodeAPI`function signature specialization <Arg[1] = Owned To Guaranteed, Arg[2] = Dead> of NodeAPI.NodeValueBase.__allocating_init(raw: Swift.OpaquePointer, in: NodeAPI.NodeContext) -> NodeAPI.NodeValueBase + 192 frame #11: 0x0000000111a155a7 NodeAPI`NodeAPI.NodeString.init(Swift.String) throws -> NodeAPI.NodeString + 199 frame #12: 0x00000001119f550f NodeAPI`NodeAPI.NodeAsyncQueue.init(label: Swift.String, asyncResource: Swift.Optional<NodeAPI.NodeObjectConvertible>, maxQueueSize: Swift.Optional<Swift.Int>) throws -> NodeAPI.NodeAsyncQueue + 671 frame #13: 0x00000001119ff556 NodeAPI`function signature specialization <Arg[0] = Dead> of NodeAPI.NodeEnvironment.getDefaultQueue() throws -> NodeAPI.NodeAsyncQueue + 166 frame #14: 0x00000001119fe5ee NodeAPI`function signature specialization <Arg[2] = [Closure Propagated : closure #1 @NodeAPI.NodeActor (NodeAPI.NodeContext) throws -> Swift.OpaquePointer in NodeAPI._registerNodeSwiftModule(rawEnv: Swift.Optional<Swift.OpaquePointer>, exports: Swift.Optional<Swift.OpaquePointer>, module: Swift.Optional<Swift.UnsafeRawPointer>) -> Swift.Optional<Swift.OpaquePointer>, Argument Types : [@thick NodeAPI.NodeModule.Type]> of generic specialization <Swift.OpaquePointer> of static NodeAPI.NodeContext.withContext<τ_0_0>(environment: NodeAPI.NodeEnvironment, isTopLevel: Swift.Bool, do: @NodeAPI.NodeActor (NodeAPI.NodeContext) throws -> τ_0_0) throws -> τ_0_0 + 142 frame #15: 0x0000000111a0a62e NodeAPI`function signature specialization <Arg[1] = Dead> of NodeAPI._registerNodeSwiftModule(rawEnv: Swift.Optional<Swift.OpaquePointer>, exports: Swift.Optional<Swift.OpaquePointer>, module: Swift.Optional<Swift.UnsafeRawPointer>) -> Swift.Optional<Swift.OpaquePointer> + 126
Haven't been able to repro this, tentatively closing
Crashes only occur on release builds at this line https://github.com/kabiroberai/node-swift/blob/master/Sources/NodeAPI/NodeContext.swift#L34
An excerpt from the crash log