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

Memory management issue

Open zhifeng-huang opened this issue 10 years ago • 11 comments

Seems like there are still memory problems in 0.3.0.3:

SIGABRT ABORT at 0x0000000198843270

Thread : Crashed: com.videocore.network 0 libsystem_kernel.dylib 0x0000000198843270 __pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001988e1228 pthread_kill + 112 2 libsystem_c.dylib 0x00000001987bab18 abort + 112 3 libc++abi.dylib 0x000000019788d418 __cxa_bad_cast 4 libc++abi.dylib 0x00000001978acb74 default_terminate_handler() + 280 5 libobjc.A.dylib 0x00000001980bc3dc objc_terminate() + 156 6 libc++abi.dylib 0x00000001978a9bb4 std::__terminate(void ()()) + 16 7 libc++abi.dylib 0x00000001978a9478 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, Unwind_Exception) 8 libc++.1.dylib 0x0000000197872314 operator new(unsigned long) + 92 9 libc++.1.dylib 0x00000001978753c4 std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::_init(char const, unsigned long) + 68 10 libc++.1.dylib 0x0000000197875450 std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(std::__1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) + 64 11 EdCast 0x00000001006d3cd4 videocore::RTMPSession::sendReleaseStream() (RTMPSession.cpp:455) 12 EdCast 0x00000001006d5e84 videocore::RTMPSession::handleInvoke(unsigned char) (RTMPSession.cpp:829) 13 EdCast 0x00000001006d5814 videocore::RTMPSession::handleMessage(unsigned char, unsigned char) (RTMPSession.cpp:683) 14 EdCast 0x00000001006d2cd8 videocore::RTMPSession::parseCurrentData() (RTMPSession.cpp:755) 15 EdCast 0x00000001006d1850 videocore::RTMPSession::dataReceived() (RTMPSession.cpp:308) 16 EdCast 0x00000001006d3110 videocore::RTMPSession::streamStatusChanged(long) (RTMPSession.cpp:331) 17 EdCast 0x00000001006dea0c videocore::RTMPSession::RTMPSession(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::function<void (videocore::RTMPSession&, ClientState_t)>)::$_1::operator()(videocore::IStreamSession&, long) const (RTMPSession.cpp:81) 18 EdCast 0x00000001006de880 std::__1::__function::__func<videocore::RTMPSession::RTMPSession(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::function<void (videocore::RTMPSession&, ClientState_t)>)::$_1, std::__1::allocator<videocore::RTMPSession::RTMPSession(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::function<void (videocore::RTMPSession&, ClientState_t)>)::$_1>, void (videocore::IStreamSession&, long)>::operator()(videocore::IStreamSession&, long&&) (functional:1370) 19 EdCast 0x00000001006f0748 std::_1::function<void (videocore::IStreamSession&, long)>::operator()(videocore::IStreamSession&, long) const (functional:1755) 20 EdCast 0x00000001006f0588 videocore::Apple::StreamSession::setStatus(long, bool) (StreamSession.mm:178) 21 EdCast 0x00000001006ef9d8 videocore::Apple::StreamSession::nsStreamCallback(void, unsigned int) (StreamSession.mm:193) 22 EdCast 0x00000001006ef88c -NSStreamCallback stream:handleEvent:

zhifeng-huang avatar Mar 23 '15 21:03 zhifeng-huang

What is the URI you are using for establishing your connection?

jgh- avatar Mar 23 '15 21:03 jgh-

(lldb) po rtmpUrl rtmp://ec2-52-0-32-132.compute-1.amazonaws.com/live

(lldb) po streamKey c9fc2a3c-1976-4b5f-8007-8d387a933081

zhifeng-huang avatar Mar 23 '15 21:03 zhifeng-huang

It does not crash all the time.

zhifeng-huang avatar Mar 23 '15 21:03 zhifeng-huang

This is a bit of a puzzling one right now, I want to verify that this happens on connect, right?

jgh- avatar Mar 23 '15 21:03 jgh-

Also you should see in the logs "playPath: [some value] app: [some value]" could you list that for me as well?

jgh- avatar Mar 23 '15 21:03 jgh-

playPath: c9fc2a3c-1976-4b5f-8007-8d387a933081, app: liveClientState: 1

Yes, it happened on connect, few seconds after I saw the preview.

zhifeng-huang avatar Mar 23 '15 21:03 zhifeng-huang

playPath: c9fc2a3c-1976-4b5f-8007-8d387a933081, app: liveClientState: 1 ClientState: 2 ClientState: 3 ClientState: 4 ClientState: 5 ClientState: 6 received server window size: 2500000 received peer bandwidth limit: 2500000 type: 2 received ping, sending pong. Request to change incoming chunk size from 128 -> 512 Received invoke pktId: 1 received invoke _result tracked command: connect ClientState: 7 Received invoke pktId: 4 received invoke _result tracked command: createStream ClientState: 8 received ping, sending pong. Received invoke pktId: 0 received invoke onStatus code : NetStream.Publish.Start ClientState: 9

zhifeng-huang avatar Mar 23 '15 21:03 zhifeng-huang

Are there any steps that you are able to follow to reproduce this crash?

jgh- avatar Mar 23 '15 21:03 jgh-

No, I don't. I only saw it once actually.

zhifeng-huang avatar Mar 23 '15 22:03 zhifeng-huang

Any update on this issue?

sresenthil avatar Jan 14 '16 06:01 sresenthil

Hey! Probably I fixed this issue #348

artFintch avatar Oct 04 '16 15:10 artFintch