You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, when i have this enabled with static /mt option compiled with Visual Studio 2019
.lib also compiled with /MT
Randomly sometimes the deconstructor gets called without warning and crashes while trying to draw the radialight
I completely removed the deconstructor and decided to call it manually and its fixed
100% The deconstructor was at fault and being called "Randomly",, this was happening with just a simple radiallight being initalized and drawn like so:
`// create a light source
candle::RadialLight light;
light.setRange(150);
this->lightsources.push_back(light);`
candle::LightingArea fog(candle::LightingArea::FOG,
sf::Vector2f(0.f, 0.f),
sf::Vector2f(680, 480.f));
fog.setAreaColor(sf::Color::Black);
fog.setAreaOpacity(fogopacity);
fog.clear();
for (int i = 0; i < this->lightsources.size(); ++i)
{
fog.draw(lightsources[i]);//would randomly deconstruct this and then draw and then crash
}
for (int i = 0; i < this->lightsources2.size(); ++i)
{
fog.draw(lightsources2[i]);
}
fog.display();
Device->draw(fog);
And here was the modifications i made to fix the error in the Memory Module / .lib
SFML Event Closed:
Which results in:
The text was updated successfully, but these errors were encountered:
EOSource
changed the title
#RadialLightFix decontructor problem
#RadialLightFix deconstructor problem
Nov 10, 2021
EOSource
changed the title
#RadialLightFix deconstructor problem
#RadialLightFix deconstructor problem along with Access Violations
Nov 10, 2021
Mmm this is a though one. I don't know what's causing this random destructor calls... and for some reason I'm not able to reproduce them. I think I need to test it with different compilers to see what's wrong.
I just warn you that if you wanted to add that to a PR I would have to decline it, because although it works for you, it would cause compatibility problems with the existent library. But I'm happy to see that at least you have fixed it for you.
Thank you, @EOSource . I'll report here if some changes are made that might solve this problem.
Hello, when i have this enabled with static /mt option compiled with Visual Studio 2019
.lib also compiled with /MT
Randomly sometimes the deconstructor gets called without warning and crashes while trying to draw the radialight
I completely removed the deconstructor and decided to call it manually and its fixed
100% The deconstructor was at fault and being called "Randomly",, this was happening with just a simple radiallight being initalized and drawn like so:
And here was the modifications i made to fix the error in the Memory Module / .lib
SFML Event Closed:
Which results in:
The text was updated successfully, but these errors were encountered: