-
Notifications
You must be signed in to change notification settings - Fork 4
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 #3
Comments
I get the same issue here. Could you resolve the issue in February? |
I get this too but at random. Some times I do, other times I dont. I'll try to figure out if theres a way to workaround it Edit: Took a look and there is no consistent way to detect that it is broken. some times some values of the Spout instance are 01010101.... when its broken but not always. Some some times SendImage will not fail, but only send a black image anyways. Something has to be going wrong in the construction phase of something because when it does work once, reusing the same instances will consistently work 100% of the time. |
I have a similar issue. Although from the testing I have conducted on my machine so far, it seems that I can reliably make it work or crash. If I set Serilog to output to console Spout works, at least I did not yet have it throw the exception in this case. If I set it to output to a file, it will throw, also reliably as of my current observations. |
I was unable to find an exact cause, but I have switched from using a managed byte array to using memory obtained by |
I already am kind of doing that - My sent pixels are obtained via LockBits |
Specifically what I am now doing that seems to work is allocate using |
Seems like we're having different issues then (See my first comment above). This didnt fix my problem FWIW |
For me this happens when I try to convert my bitmap to a JPEG byte array like so
The solution was to change to Bmp format
|
It's been a while, but I'm facing this issue as well. |
@JanMisker These should be the relevant extracts:
|
Thanks so much @YaF3li
And this works... |
@JanMisker I also eventually came up with that implementation and that does still error out occasionally for me - Tho it worked more consistently from what I remember |
Thank you for creating this .NET implementation of Spout2. I'm not sure if it's my configuration or what, but I believe I've followed the instructions correctly and I am getting the following Error, at "sender.SendImage" when I try run it.
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
Regularly I've seen that if the architecture was incorrect, but my build config is set to x64 per the ReadMe.
The text was updated successfully, but these errors were encountered: