ifcplusplus icon indicating copy to clipboard operation
ifcplusplus copied to clipboard

errror : bad allocation

Open BoyChan opened this issue 4 years ago • 3 comments

Hi, I cannot load a big IFC file ( about 2.0GB) by SimpleViewerExampleQt, and send a message 'Error : bad allocation'. Do you know how to solve it ? Thanks :)

BoyChan avatar Apr 10 '20 16:04 BoyChan

I did not encounter such a problem yet. Since this is an open source project, you can also figure out a solution (google, implement, debug, etc), and open a pull request. Thanks :)

ifcquery avatar Apr 11 '20 15:04 ifcquery

I did not encounter such a problem yet. Since this is an open source project, you can also figure out a solution (google, implement, debug, etc), and open a pull request. Thanks :)

Thanks. I try to find the reason that the size of IFC file is out of the range(type:int).therefore, the datatype is modified to the datatype of size_t and can solve the little bug.

BoyChan avatar Apr 14 '20 14:04 BoyChan

I have a similar issue in debug mode. I use this library in my project. If I read a big file first the program crashes. If I read a small file first it works, and if I read a large file after that it also works. The crash comes from division by zero in CSG::classifyFaceGroupsEdge/processOneEdge/vector::normalized So I get different nodes from the model in different scenarios. In the first scenario in many cases the edges have the same node on both ends. It looks like some memory related problem. I hope it helps the investigation but maybe it's a different bug.

Sydra7 avatar Apr 25 '20 19:04 Sydra7