Skip to content

Fail case with some point clouds #3

@zeraphil

Description

@zeraphil

Hi, I'm attempting to use this library to align some point clouds. On some clouds, for reasons I've yet to identify, I'm getting crashes in the build_tree_for_Range function, particularly in

` int c = -1;
float maxspread = 0.0;
int m;

  for (int i=0;i<dim;i++) {
    if ((parent == NULL) || (parent->cut_dim == i)) {
      spread_in_coordinate(i, l, u, node->box[i]);
    } else {
      node->box[i] = parent->box[i];
    }
    float spread = node->box[i].upper - node->box[i].lower;
    if (spread>maxspread) {
      maxspread = spread;
      c=i;
    }
  }`

where spread>maxspread never hits, and the array tries to index c=-1, which crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions