core.exception.InvalidMemoryOperationError
For starters, how do I remove the console window?
I tried using the linker flag SUBSYSTEM:WINDOWS, but now my program crashes on exit with the errorQuotecore.exception.InvalidMemoryOperationError
It seems that this is related to the "Destroying X" messages that were written on the console when there was a console. Since now there is no console, it is an error to print. :/
Furthermore, the code to print those messages are after a "debug" condition, so I tried building my program using "releaseMode" as a building option in my dub package but it didn't have any effect. It only had effect on the code that was after a debug condition in my program, does that mean I have to somehow build the DSFML wrapper in release mode?
Besides that I'm worried that those "Destroying X" messages only ever appeared when my program exited. I heard D is garbage collected, but should I be destroying anything manually in DSFML? How? If not why stuff is only ever destroyed when the program exits?
Source code of my worries: https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28DUB%29 (https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28DUB%29)
Do you get the same errors when you don't use SUBSYSTEM:WINDOWS? And do you know if there is any specific object that is causing the error? Also, if you are using SUBSYSTEM:WINDOWS, how do you know you are getting the memory issue? When I hide the console and I get this kind of error it usually just crashes for me.
What do you mean by "It only had effect on the code that was after a debug condition in my program"? Can you elaborate a little on that?
Are you absolutely sure that you are using that code and you haven't modified it in any way?
Some other info would be much appreciated too.
1. What OS are you compiling on?
2. Are you compiling in 32 or 64 bits?
3. Where did you get the shared libraries you are using?
QuoteWhat do you mean by "It only had effect on the code that was after a debug condition in my program"? Can you elaborate a little on that?
In my program a statement such asdebug x = 5;
Will not get executed if I use the "releaseMode" option. But the statements in the wrapper such as this (https://github.com/Jebbs/DSFML/blob/master/src/dsfml/graphics/vertexarray.d#L82) (template (https://github.com/Jebbs/DSFML/blob/master/src/dsfml/system/config.d#L17)) are still executed.
It seems to me that while your actual application is building in release mode, the library is building in debug. This could be a bug in DUB. What version are you using?