[2.4.2-dfsg] Possible SIGSEGV in Post/PViewDataGModel.cpp on reading single-component single-node node field
Hi,
I have a MSH file I generated with a program, following the syntax description in the documentation (MSH ASCII file format). This file contain 2 node fields:
- a "complete" (DX,DY,DZ) displacement field for all nodes of the model; and
- an "incomplete" (DX only) displacement field for a single node, intended to provide data to draw a 2D time evolution. I do not know if my file conforms with the official syntax, this is the reason why I wrote "Possible SIGSEGV" in the title. However, I got a SIGSEGV every time so, even if my file is non conformant, Gmsh should discard it without crashing. This is the reason why I fill this bug report. When drawing with "plot type = 3D" nothing appears but there is no crash. When switching to "plot type = 2D (space or time)" then Gmsh crash on getValue() in PViewDataGModel::getValue(int, int, int, int, int, double&) because it loops on all nodes without checking there is actually some data available in the current field. In my case, only 1 node has some data attached to it in the 2nd field, so every other node has no data and _steps[step]->getData(e->getNum()) returns 0, which is used in _steps[step]->getData(e->getNum())[num] and thus crashes. What do you think? Is it impossible to use a 1-node field?
Thanks in advance, Jérôme