[x] Auto-Renewable Subscription - but most likely not relevant
[ ] Non-Renewing Subscription
Environment
[x] Sandbox
[ ] Production
Version
067d464
Report
Issue summary
App crashes after lengthy time, most likely in combination with macOS "sleeping"
What did you expect to happen
no crash. :-)
What happened instead
I am developing an App that is using SwiftyStoreKit (which is great! - thanks for the good work).
I regularly leave the App under development running (started from Xcode) when I close my MacBook. When I come back it has often crashed. See the 2 examples below.
Happy to provide more information if needed.
1st example
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
(null)
Platform
In app purchase type
Environment
Version
067d464
Report
Issue summary
App crashes after lengthy time, most likely in combination with macOS "sleeping"
What did you expect to happen
no crash. :-)
What happened instead
I am developing an App that is using SwiftyStoreKit (which is great! - thanks for the good work). I regularly leave the App under development running (started from Xcode) when I close my MacBook. When I come back it has often crashed. See the 2 examples below.
Happy to provide more information if needed.
1st example
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0] (null)
(lldb) bt
objc_exception_throw frame #1: 0x00007fff3331fa38 CoreFoundation
_CFThrowFormattedException + 202 frame #2: 0x00007fff331ef39e CoreFoundation-[__NSPlaceholderArray initWithObjects:count:] + 230 frame #3: 0x00007fff3325cc4c CoreFoundation
+[NSArray arrayWithObjects:count:] + 52 frame #4: 0x00007fff3f2b3719 StoreKit__32-[SKPaymentQueue downloadAdded:]_block_invoke + 120 frame #5: 0x00007fff332759e4 CoreFoundation
-[NSArrayM enumerateObjectsWithOptions:usingBlock:] + 219 frame #6: 0x00007fff3f2b3656 StoreKit-[SKPaymentQueue downloadAdded:] + 286 frame #7: 0x00007fff3f2b63aa StoreKit
-[SKServiceClient downloadAdded:] + 318 frame #8: 0x00007fff3559b79b Foundation`NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 12 frame #9: 0x00007fff35594c7e Foundation-[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2631 frame #10: 0x00007fff35593fcc Foundation
message_handler + 227 frame #11: 0x00007fff604f1a50 libxpc.dylib_xpc_connection_call_event_handler + 56 frame #12: 0x00007fff604ef9e6 libxpc.dylib
_xpc_connection_mach_event + 933 frame #13: 0x000000010167c893 libdispatch.dylib_dispatch_client_callout4 + 9 frame #14: 0x00000001016980c1 libdispatch.dylib
_dispatch_mach_msg_invoke + 471 frame #15: 0x00000001016847f9 libdispatch.dylib_dispatch_lane_serial_drain + 279 frame #16: 0x00000001016993ea libdispatch.dylib
_dispatch_mach_invoke + 557 frame #17: 0x00000001016847f9 libdispatch.dylib_dispatch_lane_serial_drain + 279 frame #18: 0x00000001016858e1 libdispatch.dylib
_dispatch_lane_invoke + 497 frame #19: 0x0000000101690f6c libdispatch.dylib_dispatch_workloop_worker_thread + 691 frame #20: 0x00000001016f7058 libsystem_pthread.dylib
_pthread_wqthread + 409 frame #21: 0x00000001016f6e51 libsystem_pthread.dylib`start_wqthread + 132nd example
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0] (null)
objc[8824]: Attempt to use unknown class 0x600000dd3630. 105553170013504
(lldb) bt
__cxa_throw frame #1: 0x00007fff661fb85a libobjc.A.dylib
objc_exception_throw + 362 frame #2: 0x00007fff3a1df458 CoreFoundation_CFThrowFormattedException + 202 frame #3: 0x00007fff3a0b10ee CoreFoundation
-[NSPlaceholderArray initWithObjects:count:] + 230 frame #4: 0x00007fff3a11e99c CoreFoundation+[NSArray arrayWithObjects:count:] + 52 frame #5: 0x00007fff4619e719 StoreKit
32-[SKPaymentQueue downloadAdded:]_block_invoke + 120 frame #6: 0x00007fff3a137734 CoreFoundation-[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 219 frame #7: 0x00007fff4619e656 StoreKit
-[SKPaymentQueue downloadAdded:] + 286 frame #8: 0x00007fff461a13aa StoreKit-[SKServiceClient downloadAdded:] + 318 frame #9: 0x00007fff3c46357b Foundation
__NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 12 frame #10: 0x00007fff3c45ca5e Foundation-[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2631 frame #11: 0x00007fff3c45bdac Foundation
message_handler + 227 frame #12: 0x00007fff674fca50 libxpc.dylib_xpc_connection_call_event_handler + 56 frame #13: 0x00007fff674fa9e6 libxpc.dylib
_xpc_connection_mach_event + 933 frame #14: 0x000000010167f863 libdispatch.dylib_dispatch_client_callout4 + 9 frame #15: 0x000000010169b0a9 libdispatch.dylib
_dispatch_mach_msg_invoke + 487 frame #16: 0x00000001016877c9 libdispatch.dylib_dispatch_lane_serial_drain + 279 frame #17: 0x000000010169c3ed libdispatch.dylib
_dispatch_mach_invoke + 557 frame #18: 0x00000001016877c9 libdispatch.dylib_dispatch_lane_serial_drain + 279 frame #19: 0x00000001016888b1 libdispatch.dylib
_dispatch_lane_invoke + 497 frame #20: 0x0000000101693f44 libdispatch.dylib_dispatch_workloop_worker_thread + 691 frame #21: 0x00000001016fa078 libsystem_pthread.dylib
_pthread_wqthread + 409 frame #22: 0x00000001016f9e71 libsystem_pthread.dylib`start_wqthread + 13