Comments (5)
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.
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.
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.
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.
Hi, @mateberes !
I think I have fixed the deadlock issue you spotted.
I hope the situation becomes better.
from softcam.
Related Issues (20)
- How to use this library to make two or more virtual webcams on Windows? HOT 3
- Create Python binding for softcam HOT 5
- Add CI build and test of python_binding example HOT 1
- Default image when there is no input HOT 4
- Image colors are not correct HOT 2
- Let us to set our custom device name HOT 3
- Package manager HOT 1
- Add 32-bit support HOT 1
- Is it possible to set resolution for the output? HOT 1
- could it add a convert function() which make input is a Mat format HOT 1
- Suggestion: support multiple virtual cameras with different parameters HOT 2
- Add VS2022 project files HOT 1
- Softcam doesn't appear in camera list on discord HOT 3
- VS2022 Build Error HOT 1
- Different Video Formats? HOT 3
- Add audio pin? HOT 2
- Add hardware ID into device info? HOT 2
- Mac version? Example problem HOT 5
- Changing dll name that is searched for HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from softcam.