Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error when closing window  (Read 12669 times)

0 Members and 1 Guest are viewing this topic.

jalov

  • Newbie
  • *
  • Posts: 6
    • View Profile
Error when closing window
« 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?

jalov

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error when closing window
« Reply #1 on: May 19, 2015, 11:31:28 pm »
The problem goes away if I build in release mode.

jalov

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error when closing window
« Reply #2 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.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: Error when closing window
« Reply #3 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!
DSFML - SFML for the D Programming Language.

jalov

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error when closing window
« Reply #4 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


 

anything