opentok / opentok-ios-sdk-samples-swift

Sample applications using the OpenTok iOS SDK in Swift
https://tokbox.com/
MIT License
137 stars 65 forks source link

App crash - Attempted to dereference garbage pointer #208

Open danhilton1 opened 7 months ago

danhilton1 commented 7 months ago

This crash has occurred a few times now for multiple users on our app. From looking at the crash reports it doesn't seem to be related to our code, it seems to be related to the internal OpenTok logic.

Stack trace:

EXC_BAD_ACCESS (crashed) KERN_PROTECTION_FAILURE Attempted to dereference garbage pointer 0x16b6c7ff8.

0 libsystem_pthread.dylib 0x1a4c _chkstk_darwin + 56 1 Foundation 0x1c594 NSKeyValueWillChange + 144 2 Foundation 0x1bdd0 NSKeyValueWillChangeWithPerThreadPendingNotifications + 412 3 DSKStreaming 0x59734 on_stream_has_video_changed + 96 (This is the line our crash reporting identified as most relevant to this crash.) 4 DSKStreaming 0xc5d18 callback_on_stream_change_has_video(otk_session, otk_stream const, int) + 124 5 DSKStreaming 0xf915c otk_session::on_channel_updated(otk_messenger_v2, char const, char const, char const, char const, int, int, int, int, int, char const, char const*, absl::optional<std::1::basic_string<char, std::1::char_traits, std::__1::allocator > > const&) + 752 6 DSKStreaming 0x81844 otk_messenger_v2::on_updated_message(raptor_v2_session) + 668 7 DSKStreaming 0x83878 otk_messenger_v2::on_rumor_msg(otk_rumor_v1_msg, void) + 1396 8 DSKStreaming 0xed448 otk_rumor_v1_msg_parse + 1344 9 DSKStreaming 0x962c4 otk_rumor_v1_client_on_data + 368 10 DSKStreaming 0x11855c wslay_event_recv + 1304 11 DSKStreaming 0xcbc2c otk_ws_on_readable(void, int) + 124 12 DSKStreaming 0xb1a80 otk_ev_io_invoke_handlers(uv_poll_s*, int, int) + 200 13 DSKStreaming 0x11d42c uvio_poll + 1144 14 DSKStreaming 0x119280 uv_run + 316 15 DSKStreaming 0xb2c80 otk_ev_thread_main + 84 16 DSKStreaming 0x6cbe8 network_thread_main(void*) + 32 17 libsystem_pthread.dylib 0x24d0 _pthread_start + 132

This was on SDK version 2.26.1.

The report from the user - I was in a livestream with 4 of us for around 30mins. I just had my device iOS device on my desk and suddenly I realised there was a crash. I can't see exactly what caused it unfortunately but that was the scenario.

Unfortunately it's sporadic and seems to occur in different conditions so it is difficult to reproduce.

v-kpheng commented 7 months ago

@danhilton1, thanks for filing this report. Were you able to reproduce on our most recent release? Also, are you able to reproduce using one of our sample apps. That'll help us quite a bit.