hku-mars / ikd-Tree

This repository provides implementation of an incremental k-d tree for robotic applications.
GNU General Public License v2.0
611 stars 172 forks source link

在类里面定义ikd_tree时程序崩溃 #8

Closed AFEICHINA closed 3 years ago

AFEICHINA commented 3 years ago

嗨, 我在测试最新版本ikdtree的时候遇到一个问题,当我在类中定义ikdtree的时候,程序总是Segmentation fault (core dumped)。你能修复一下这个问题吗? 谢谢!

XW-HKU commented 3 years ago

嗨, 我在测试最新版本ikdtree的时候遇到一个问题,当我在类中定义ikdtree的时候,程序总是Segmentation fault (core dumped)。你能修复一下这个问题吗? 谢谢!

could you append some code here to let us see what happends

AFEICHINA commented 3 years ago

`#include "ikd_Tree.h" // KD_TREE kdtree;

class Test{ public: Test(){printf("test\n");} KD_TREE kdtree; };

int main(int argc, char** argv){ printf("Testing ...\n"); Test test; return 0; } ` 你好,这是我的测试代码,谢谢。

Ecstasy-EC commented 3 years ago

@AFEICHINA Please define the ikd-Tree (and any class that includes it) as a global variable since multi-thread is required.

AFEICHINA commented 3 years ago

@AFEICHINA Please define the ikd-Tree (and any class that includes it) as a global variable since multi-thread is required.

Thanks