SFML community forums

Bindings - other languages => D => Topic started by: jalov on May 19, 2015, 04:15:08 pm

Title: Error when closing window
Post by: jalov on May 19, 2015, 04:15:08 pm
I've been checking out dsfml and it looks very promising.

When trying out the sample code (the one with the smiley) I ran into a problem. In order to get rid of the console window, I added the linkerflag "-L:/su:windows" to dub.json. It does suppress the console window but now when I exit the app I get an InvalidMemoryOperationError.

Any thoughts?
Title: Re: Error when closing window
Post by: jalov on May 19, 2015, 11:31:28 pm
The problem goes away if I build in release mode.
Title: Re: Error when closing window
Post by: jalov on May 20, 2015, 01:57:28 pm
I've set up dsfml with eclipse and DDT and can now better see what happens when I close the app. The following is printed to stdout:

Destroying Texture
Destroying Shader
Destroying RenderWindow
Destroying Window
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying CircleShape
Destroying CircleShape
Destroying CircleShape
Destroying CircleShape
Destroying RectangleShape
Destroying RectangleShape

But I don't get an error now. It only happens when I build from the command line.

So far I'm very impressed with DSFML, btw. It seems to be exactly what I was looking for.
Title: Re: Error when closing window
Post by: Jebbs on May 23, 2015, 06:34:55 pm
now when I exit the app I get an InvalidMemoryOperationError.

Any other information you can give me? Maybe a minimal example that reproduces the error when you build from the command line?

And you can suppress the destructor output by defining the version DSFML_Quiet_Destructors.

Documentation is spotty at best, but I hope to have a lot of stuff released mid summer. Until then, feel free to keep asking question!
Title: Re: Error when closing window
Post by: jalov on May 25, 2015, 12:14:08 am
Quote
Any other information you can give me? Maybe a minimal example that reproduces the error when you build from the command line?

It's just the sample code from the wiki (building your first DFSML Program), the one that draws a smiley, I didn't change much.

Quote
And you can suppress the destructor output by defining the version DSFML_Quiet_Destructors.

I see. That works.

Thanks