will1971 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

On iOS i see intermittent crashes - "[GCKCastSecureSocket startSSL]: message sent to deallocated instance" #737

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The last line I see is:
[GCKCastSecureSocket startSSL]: message sent to deallocated instance

What steps will reproduce the problem?
1. Connect and starting a google cast stream
2. Open and close (press home button) quickly and multiple times...

What is the expected output?
The app will open, recconnect and close without any problems

What do you see instead?
The app will open and close fine but at some point I get a crash with the last 
message:
[GCKCastSecureSocket startSSL]: message sent to deallocated instance <memory 
pointer>

What version of the product are you using?
Running version 2.10.1 of the google-cast-sdk

On what operating system?
Tried both the iOS 9.2 simulator and a regular device iPhone 6s, running iOS 9.2

Please provide any additional information below.
I haven't been able to provoke this in the CastVideos example application, but 
as it is intermittent I cannot say that it isn't there.
Besides it seems to be from inside the google-cast-sdk, hence I´m unsure how I 
should be able to change this startSSL connection.

Original issue reported on code.google.com by jacobvon...@gmail.com on 15 Jan 2016 at 10:03

GoogleCodeExporter commented 8 years ago
If you haven't been able to reproduce this with the CastVideos app, which app 
did you use? Also, can you provide any stream(s) where you're seeing this 
behavior?

Original comment by jonathan...@google.com on 21 Jan 2016 at 11:36

GoogleCodeExporter commented 8 years ago
I am working on an app for Blockbuster. google-cast-sdk (2.10.0) doesn't crash, 
but upgrading to 2.10.1 as the only change made the app crash. I enabled zombie 
detection to see what was the reason for this and that stated the reason for 
being this line. I have a stacktrace that maybe can help?

0   libobjc.A.dylib 0x32661f46 objc_msgSend + 6
1   Security 0x273cd8a5 SSLRecordServiceWriteQueueInternal + 42
2   Security 0x273cfd3f SSLServiceWriteQueue + 12
3   Security 0x273cfed9 SSLHandshakeProceed + 50
4   Security 0x273d01db SSLHandshake + 132
5 ! Blockbuster 0x006444fd GCKPB_CastMessage_PayloadTypeIsValidValue + 18666
6   Blockbuster 0x0064449f GCKPB_CastMessage_PayloadTypeIsValidValue + 18572
7   Blockbuster 0x00645471 GCKPB_CastMessage_PayloadTypeIsValidValue + 22622
8   CoreFoundation 0x23f1af37 _signalEventSync + 144
9   CoreFoundation 0x23f25361 _cfstream_solo_signalEventSync + 202
10  CoreFoundation 0x23f1abc3 _CFStreamSignalEvent + 324
11  CFNetwork 0x239dc0f1 
_ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 146
12  CFNetwork 0x239dc027 
_ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 56
13  CoreFoundation 0x23f6d5c5 __CFSocketPerformV0 + 370
14  CoreFoundation 0x23f6ad8f 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
15  CoreFoundation 0x23f6a19f __CFRunLoopDoSources0 + 216
16  CoreFoundation 0x23f68805 __CFRunLoopRun + 770
17  CoreFoundation 0x23eb4f31 CFRunLoopRunSpecific + 474
18  CoreFoundation 0x23eb4d43 CFRunLoopRunInMode + 104
19  GraphicsServices 0x2b98f201 GSEventRunModal + 134
20  UIKit 0x27686879 UIApplicationMain + 1438
21  Blockbuster 0x000a7d27 main (main.m:16)
22  libdyld.dylib 0x32c07aaf start + 0

Original comment by jacobvon...@gmail.com on 27 Jan 2016 at 10:13

GoogleCodeExporter commented 8 years ago
Are you by any chance releasing the GCKDeviceManager object while it is still 
in a connected (or connecting, or disconnecting) state?

Original comment by mlind...@google.com on 17 Feb 2016 at 12:08

GoogleCodeExporter commented 8 years ago
I can confirm that we're also seeing this issue a lot after updating to the 
2.10.1 SDK.

As for GCKDeviceManager being released while it's still connected: In our case 
we keep a Chromecast controller singleton that's initialised in the 
AppDelegate. That controller keeps an instance of the GCKDeviceManager so this 
won't be released while it's still connected.

Original comment by gorman....@gmail.com on 17 Feb 2016 at 10:40

GoogleCodeExporter commented 8 years ago
I've experienced similar crashes around 
'GCKPB_CastMessage_PayloadTypeIsValidValue' using 2.10.0 SDK. Unfortunately, 
all I have is the crash reports and have not been able to reproduce.

Thread 0 Crashed:
0   libobjc.A.dylib                      0x0000000183f19bc8 objc_msgSend + 8
1   App                                    0x00000001004f4078 
GCKPB_CastMessage_PayloadTypeIsValidValue + 28420
2   App                                       0x00000001004f3808 
GCKPB_CastMessage_PayloadTypeIsValidValue + 26260
3   CoreFoundation                   0x00000001847ee644 _signalEventSync + 188
4   CoreFoundation                   0x00000001847fa9b4 
_cfstream_solo_signalEventSync + 236
5   CoreFoundation                   0x00000001847ee15c _CFStreamSignalEvent + 
464
6   CFNetwork                           0x0000000184e4c6dc 
SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*
) + 60
7   CFNetwork                           0x0000000184e4c260 
SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void 
const*) + 264
8   CFNetwork                           0x0000000184e4c110 
SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData 
const*, void const*, void*) + 84
9   CoreFoundation                   0x00000001848555b0 __CFSocketPerformV0 + 
1092
10  CoreFoundation                  0x0000000184850efc 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
11  CoreFoundation                   0x0000000184850990 __CFRunLoopDoSources0 + 
536
12  CoreFoundation                   0x000000018484e690 __CFRunLoopRun + 720
13  CoreFoundation                   0x000000018477d680 CFRunLoopRunSpecific + 
380
14  GraphicsServices                 0x0000000185c8c088 GSEventRunModal + 176
15  UIKit                                      0x00000001895f4d90 
UIApplicationMain + 200
16  App                                  0x00000001000a54fc main (main.m:21)
17  ???                                  0x000000018431e8b8 0x0 + 0

Original comment by cgold...@gmail.com on 17 Feb 2016 at 2:56

GoogleCodeExporter commented 8 years ago
Update from us: we've downgraded to the 2.10.0 SDK with our new release and 
this source of crashes has vanished. Keeping with that for now.

If you need any further details on our project I'd be happy to provide them to 
you.

Original comment by gorman....@gmail.com on 26 Feb 2016 at 1:52

GoogleCodeExporter commented 8 years ago
I'm seeing this issue, and I'm about to ship Chromecast support to an app with 
millions of users. Please help!

Original comment by bryanmo...@gmail.com on 3 Mar 2016 at 9:16

GoogleCodeExporter commented 8 years ago
This was fixed in 2.10.2

Original comment by mlind...@google.com on 8 Mar 2016 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 9 Mar 2016 at 12:15