[cgma-dev] testgeom_occ

Rajeev Jain jain at mcs.anl.gov
Mon May 21 13:44:33 CDT 2012


The error is sure OS related, it works on Linux flawlessly. copy_body seems to do something, not sure if it's right, below is the print of *blank_copy and *this_blank after copy_body operation:

(gdb) r
Starting program: /Users/rajeevjain/cgm/itaps/testgeom_occ 
Reading symbols for shared libraries ++++++++++++++++++++++++++++++..................................... done
Using default input file: ./../test/LeverArm.brep
Geometry engine set to: OpenCascade 6.5


ITAPS GEOMETRY INTERFACE TEST PROGRAM:

   gLoad: 
Constructed 1 Volume: 1
Model contents: 
vertices: 99
edges: 159
faces: 63
regions: 1
Success
   tags: Tags defined on model: GLOBAL_ID, NAME
Success
   gentity sets: Success
   topology adjacencies: Success
   construct: Created swept volume 4
Updated volume 3
Success
   primitives: Success
   transforms: Success

Breakpoint 2, iGeom_subtractEnts (instance=0x10085e8c0, blank=0x104e7fe50, tool=0x104e7ef40, geom_entity=0x7fff5fbff8b0, err=0x7fff5fbff8cc) at iGeom_CGMA.cc:6234
6234  if (NULL == blank_copy) {
(gdb) p *blank_copy
$1 = {
  <GroupingEntity> = {
    <TopologyEntity> = {
      <ModelEntity> = {
        _vptr$ModelEntity = 0x10085a470, 
        deactivatedStatus_ = 0 '\0', 
        encountered_ = 0 '\0'
      }, 
      members of TopologyEntity: 
      bridgeMan = {
        <TBOwner> = {
          _vptr$TBOwner = 0x10085a790
        }, 
        members of BridgeManager: 
        topologyEntity = 0x104e7d380, 
        mergeList = {
          <std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >> = {
            _M_impl = {
              <std::allocator<TopologyBridge*>> = {
                <__gnu_cxx::new_allocator<TopologyBridge*>> = {<No data fields>}, <No data fields>}, 
              members of std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >::_Vector_impl: 
              _M_start = 0x104e8ba70, 
              _M_finish = 0x104e8ba78, 
              _M_end_of_storage = 0x104e8ba78
            }
          }, <No data fields>}
      }
    }, 
    members of GroupingEntity: 
    myParent = 0x0, 
    nextInParent = 0x0, 
    prevInParent = 0x0, 
    firstSenseEntity = 0x104e809b0, 
    lastSenseEntity = 0x104e809b0
  }, 
  <RefEntity> = {
    <CubitEntity> = {
      _vptr$CubitEntity = 0x10085a520, 
      entityId = 11
    }, 
    <CubitObservable> = {
      _vptr$CubitObservable = 0x10085a618, 
      observerList = 0x0
    }, 
    <ToolDataUser> = {
      _vptr$ToolDataUser = 0x10085a648, 
      toolData = 0x0
    }, 
    <CubitAttribUser> = {
      _vptr$CubitAttribUser = 0x10085a6b0, 
      headAttrib = 0x0
    }, 
    members of RefEntity: 
    autoMergeStatus = 3, 
    markedFlag = 0, 
    listFlag = 0, 
    mColor = -1
  }, <No data fields>}
(gdb) p *this_blank
$2 = {
  <GroupingEntity> = {
    <TopologyEntity> = {
      <ModelEntity> = {
        _vptr$ModelEntity = 0x10085a470, 
        deactivatedStatus_ = 0 '\0', 
        encountered_ = 0 '\0'
      }, 
      members of TopologyEntity: 
      bridgeMan = {
        <TBOwner> = {
          _vptr$TBOwner = 0x10085a790
        }, 
        members of BridgeManager: 
        topologyEntity = 0x104e7fdf0, 
        mergeList = {
          <std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >> = {
            _M_impl = {
              <std::allocator<TopologyBridge*>> = {
                <__gnu_cxx::new_allocator<TopologyBridge*>> = {<No data fields>}, <No data fields>}, 
              members of std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >::_Vector_impl: 
              _M_start = 0x104e7fbf0, 
              _M_finish = 0x104e7fbf8, 
              _M_end_of_storage = 0x104e7fbf8
            }
          }, <No data fields>}
      }
    }, 
    members of GroupingEntity: 
    myParent = 0x0, 
    nextInParent = 0x0, 
    prevInParent = 0x0, 
    firstSenseEntity = 0x104e7f500, 
    lastSenseEntity = 0x104e7f500
  }, 
  <RefEntity> = {
    <CubitEntity> = {
      _vptr$CubitEntity = 0x10085a520, 
      entityId = 9
    }, 
    <CubitObservable> = {
      _vptr$CubitObservable = 0x10085a618, 
      observerList = 0x0
    }, 
    <ToolDataUser> = {
      _vptr$ToolDataUser = 0x10085a648, 
      toolData = 0x0
    }, 
    <CubitAttribUser> = {
      _vptr$CubitAttribUser = 0x10085a6b0, 
      headAttrib = 0x104e836d0
    }, 
    members of RefEntity: 
    autoMergeStatus = 3, 
    markedFlag = 0, 
    listFlag = 0, 
    mColor = -1
  }, <No data fields>}
 
Rajeev



>________________________________
> From: Jane Hu <janejhu at gmail.com>
>To: Rajeev Jain <jain at mcs.anl.gov> 
>Cc: CGMA Development <cgma-dev at mcs.anl.gov> 
>Sent: Monday, May 21, 2012 1:16 PM
>Subject: Re: testgeom_occ
> 
>
>You may try merge_cubit13.1 branch, this has some minor function signature's changes, it shouldn't affect the result of running testcases in occ. 
>
>Can you double check if a new_body is created in the copy_body process? I suspect that the problem is still in the copy_body place, where it didn't find underlining TopoDS_Shape. Then it could be just related to the OS, which may be a bug there.
>
>Jane
>
>
>On Mon, May 21, 2012 at 12:22 PM, Rajeev Jain <jain at mcs.anl.gov> wrote:
>
>Thanks Jane for looking into this, we made some progress, I made the changes you made to cgm repo version, I'm using CGM repo version with OCC-6.5 not the merge-cubit13.1 branch - should I use this branch instead?
>>
>>
>>We made some progress with the change you made the error is now on line 6249 instead of 6233 in file iGeom_CGMA.cc, which is the subtract operation, the copy operation seems to have gone through, please see debugger o/p below:
>>
>>
>>(gdb) r
>>Starting program: /Users/rajeevjain/cgm/itaps/testgeom_occ 
>>Reading symbols for shared libraries ++++++++++++++++++++++++++++++..................................... done
>>Using default input file: ./../test/LeverArm.brep
>>Geometry engine set to: OpenCascade 6.5
>>
>>
>>
>>
>>ITAPS GEOMETRY INTERFACE TEST PROGRAM:
>>
>>
>>   gLoad: 
>>Constructed 1 Volume: 1
>>Model contents: 
>>vertices: 99
>>edges: 159
>>faces: 63
>>regions: 1
>>Success
>>   tags: Tags defined on model: GLOBAL_ID, NAME
>>Success
>>   gentity sets: Success
>>   topology adjacencies: Success
>>   construct: Created swept volume 4
>>Updated volume 3
>>Success
>>   primitives: Success
>>   transforms: Success
>>
>>
>>Program received signal EXC_BAD_ACCESS, Could not access memory.
>>Reason: 13 at address: 0x0000000000000000
>>0x00000001041f8edf in Handle_Standard_Transient::Assign ()
>>(gdb) bt
>>#0  0x00000001041f8edf in Handle_Standard_Transient::Assign ()
>>#1  0x00000001031ee1e4 in BRepBuilderAPI_ModifyShape::DoModif ()
>>#2  0x00000001031e46c0 in BRepBuilderAPI_Copy::BRepBuilderAPI_Copy ()
>>#3  0x00000001000b286d in OCCModifyEngine::get_shape_list (this=0x104e04b70, BodySM_list=@0x7fff5fbff4f0, shape_list=@0x7fff5fbff318, is_volume=@0x7fff5fbff2f8, keep_old=true, b_boxes=0x104e8d3f0) at OCCModifyEngine.cpp:3535
>>#4  0x000000010007e792 in OCCModifyEngine::subtract (this=0x104e04b70, tool_body_list=@0x7fff5fbff4f0, from_bodies=@0x7fff5fbff4d8, new_bodies=@0x7fff5fbff480, imprint=false, keep_old=false) at OCCModifyEngine.cpp:2212
>>#5  0x00000001004a4cec in GeometryModifyTool::subtract (this=0x104e03280, tool_body_list=@0x7fff5fbff608, from_bodies=@0x7fff5fbff6f0, new_bodies=@0x7fff5fbff6d8, imprint=false, keep_old=false) at GeometryModifyTool.cpp:6368
>>#6  0x00000001004a51de in GeometryModifyTool::subtract (this=0x104e03280, tool_body=0x104e8cb30, from_bodies=@0x7fff5fbff6f0, new_bodies=@0x7fff5fbff6d8, imprint=false, keep_old=false) at GeometryModifyTool.cpp:6305
>>#7  0x0000000100028f21 in iGeom_subtractEnts (instance=0x10085e8c0, blank=0x104e7fe50, tool=0x104e7ef40, geom_entity=0x7fff5fbff8b0, err=0x7fff5fbff8cc) at iGeom_CGMA.cc:6249
>>#8  0x0000000100006231 in booleans_test (geom=0x10085e8c0) at testgeom.cc:1136
>>#9  0x000000010000e878 in main (argc=1, argv=0x7fff5fbffb78) at testgeom.cc:239
>>(gdb) list
>>129}
>>130
>>131int main( int argc, char *argv[] )
>>132{
>>133    // Check command line arg
>>134  #ifdef FORCE_OCC
>>135    #ifndef HAVE_OCC
>>136      #error "Cannot force use of OCC w/out OCC support"
>>137    #endif
>>138  std::string filename = STRINGIFY(SRCDIR) "/../test/LeverArm.brep";
>> 
>>Rajeev
>>
>>
>>
>>>________________________________
>>> From: Jane Hu <janejhu at gmail.com>
>>>To: Rajeev Jain <jain at mcs.anl.gov> 
>>>Cc: CGMA Development <cgma-dev at mcs.anl.gov> 
>>>Sent: Monday, May 21, 2012 10:11 AM
>>>Subject: Re: testgeom_occ
>>> 
>>>
>>>
>>>Hi, Rajeev:
>>>
>>>I don't know exactly what's wrong with the Mac OS, I double checked that if the new_body is null, theCS pointer should not be null. However, I added a safety check on it just now. Can you double check to see if it works this time?
>>>
>>>Jane
>>>
>>>
>>>On Fri, May 18, 2012 at 3:34 PM, Rajeev Jain <jain at mcs.anl.gov> wrote:
>>>
>>>testgeom_occ on Mac OSX fails, when in copy_body routine, the call to IsBound fails:
>>>> if(!new_body && OCCQueryEngine::instance()->OCCMap->IsBound(*theCS))
>>>
>>>
>>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20120521/d2f0e2d6/attachment-0001.html>


More information about the cgma-dev mailing list