Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

[MojoShader] MOJOSHADER_glSetVertexAttribDivisor causes 'System.AccessViolationException' on some computers #310

Closed
SeanColombo opened this issue May 9, 2015 · 3 comments

Comments

@SeanColombo
Copy link

We recently deployed Reversi with full FNA (HEAD of master as of about a week ago) and the version of MojoShader.dll (from the fnalibs) that was built on April 21st.

This works fine on our testing computers, including a Windows 7 computer, but a user in the wild reported this problem on a Win 7 computer (with updated video drivers):

20150508_15:27:52.632 INFO : Beginning first draw call
20150508_15:27:52.745 ERROR : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
20150508_15:27:52.748 ERROR : at MojoShader.MOJOSHADER_glSetVertexAttribDivisor(MOJOSHADER_usage usage, Int32 index, UInt32 divisor)
at Microsoft.Xna.Framework.Graphics.OpenGLDevice.ApplyVertexAttributes(VertexBufferBinding[] bindings, Int32 numBindings, Boolean bindingsUpdated, Int32 baseVertex)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType primitiveType, Int32 baseVertex, Int32 minVertexIndex, Int32 numVertices, Int32 startIndex, Int32 primitiveCount)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Int32 offset, Int32 batchSize)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.FlushBatch()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()

I verified that they have the right MojoShader.dll, and they don't have any other MojoShader.dlls installed.

(Apologies if I'm misunderstanding, and this doesn't end up being an FNA issue, but that's my best guess at the moment).

@flibitijibibo
Copy link
Owner

I'm thinking you found someone that managed to have ARB_draw_instanced, but not ARB_instanced_arrays. This will probably fix it:

213c964

@SeanColombo
Copy link
Author

@flibitijibibo thank you for the quick fix! Rebuilt & pushed it live, will let you know what the user says :)

@SeanColombo
Copy link
Author

That did the trick. Thanks @flibitijibibo! :D

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

No branches or pull requests

2 participants