1
D / Re: Access Violation?
« on: October 20, 2016, 06:10:20 pm »
I put a bunch of writeln calls in renderwindow.d and sprite.d to see where it crashes. It turns out window.draw(sprite) calls sprite.draw(window, states) which in turn calls the overload of window.draw that takes an array of vertices, a primitive type and render states. The code then crashes after the sfRenderWindow_drawPrimitives call. sfRenderWindow_drawPrimitives is an extern(C) function so that leads me to believe the issue is in the dfmlc-graphics.lib file. I built DSFML 2.1.1 using dub but it didn't include the dsfmlc-*.lib files, so I downloaded those from here : http://dsfml.com/downloads.html
You think those could be outdated ?
Here's the output of the writeln calls :
You think those could be outdated ?
Here's the output of the writeln calls :
Code: [Select]
renderwindow.d:517 : dsfml.graphics.sprite.Sprite.draw(dsfml.graphics.renderwindow.RenderWindow, RenderStates(Alpha, , Rebindable!(const(Texture))(#{overlap original, stripped}), Rebindable!(const(Shader))(#{overlap original, stripped})));
sprite.d:200: draw(dsfml.graphics.renderwindow.RenderWindow, RenderStates(Alpha, Rebindable!(const(Texture))(#{overlap original, stripped}), Rebindable!(const(Shader))(#{overlap original, stripped})));
sprite.d:206 dsfml.graphics.renderwindow.RenderWindow.draw([Vertex(X: 0 Y: 0, R: 255 G: 255 B: 255 A: 255, X: 0 Y: 0), Vertex(X: 0 Y: 145, R: 255 G: 255 B: 255 A: 255, X: 0 Y: 145), Vertex(X: 277 Y: 145, R: 255 G: 255 B: 255 A: 255, X: 277 Y: 145), Vertex(X: 277 Y: 0, R: 255 G: 255 B: 255 A: 255, X: 277 Y: 0)], Quads, RenderStates(Alpha, , Rebindable!(const(Texture))(#{overlap original, stripped}), Rebindable!(const(Shader))(#{overlap original, stripped})));
renderwindow.d:533 draw([const(Vertex)(X: 0 Y: 0, R: 255 G: 255 B: 255 A: 255, X: 0 Y: 0), const(Vertex)(X: 0 Y: 145, R: 255 G: 255 B: 255 A: 255, X: 0 Y: 145), const(Vertex)(X: 277 Y: 145, R: 255 G: 255 B: 255 A: 255, X: 277 Y: 145), const(Vertex)(X: 277 Y: 0, R: 255 G: 255 B: 255 A: 255, X: 277 Y: 0)], Quads, RenderStates(Alpha, , Rebindable!(const(Texture))(#{overlap original, stripped}), Rebindable!(const(Shader))(#{overlap original, stripped})));
renderwindow.d:546 : sfRenderWindow_drawPrimitives(7CC9C8, 19D307C, 4, Quads, Alpha, 12FC90, 7CC608, 7CC988);
object.Error@(0): Access Violation
----------------