Closed victorlevasseur closed 9 years ago
Is this happening with any example?
Yes, Dynamic Lights and Laser & Zombies It seems that the crash occurs when a light is inside a light obstacle.
Ok, surely an edge case causing the crash :/ I guess a debug build would be useful to see precisely what's going on.
Do you know how to reproduce the bug? I wasn't able to make the lights crash when previewing the Physics with lights example nor the dynamic lights. (Not tried yet with Laser & Zombies).
You can reproduce it by putting a light inside a light obstacle. It seems that it doesn't happen on Linux...
I think this game suffers the same bug : http://forum.compilgames.net/viewtopic.php?f=4&t=6761&p=51764#p51753
Looks like a heisenbug, when I try with a Debug build, or even a RelWithDebInfo build, no crash on Windows. :( (Not sure the game is working properly though because using my virtual machine I have not proper rendering of the scene).
Fixed in https://github.com/4ian/GD/commit/a4de75d2516f8d46afa3e77687f91388606a6741 :smile: It was due to comparison between sf::Vector2f returning null even if the vectors were equal, surely a rounding error or something related to floating number precision.
Here is the gdb output :