Skip to content

test_pruning fails under Windows #53

Closed
@merfels

Description

@merfels

Hi,

the test case test_pruning fails under Windows 64bit Visual Studio 2010 for unknown reason. This is a minimal code example which shows the same behavior:

double res = 0.01;
OcTree tree(res);

for (double x=0.005; x <= 0.32; x+=res){
    for (double y=0.005; y <= 0.32; y+=res){
        for (double z=0.005; z <= 0.32; z+=res){                
            OcTreeNode* node = tree.updateNode(x,y,z, true);
            /*if(!tree.isNodeOccupied(node)) {
                node = tree.search(x,y,z);
            }*/
            EXPECT_TRUE(node);
            EXPECT_TRUE(tree.isNodeOccupied(node));
        }
    }
}

In this setup, it will return false for tree.isNodeOccupied(node) for (x,y,z) = (0.015, 0.015, 0.015) and I have no idea why. It works under Linux though. If you add the commented part (tree.search()) then you will notice that this function returns another pointer than tree.updateNode(), and then isNodeOccupied yields true. Do you have any idea why this code doesn't work?

Edit: so everything I stated above is true for when you compile it in Debug mode, but there seems to be no problem in Release mode?!

Best,
Christian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions