VideoCore-Inactive icon indicating copy to clipboard operation
VideoCore-Inactive copied to clipboard

EXC_BAD_ACCESS in parseStatusCode

Open 7bp opened this issue 10 years ago • 9 comments

Trying out your sample project (after applying necessary changes of #68) I experience an issue with Xcode 6.1, iOS 8.1 making it unable for me to try your framework.

The following log output I got so far:

2014-10-29 12:11:59.633 SampleBroadcaster[8153:2541058] Creating context
2014-10-29 12:11:59.712 SampleBroadcaster[8153:2541058] Context creation succeeded
ClientState: 1
ClientState: 2
ClientState: 3
ClientState: 4
ClientState: 5
ClientState: 6
received server window size: 2500000
received peer bandwidth limit: 2500000 type: 2
Received invoke
pktId: 1
received invoke _result
tracked command: connect
ClientState: 7
received unknown packet type: 0x00
Received invoke
pktId: 2
received invoke _result
tracked command: releaseStream
Received invoke
pktId: 3
received invoke _result
tracked command: FCPublish
Received invoke
pktId: 4
received invoke _result
tracked command: createStream
ClientState: 8
Received invoke
pktId: 0
received invoke onStatus

And then the app crashes and stops inside RTMPSession::parseStatusCode - most of the times strncpy inside the do-while loop leads to an EXC_BAD_ACCESS exception, sometimes a few lines later.

Do you have any ideas on how this can be solved?

Additional information: we are using FMS 3.5 on server side.

7bp avatar Oct 29 '14 11:10 7bp

Are you using ARC? I've encountered a similar crash.

JALsnipe avatar Dec 02 '14 20:12 JALsnipe

Sorry for late reply. Yes of course I am using ARC.

Follow-Up: with the latest updates in this project I receive the following log output:

received server window size: 2500000
received peer bandwidth limit: 2500000 type: 2
Received invoke
pktId: -2147483648
received invoke _error
Received invoke
pktId: 0
received invoke close
Received invoke
pktId: 0
received invoke close

7bp avatar Jan 12 '15 12:01 7bp

Could you post a stack trace of the crash please?

jgh- avatar Jan 12 '15 16:01 jgh-

It is not crashing, the connection to FMS is just not established properly after the handshake seems to be completed. Unfortunately I cannot provide any detailed server logs yet but working on it.

7bp avatar Jan 13 '15 10:01 7bp

I am getting the same error. Any ideas?

remotevision avatar Apr 04 '15 02:04 remotevision

I've found the reason. Seems like parseStatusCode can't handle a message that is bigger than 1 chunk. 0xC4 within the message is treated as a normal char, which is actually the head type of next chunk.

greystar avatar Jun 11 '15 07:06 greystar

@greystar i am also same issue how you solve this i don't understood please help me out

bintu1234 avatar Dec 03 '15 10:12 bintu1234

@greystar @7bp i am also having same issue , how to solve this ? please help me

chinnuios avatar Mar 31 '16 11:03 chinnuios

@greystar I am confusing. could you please explain ..!! how to resolved that issue ?? help me

chinnuios avatar May 02 '16 05:05 chinnuios