Randomly ocurring System.AccessViolationException freezing entire screen
See original GitHub issueI’ve been using osu-!framework for one of my personal game projects and after a while it randomly started to throw me AccessViolationExceptions. When I build and run, after some time in execution it randomly freezes my entire screen and turns it black and when the screen comes back to normal this error message is on the console:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at osu.Framework.Graphics.OpenGL.Buffers.GLVertexBuffer`1[[osu.Framework.Graphics.Rendering.Vertices.TexturedVertex2D, osu.Framework, Version=2022.1213.0.0, Culture=neutral, PublicKeyToken=null]].DrawRange(Int32, Int32)
at osu.Framework.Graphics.OpenGL.Batches.GLVertexBatch`1[[osu.Framework.Graphics.Rendering.Vertices.TexturedVertex2D, osu.Framework, Version=2022.1213.0.0, Culture=neutral, PublicKeyToken=null]].Draw()
at osu.Framework.Graphics.Rendering.Renderer.FlushCurrentBatch(System.Nullable`1<osu.Framework.Graphics.Rendering.FlushBatchSource>)
at osu.Framework.Graphics.Rendering.Renderer.setMaskingInfo(osu.Framework.Graphics.Rendering.MaskingInfo, Boolean, Boolean)
at osu.Framework.Graphics.Rendering.Renderer.PopMaskingInfo()
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawChildrenOpaqueInteriors(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Graphics.Containers.CompositeDrawable+CompositeDrawableDrawNode.DrawOpaqueInteriorSubTree(osu.Framework.Graphics.Rendering.IRenderer, osu.Framework.Graphics.Rendering.DepthValue)
at osu.Framework.Platform.GameHost.DrawFrame()
at osu.Framework.Threading.GameThread.processFrame()
at osu.Framework.Threading.GameThread.RunSingleFrame()
at osu.Framework.Threading.GameThread.<createThread>g__runWork|66_0()
at System.Threading.Thread+StartHelper.Callback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Thread.StartCallback()
I don’t know what exactly is causing the problem since the timing of the freezing is always random, sometimes even when the test browser just appeared it crashes.
Issue Analytics
- State:
- Created 9 months ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Windows 10 Randomly Hanging/Freezing, as w...
Hello everyone - I made a quick video to describe my overall issue that goes into greater depth than this post.
Read more >c# - Programs randomly getting System. ...
This issue is caused by the code which gathers return values. It is possible to work around the issue by disabling Managed return...
Read more >Whole System Is Freezing With No Errors
Whole System Is Freezing With No Errors. For the past 2 weeks now my system locks up and freezes after a random amount...
Read more >Roon keeps freezing and crashing on Windows (mostly ...
Started a new Roon Core database. Crashes can happen on waking from sleep, waking up monitor or just switching from another app. I...
Read more >Game freezes for .5 - 3 seconds non-stop at random times
Recently while playing TBC classic, my game has at random times gone into a freezing fit. It will freeze/stutter from anywhere between .5...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tested running my project and a newly created template project on multiple computers and on linux and windows. On linux the projects run without a problem but on windows on both the computers I tested them on it seems to cause problems even when only rendering a single screen. I am getting these results in windows: (sorry for any background noises and for bad quality, had to record this on my phone)
https://user-images.githubusercontent.com/95419791/210091928-650f885b-819d-4b30-981b-3abaf5d0e728.mp4
https://user-images.githubusercontent.com/95419791/210092116-b799bde1-1dcf-4ef2-86be-3339bd8ea206.mp4
Closing as resolved.