Git Product home page Git Product logo

Comments (5)

mateberes avatar mateberes commented on July 19, 2024 1

Hi tshino!

Just applied your change and it looks like it did indeed fix all of my issues. I can now stream to 32 / 64 bit discord clients without any issues.

Wow, you were very fast with the fix, thank you very much for your help!

from softcam.

mateberes avatar mateberes commented on July 19, 2024

I've found one problem where two threads get in a deadlock:

First this lock gets locked:

CAutoLock lock(m_pFilter->pStateLock()); source.cpp:340

 	ntdll.dll!77ea2a7c()	Unknown	Non-user code. Cannot find or open the PDB file.
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]		Annotated Frame
 	KernelBase.dll!76d78e89()	Unknown	Non-user code. Cannot find or open the PDB file.
 	KernelBase.dll!76d78de2()	Unknown	Non-user code. Cannot find or open the PDB file.
 	softcam.dll!CAMEvent::Wait(unsigned long dwTimeout) Line 128	C++	Symbols loaded.
 	softcam.dll!CAMThread::CallWorker(unsigned long dwParam) Line 178	C++	Symbols loaded.
 	softcam.dll!CSourceStream::Stop() Line 140	C++	Symbols loaded.
>	softcam.dll!CSourceStream::Inactive() Line 359	C++	Symbols loaded.
 	softcam.dll!CBaseFilter::Stop() Line 334	C++	Symbols loaded.
 	quartz.dll!205839e0()	Unknown	Non-user code. Cannot find or open the PDB file.
 	quartz.dll!20591f22()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!15825251()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!1582519b()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!1555038b()	Unknown	Non-user code. Cannot find or open the PDB    ###file.
 	discord_voice.node!155558eb()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!154de991()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!154de5c8()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!154b500b()	Unknown	Non-user code. Cannot find or open the PDB file.
 	discord_voice.node!154a04f3()	Unknown	Non-user code. Cannot find or open the PDB file.
 	Discord.exe!02752332()	Unknown	Non-user code. Cannot find or open the PDB file.
 	Discord.exe!02752ae3()	Unknown	Non-user code. Cannot find or open the PDB file.

Then the other thread tries to access the framebuffer, but it's already locked:
DShowSoftcam.cpp:338
CAutoLock lock(&m_cStateLock);

Not Flagged		17136	0	Worker Thread	webrtc_video_capture	softcam.dll!CCritSec::Lock
 	 	 	 	 	 	ntdll.dll!77ea477c()
 	 	 	 	 	 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
 	 	 	 	 	 	ntdll.dll!77e8f999()
 	 	 	 	 	 	ntdll.dll!77e8f6ed()
 	 	 	 	 	 	ntdll.dll!77e7010a()
 	 	 	 	 	 	ntdll.dll!77e6ff59()
 	 	 	 	 	 	softcam.dll!CCritSec::Lock() Line 402
 	 	 	 	 	 	softcam.dll!CAutoLock::CAutoLock(CCritSec * plock) Line 98
 	 	 	 	 	 	softcam.dll!softcam::Softcam::getFrameBuffer() Line 338
 	 	 	 	 	 	softcam.dll!softcam::SoftcamStream::FillBuffer(IMediaSample * pms) Line 415
 	 	 	 	 	 	softcam.dll!CSourceStream::DoBufferProcessingLoop() Line 479
 	 	 	 	 	 	softcam.dll!CSourceStream::ThreadProc() Line 430
 	 	 	 	 	 	softcam.dll!CAMThread::InitialThreadProc(void * pv) Line 123
 	 	 	 	 	 	kernel32.dll!76a300c9()
 	 	 	 	 	 	ntdll.dll!77e97b1e()
 	 	 	 	 	 	ntdll.dll!77e97aee()

From the looks of it SourceStream tries to call Stop(), which is strange because I've just connected to it.

from softcam.

mateberes avatar mateberes commented on July 19, 2024

It also looks like SoftcamStream::FillBuffer() is called once but then never again. So this might be the issue, I'm just not sure what's causing it.

from softcam.

tshino avatar tshino commented on July 19, 2024

Thank you for a detailed report!

Based on your observation, I agree with your guess of a possible race condition.
And I agree that the call stacks are clearly indicating a deadlock!
Reading the code, the first thread gets a lock and waits for the second to respond, but simultaneously, the second attempts to get the lock.

I think the cause is not a 32-bit related.
I will investigate further.
Thank you!

from softcam.

tshino avatar tshino commented on July 19, 2024

Hi, @mateberes !
I think I have fixed the deadlock issue you spotted.
I hope the situation becomes better.

from softcam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.