Closed SimonPierreED closed 1 month ago
Describe the bug A memory corruption seems to occur when using sorted queries with std::list in any components.
To Reproduce
#include <sorting.h> #include <iostream> +#include <list>
struct Position { double x, y;
// Order by x member of Position int compare_position( [...]
**Expected behavior** The example compile and run just fine. **Current behavious** ```log -- First iteration {1,0} {2,0} {4,0} {5,0} {6,0} -- Second iteration {2,0} {4,0} {5,0} {6,0} {7,0} -- System iteration {2,0} {3,0} {4,0} {5,0} {6,0} {7,0} free(): invalid pointer Aborted
Additional context
Compiled on windows WSL2 : g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Release and debug cause the same issue.
The list seems to be in a weird state in the destructor.
This is currently completely preventing me from used sorting. But otherwise thanks for the great work!
Fixed!
Describe the bug A memory corruption seems to occur when using sorted queries with std::list in any components.
To Reproduce
struct Position { double x, y;
// Order by x member of Position int compare_position( [...]
Additional context
Compiled on windows WSL2 : g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Release and debug cause the same issue.
The list seems to be in a weird state in the destructor.
This is currently completely preventing me from used sorting. But otherwise thanks for the great work!