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

crashing when connect and disconnect button is clicked for many times

Open bhagyalakshmikad opened this issue 10 years ago • 9 comments

Hi, I have tried the following url https://github.com/jgh-/VideoCore/commit/d8a2354219a03eae38f10c824d1b4f56935e3e22 for this connect and disconnect crash. (i.e Fix connect failure. (#78)). I have made necessary corrections mentioned in the above url. But still Iam facing the same issue. Please provide with some suggestion.

bhagyalakshmikad avatar Dec 15 '14 06:12 bhagyalakshmikad

hi all, i have a little confuse about the code, when click the connect button. in source code: VCSimpleSession::addEncodersAndPacketizers m_videoSplit->setOutput(m_h264Encoder);

setOutput call vector::push_back to add a new target, it shouldn't be thread-safe, even-though code like below, isn't it? but i'm not a c++ expert, so i don't know if this cause your problem void Split::pushBuffer(const uint8_t* const data, size_t size, IMetadata& metadata) { for ( auto & it : m_outputs ) { auto outp = it.lock(); if(outp) { outp->pushBuffer(data, size, metadata); } } }

bhpike65 avatar Jan 05 '15 02:01 bhpike65

m_outputs is a vector of std::weak_ptr which you must call .lock() on to get a std::shared_ptr reference to the object. If the object no longer exists, the lock fails. It's not a mutex. It's possible the crash is caused by the vector being iterated while being mutated though, but I have to take a deeper look at it.

jgh- avatar Jan 05 '15 03:01 jgh-

btw, update GLESVideoMixer::m_zRang should not be safe too..

bhpike65 avatar Jan 07 '15 02:01 bhpike65

Thanks for your library, It good to stream.

When i connect and disconnect multiple times application crash and some times camera frozen(black color). Can you help me on this issue.

sresenthil avatar Jan 14 '16 06:01 sresenthil

@bhagyalakshmikad @bhpike65 @sresenthil @jgh- Hi, When i disconnect button clicked,it's broadcast crashing (image freezing). the crash is occurring by repeatedly pressing disconnect button. Did you find any solution ? Please help me on this issue.

IOSDeveloperProgrammer avatar Aug 16 '16 04:08 IOSDeveloperProgrammer

#348 Hey! I fixed this issue.

artFintch avatar Oct 04 '16 15:10 artFintch

@artFintch which version of video Core using ? i'm using Red5 and videocore version 0.1.12. please help me

IOSDeveloperProgrammer avatar Oct 19 '16 05:10 IOSDeveloperProgrammer

@IOSDeveloperProgrammer I use last version 0.3.2 master branch.

artFintch avatar Oct 19 '16 07:10 artFintch

@artFintch okay..I am using cocoapods version 0.2.0 .Working fine but when i call endrtmp then app is freezing some time.So if i use 0.3.2 will it work with red5 server.I tried but it is not connecting.

IOSDeveloperProgrammer avatar Oct 19 '16 08:10 IOSDeveloperProgrammer