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

System.AccessViolationException #328

Open
arshadch123 opened this issue Nov 19, 2024 · 3 comments
Open

System.AccessViolationException #328

arshadch123 opened this issue Nov 19, 2024 · 3 comments

Comments

@arshadch123
Copy link

arshadch123 commented Nov 19, 2024

On the following line when it start recording it show Systm.AccessViolationException: Attemp to read or write protected memory. This is often an indication that other memory is corrupt.

_recorder = ScreenRecorderLib.Recorder.CreateRecorder(opts);

This exception is on some computers not all.

Any solution please.

@sskodje
Copy link
Owner

sskodje commented Nov 19, 2024

I can't say from such a generic error. If you can post logs perhaps i can help more. Configure logging for Trace for best detail.

@Jason-Tan-ISJ
Copy link

Jason-Tan-ISJ commented Nov 21, 2024

I have the same problem as well, on window 10 IOT Enterprise version, there is no problem on my window 11 development machine, what i get from the debug, it shows below..

Exception thrown at 0x00007FFE2A723020 (msvcp140.dll) in TestConsoleAppDotNetCore.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

on the console, it shows below:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:

at .RecordingManager.{ctor}(RecordingManager*)

at ScreenRecorderLib.Recorder..ctor(ScreenRecorderLib.RecorderOptions)
at ScreenRecorderLib.Recorder.CreateRecorder(ScreenRecorderLib.RecorderOptions)
at Program.Main(System.String[])

C:\Users\xxxx\ScreenRecorderLib-master\TestConsoleAppDotNetCore\bin\x64\Debug\net8.0\TestConsoleAppDotNetCore.exe (process 6100) exited with code -1073741819.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.

Is there any solution?

Edit :
i found this article below and I try rollback using ScreenRecorderLib version from 6.3.0 to 6.2.0, apparently the error didn't appear anymore.. maybe this would help to look into the problem..

https://developercommunity.visualstudio.com/t/msvcp140dll-crash-mutex-with-code-built/10753114?sort=newest&topics=visual+studio+2017

@sskodje
Copy link
Owner

sskodje commented Nov 21, 2024

Thats very interesting, and may very well be the cause. I'll compile with the flag for next release, to avoid people having to upgrade redistributables.

sskodje added a commit that referenced this issue Nov 22, 2024
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

3 participants