I solved my issue in saving MED mesh.Error is caused by a reference to a
volatile address in GModelIO_MED.cpp (see
https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=29032683
for more info). I attached the patch that solves reported error, I hope it's
useful.
Archlinux uses gcc 5.3. New Cxx11 default ABI highlighted the problem.Regards.
Michele Mocciola
> On archlinux, saving mesh on MED file, I have the following error> >
> _MEDmeshDatagroupOpen.c [45] : Erreur à l'ouverture du groupe >
> _MEDmeshDatagroupOpen.c [45] : du maillage > _MEDmeshDatagroupOpen.c [46] :
> meshname = "1D_6"> MEDmeshNodeCoordinateWr.c [73] : Erreur à l'ouverture du
> groupe > MEDmeshNodeCoordinateWr.c [73] : du maillage >
> MEDmeshNodeCoordinateWr.c [74] : _meshpath = ""> MEDmeshNodeWr.c [72] :
> Erreur d'appel de l'API > MEDmeshNodeWr.c [72] : MEDmeshNodeCoordinateWr>
> _MEDmeshDatagroupOpen.c [45] : Erreur à l'ouverture du groupe >
> _MEDmeshDatagroupOpen.c [45] : du maillage > _MEDmeshDatagroupOpen.c [46] :
> meshname = "1D_6"> _MEDmeshAdvancedWr.c [125] : Erreur à l'ouverture du
> groupe > _MEDmeshAdvancedWr.c [125] : du maillage > _MEDmeshAdvancedWr.c
> [126] : _meshpath = ""> MEDmeshElementWr.c [79] : Erreur d'appel de l'API >
> MEDmeshElementWr.c [79] : MEDmeshElementConnectivityWr>
> _MEDmeshDatagroupOpen.c [45] : Erreur à l'ouverture du groupe >
> _MEDmeshDatagroupOpen.c [45] : du maillage > _MEDmeshDatagroupOpen.c [46] :
> meshname = "1D_6"> _MEDmeshAdvancedWr.c [125] : Erreur à l'ouverture du
> groupe > _MEDmeshAdvancedWr.c [125] : du maillage > _MEDmeshAdvancedWr.c
> [126] : _meshpath = ""> MEDmeshElementWr.c [79] : Erreur d'appel de l'API >
> MEDmeshElementWr.c [79] : MEDmeshElementConnectivityWr> > I got the above
> error with gmsh-2.10.1 and med-3.0.8, however I have similar error with
> med-3.10.0, gmsh-2.11.0 and gmsh-2.12.0. I think the problem is specific to
> Archlinux, but don't know > where to start debugging. In attachment you can
> find geo file.> Any idea? Help appreciated!> > Michele Mocciola
diff -Naur gmsh-2.12.0-source.orig/Geo/GModelIO_MED.cpp gmsh-2.12.0-source/Geo/GModelIO_MED.cpp
--- gmsh-2.12.0-source.orig/Geo/GModelIO_MED.cpp 2016-01-06 13:59:42.000000000 +0100
+++ gmsh-2.12.0-source/Geo/GModelIO_MED.cpp 2016-04-30 20:50:20.965186247 +0200
@@ -522,7 +522,8 @@
return 0;
}
- char *meshName = (char*)getName().c_str();
+ std::string strMeshName = getName();
+ char * meshName = (char*)strMeshName.c_str();
// Gmsh always writes 3D unstructured meshes
#if (MED_MAJOR_NUM == 3)
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh