bitkit
bitkit copied to clipboard
[Bug]: iOS crashes when being moved into the foreground after being suspended
Describe the bug
App crashes on peerHandler.connect(...) being called after an automatic node restart on iOS.
Reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Screenshots / Recording
No response
Operating system
iOS
Bitkit version
No response
Log output
Thread 26 Crashed:
0 libsystem_kernel.dylib 0x00000001dd789578 __pthread_kill + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001fe608118 pthread_kill + 268 (pthread.c:1670)
2 libsystem_c.dylib 0x00000001a5cf4178 abort + 180 (abort.c:118)
3 libsystem_c.dylib 0x00000001a5d4c0a4 __assert_rtn + 272 (assert.c:96)
4 LightningDevKit 0x0000000103ebb3b8 register_socket.cold.3 + 40 (ldk_net.c:69)
5 LightningDevKit 0x000000010361b7fc register_socket + 236 (ldk_net.c:69)
6 LightningDevKit 0x000000010361c144 socket_connect + 256 (ldk_net.c:403)
7 LightningDevKit 0x000000010382e330 closure #1 in closure #1 in TCPPeerHandler.connect(address:port:theirNodeId:) + 24 (ChannelManagerConstructor.swift:480)
8 LightningDevKit 0x000000010382e330 thunk for @callee_guaranteed (@unowned UnsafePointer<sockaddr>) -> (@unowned Int32, @error @owned Error) + 24 (<compiler-generated>:0)
9 LightningDevKit 0x000000010382e330 specialized UnsafePointer.withMemoryRebound<A, B>(to:capacity:_:) + 24 (<compiler-generated>:0)
10 LightningDevKit 0x000000010382e330 closure #1 in TCPPeerHandler.connect(address:port:theirNodeId:) + 24 (ChannelManagerConstructor.swift:478)
11 LightningDevKit 0x000000010382e330 thunk for @callee_guaranteed (@unowned UnsafePointer<sockaddr_in>) -> (@unowned Int32, @error @owned Error) + 24 (<compiler-generated>:0)
12 LightningDevKit 0x000000010382e330 specialized withUnsafePointer<A, B>(to:_:) + 24 (<compiler-generated>:0)
13 LightningDevKit 0x000000010382e330 TCPPeerHandler.connect(address:port:theirNodeId:) + 644 (ChannelManagerConstructor.swift:476)
14 bitkit 0x000000010294e010 specialized Ldk.addPeer(_:port:pubKey:timeout:resolve:reject:) + 164 (Ldk.swift:571)
15 bitkit 0x0000000102944764 Ldk.addPeer(_:port:pubKey:timeout:resolve:reject:) + 44 (<compiler-generated>:0)
16 bitkit 0x0000000102944764 @objc Ldk.addPeer(_:port:pubKey:timeout:resolve:reject:) + 208
17 CoreFoundation 0x000000019e835c04 __invoking___ + 148 (:-1)
18 CoreFoundation 0x000000019e7e3cb4 -[NSInvocation invoke] + 428 (NSForwarding.m:3377)
19 CoreFoundation 0x000000019e7e36cc -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3474)
20 bitkit 0x00000001026a4a20 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 388 (RCTModuleMethod.mm:584)
21 bitkit 0x00000001026a6a70 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 452 (RCTNativeModule.mm:196)
22 bitkit 0x00000001026a66c0 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const + 68 (RCTNativeModule.mm:113)
23 bitkit 0x00000001026a66c0 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 112 (RCTNativeModule.mm:104)
24 libdispatch.dylib 0x00000001a5c92320 _dispatch_call_block_and_release + 32 (init.c:1518)
25 libdispatch.dylib 0x00000001a5c93eac _dispatch_client_callout + 20 (object.m:560)
26 libdispatch.dylib 0x00000001a5c9b534 _dispatch_lane_serial_drain + 668 (queue.c:3885)
27 libdispatch.dylib 0x00000001a5c9c0a4 _dispatch_lane_invoke + 384 (queue.c:3976)
28 libdispatch.dylib 0x00000001a5ca6cdc _dispatch_workloop_worker_thread + 648 (queue.c:6507)
29 libsystem_pthread.dylib 0x00000001fe601ddc _pthread_wqthread + 288 (pthread.c:2618)
30 libsystem_pthread.dylib 0x00000001fe601b7c start_wqthread + 8 (:-1)
@Jasonvdb can you test it again with you iOS?
Closing