Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library crashes when tries to show camera stream. #94

Open
WrongBit opened this issue Nov 25, 2019 · 1 comment
Open

Library crashes when tries to show camera stream. #94

WrongBit opened this issue Nov 25, 2019 · 1 comment

Comments

@WrongBit
Copy link

In WPF app I made VideoCaptureElement named 'camVideo'. In the code I do:

camVideo.VideoCaptureDevice = MultimediaUtil.VideoInputDevices[camIdx];

Previously this program worked, but a few week later I tried to check function again and... it crashes! Inner exception is:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt. System.Exception {System.AccessViolationException}

Stack trace:

at DirectShowLib.ICaptureGraphBuilder2.RenderStream(DsGuid PinCategory, DsGuid MediaType, Object pSource, IBaseFilter pfCompressor, IBaseFilter pfRenderer)
at WPFMediaKit.DirectShow.MediaPlayers.VideoCapturePlayer.SetupGraph() in c:\Dev\SideUtils\WPF-MediaKit-master\Source\DirectShow\MediaPlayers\VideoCapturePlayer.cs:line 369
at WPFMediaKit.DirectShow.MediaPlayers.VideoCapturePlayer.Play() in c:\Dev\SideUtils\WPF-MediaKit-master\Source\DirectShow\MediaPlayers\VideoCapturePlayer.cs:line 229
at WPFMediaKit.DirectShow.Controls.MediaElementBase.b__86_0() in c:\Dev\SideUtils\WPF-MediaKit-master\Source\DirectShow\Controls\MediaElementBase.cs:line 562

One of googled issues was... second monitor! (and this is exactly what changed - I got second LCD). But I cannot believe library so stupidly crashes on one of the popular config. Any ideas?

@WrongBit
Copy link
Author

Seems I spot that idiotic "point of failure": BITNESS of your build! If you setup project for x86 (or "prefer 32 bit"), everything works fine. But in x64 mode program crashes! We live in 21st century, but MS still cannot make 3D subsystem 64-bit?? (DirectShow module)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant