akvirtualcamera icon indicating copy to clipboard operation
akvirtualcamera copied to clipboard

Webcamoid virtual camera crashes when used by Qt's capture code

Open j-schultz opened this issue 4 years ago • 5 comments

Summary

First off, this might be the same issue as webcamoid/webcamoid#231 but I'm not sure, as this is about another application using Webcamoid's virtual camera, not Webcamoid itself.

When creating a Webcamoid virtual camera on Windows 10, applications making use of Qt's camera capture code crash when trying to start that camera. Since Webcamoid itself is built using Qt, you should not have any issues using the default Qt multimedia webcam example to reproduce this issue.

Steps to Reproduce

  1. Create virtual camera in Webcamoid
  2. Run the Qt multimedia webcam example
  3. Select the camera
  4. Observe crash

Suggestions and tips

I contacted Qt support because I suspected the issue is on their end, however they say the problem is in the filter provided by webcamoid as it crashes at pVideoControl->GetFrameRateList(pPin, iIndex, size, &listSize, &frameRates);

Your Environment

  • Webcamoid information: 8.7.1 64-bit
  • Operating System information: Windows 10 Professional 64-bit, version 1909

j-schultz avatar Jun 16 '20 08:06 j-schultz

I won't waste my time writing code just to test this bug, just give me some very simple, ready and easy to use code. Also, this issue is 1 year old, and it was probably fixed already.

hipersayanX avatar Oct 23 '21 19:10 hipersayanX

As I said, just running the webcam example that ships with Qt (multimedia/declarative-camera, using Qt 5.15 here) itself is enough to trigger the bug. Since Webcamoid is written in Qt, I thought you would have have that example ready but I can zip it up and upload it if you don't.

The problem is still there in the latest stable release, Webcamoid 8.8.0. I also tried the latest daily build and noticed that things changed quite a bit there. After installing the AkVirtualCamera through Webcamoid, I can still observe the same crash in the Qt camera example, and on top of that Webcamoid now freezes when it's relaunched. After uninstalling AkVirtualCamera, Webcamoid itself also works again.

I understand AkVirtualCamera is a separate project, and the problem is more likely to be found in AkVirtualCamera than Webcamoid itself, so I guess this issue should be moved over?

j-schultz avatar Oct 25 '21 11:10 j-schultz

Ok, I've transferred the issue here. I will check later.

hipersayanX avatar Oct 25 '21 20:10 hipersayanX

Apparently its dying when calling to DllCanUnloadNow without ever calling to any of the other entry points.

Screenshot_20211025_174055

hipersayanX avatar Oct 25 '21 20:10 hipersayanX

My bad, it was running the OBS camera which btw was also crashing too. Here's the log for AkVirtualCamera, it crash when it tries to enumerate the media types.

hipersayanX avatar Oct 26 '21 14:10 hipersayanX