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

Tim Tautges tautges at mcs.anl.gov
Sat Mar 28 15:02:29 CDT 2009



Jed Brown wrote:
> 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.
> 

Hmm.  Right now, Lasso (my iRel implementation) matches mesh to geometry 
by matching mesh set global id (GLOBAL_ID tag) and geometric dimension 
(GEOM_DIMENSION tag) to geom entity global id and type/dimension.  Do 
the tags on the mesh sets and geom entities match like that?

I know that's pretty specific, eventually we may have something more 
general, but not soon.

> 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?
> 

That's one for Jane to debug, please send the files necessary to 
reproduce the problem.

> 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?
> 

Likely that MOAB got updated and CGM didn't; Jason, can you fix this one?

> Perhaps these problems go away when using ACIS, but I need to use OCC
> until our Cubit license comes through.
> 

Yep.  This OCC testing is quite valuable, not something we do a lot of 
yet, so keep the bug reports coming.

- tim

> 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

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the cgma-dev mailing list