[cgma-dev] Seg fault when loading OCC geometry with associations

Jiangtao Hu jiangtao_ma at yahoo.com
Sat Mar 28 14:47:17 CDT 2009



Hi, Jed

When you save the geometry file, it crashed, which means the brep file you get may already been wrong. That explained the crash when you load it again. 

Can you send a journal file to demonstrate the first crash? 

Jane

--- On Sat, 3/28/09, Jed Brown <jed at 59A2.org> wrote:

> From: Jed Brown <jed at 59A2.org>
> Subject: [cgma-dev] Seg fault when loading OCC geometry with associations
> To: cgma-dev at mcs.anl.gov
> Date: Saturday, March 28, 2009, 2:22 PM
> My brick generator creates some boundary conditions using
> the Cubit
> conventions, and creates a geometric model using CGM (built
> with OCC)
> via iGeom_createBrick.  If I associate the boundary sets
> with the brick
> (wrong, but bear with me) using iRel (geometry first, I get
> seg-faults
> if I try mesh first) and save the mesh (in .h5m) and
> geometry (to a
> .brep, with TYPE=OCC) then I can load them with another
> program.  When I
> try to get the geometric entity related to a boundary set,
> I get a point
> instead of the volume that I should get.
> 
> If I use iGeom_getEntAdj to get the faces of the brick and
> associate my
> boundary sets with those faces (what I actually want to do)
> then I get a
> seg-fault with the trace below.  Is this supposed to work? 
> Any ideas
> for debugging it?
> 
> Why does CGM use different options delimiters
> (":,\n\t") than MOAB
> (";")?  I have discovered "ENGINE=OCC"
> for iGeom_newGeom and "TYPE=OCC"
> for iGeom_load by reading the source, but are there other
> options to be
> aware of?
> 
> Perhaps these problems go away when using ACIS, but I need
> to use OCC
> until our Cubit license comes through.
> 
> Jed
> 
> 
> $ gdb --args ~/iMesh/rtest dblock.brep dblock.h5m 200
> (gdb) r
> Starting program: /home/jed/iMesh/rtest dblock.brep
> dblock.h5m 200
> [Thread debugging using libthread_db enabled]
> [New Thread 0x7f4044c47700 (LWP 22373)]
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f4044c47700 (LWP 22373)]
> 0x00007f40431c8f1c in CubitStringRep::increment
> (this=0x800000001) at ../../util/CubitString.cpp:80
> 80        ++refCount;
> Current language:  auto; currently c++
> (gdb) bt
> #0  0x00007f40431c8f1c in CubitStringRep::increment
> (this=0x800000001) at ../../util/CubitString.cpp:80
> #1  0x00007f40431c8f80 in CubitString (this=0x277a810,
> s=@0x277a6f0) at ../../util/CubitString.cpp:126
> #2  0x00007f40430a731d in
> CubitSimpleAttrib::initialize_from_lists (this=0x277a890,
> string_list=0x7fff4cc97150, 
>     double_list=0x7fff4cc97130, int_list=0x7fff4cc97110) at
> ../../geom/CubitSimpleAttrib.cpp:156
> #3  0x00007f40430a80f7 in CubitSimpleAttrib
> (this=0x277a890, string_list=0x7fff4cc97150,
> double_list=0x7fff4cc97130, 
>     int_list=0x7fff4cc97110) at
> ../../geom/CubitSimpleAttrib.cpp:90
> #4  0x00007f4042e1a396 in
> OCCShapeAttributeSet::ReadAttribute (this=0x7fff4cc97590,
> S=@0x7fff4cc972d0, IS=@0x7fff4cc97380, 
>     l_attr=@0x7fff4cc97360) at
> ../../../geom/OCC/OCCShapeAttributeSet.cpp:473
> #5  0x00007f4042e1a97f in OCCShapeAttributeSet::Read
> (this=0x7fff4cc97590, IS=@0x7fff4cc97380,
> l_attr=@0x7fff4cc97360, 
>     print_results=true) at
> ../../../geom/OCC/OCCShapeAttributeSet.cpp:758
> #6  0x00007f4042e71632 in OCCQueryEngine::Read
> (this=0x276ebd0, Sh=@0x20007958, File=0x2774fe0
> "dblock.brep", label=
>       {myLabelNode = 0x276ef30}, print_results=true) at
> ../../../geom/OCC/OCCQueryEngine.cpp:1146
> #7  0x00007f4042e7183e in
> OCCQueryEngine::import_solid_model (this=0x276ebd0,
> file_name=0x2774fe0 "dblock.brep", 
>     file_type=0x7f4044661f06 "OCC",
> imported_entities=@0x7fff4cc97900, print_results=true,
> logfile_name=0x0, heal_step=true, 
>     import_bodies=true, import_surfaces=true,
> import_curves=true, import_vertices=true,
> free_surfaces=true)
>     at ../../../geom/OCC/OCCQueryEngine.cpp:1192
> #8  0x00007f40430f1b05 in
> GeometryQueryTool::import_solid_model (this=0x276c310,
> file_name=0x2774fe0 "dblock.brep", 
>     file_type=0x7f4044661f06 "OCC",
> logfile_name=0x0, heal_step=true, import_bodies=true,
> import_surfaces=true, import_curves=true, 
>     import_vertices=true, free_surfaces=true,
> imported_entities=0x0) at
> ../../geom/GeometryQueryTool.cpp:624
> #9  0x00007f40430f2fbc in
> GeometryQueryTool::read_geometry_file (this=0x276c310,
> fileName=0x2774ce8 "dblock.brep", includePath=0x0,
> 
>     type=0x7f4044661f06 "OCC") at
> ../../geom/GeometryQueryTool.cpp:213
> #10 0x00007f404465afa6 in igeom_load_
> (instance=0x7f404486dac0, name=0x2774ce8
> "dblock.brep", options=0x7fff4cc97bf0
> "TYPE=OCC:", 
>     err=0x7fff4cc97bec, name_len=11, options_size=10) at
> ../../itaps/iGeom_CGMA.cc:363
> #11 0x0000000000403c4f in main (argc=4,
> argv=0x7fff4cc97d08) at rtest.c:260
> (gdb) quit


      


More information about the cgma-dev mailing list