CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.98k stars 1.39k forks source link

c3t3_io_plugin crash while trying to read c3t3_io-hetero.binary.cgal #2858

Closed janetournois closed 6 years ago

janetournois commented 6 years ago

Issue Details

I tried to load the files Mesh_3/test/Mesh_3/data/c3t3_io-hetero.binary.cgal and Mesh_3/test/Mesh_3/data/c3t3_io-hetero.cgal in the demo, and both fail with the following pop-up : "Unhandled exception : vector too long"

@maxGimeno can you please have a look?

Environment

maxGimeno commented 6 years ago

Mesh_3/test/Mesh_3/data/c3t3_io-hetero.cgal has been generated with a triangulation which IO_signature is not known by the demo : it has "Triangulation_3(Weighted_point,Vb(Tvb_3+i+boost::variant<enum,std::pair<i,i>,i,d>),Cb(enum+RTcb_3+(std::pair<i,i>)[4]))" but the "Fake_c3t3" expects "Triangulation_3(Weighted_point,Vb(Tvb_3+i+i),Cb(i+RTcb_3+(i)[4]))". So the load() function goes further and tries to load a binary format, and misread some information, which leads to the creation of a vector of a size of a few billions, hence the exception.

This is the exact same problem with the binary version.

So either we add another kind of Fake_c3t3 in the demo, either we re-generate the data sets with the current Fake_c3t3, I guess.

lrineau commented 6 years ago

I have modified the title of the issue: the problem is not that the demo cannot open the file, but that it crashes while trying, instead of displaying an error message.

janetournois commented 6 years ago

thank you!