<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span>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:</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div><span style="font-size: 14px;"><div>(gdb) r</div><div>Starting program: /Users/rajeevjain/cgm/itaps/testgeom_occ </div><div>Reading symbols for shared libraries ++++++++++++++++++++++++++++++..................................... done</div><div>Using default input file: ./../test/LeverArm.brep</div><div>Geometry engine set to: OpenCascade 6.5</div><div><br></div><div><br></div><div>ITAPS GEOMETRY INTERFACE TEST PROGRAM:</div><div><br></div><div>
gLoad: </div><div>Constructed 1 Volume: 1</div><div>Model contents: </div><div>vertices: 99</div><div>edges: 159</div><div>faces: 63</div><div>regions: 1</div><div>Success</div><div> tags: Tags defined on model: GLOBAL_ID, NAME</div><div>Success</div><div> gentity sets: Success</div><div> topology adjacencies: Success</div><div> construct: Created swept volume 4</div><div>Updated volume 3</div><div>Success</div><div> primitives: Success</div><div> transforms: Success</div><div><br></div><div>Breakpoint 2, iGeom_subtractEnts (instance=0x10085e8c0, blank=0x104e7fe50, tool=0x104e7ef40, geom_entity=0x7fff5fbff8b0, err=0x7fff5fbff8cc) at iGeom_CGMA.cc:6234</div><div>6234<span class="Apple-tab-span" style="white-space:pre"> </span> if (NULL == blank_copy) {</div><div>(gdb) p *blank_copy</div><div>$1 = {</div><div> <GroupingEntity> = {</div><div>
<TopologyEntity> = {</div><div> <ModelEntity> = {</div><div> _vptr$ModelEntity = 0x10085a470, </div><div> deactivatedStatus_ = 0 '\0', </div><div> encountered_ = 0 '\0'</div><div> }, </div><div> members of TopologyEntity: </div><div> bridgeMan = {</div><div> <TBOwner> = {</div><div> _vptr$TBOwner = 0x10085a790</div><div> }, </div><div> members of BridgeManager: </div><div> topologyEntity = 0x104e7d380, </div><div> mergeList = {</div><div> <std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >> =
{</div><div> _M_impl = {</div><div> <std::allocator<TopologyBridge*>> = {</div><div> <__gnu_cxx::new_allocator<TopologyBridge*>> = {<No data fields>}, <No data fields>}, </div><div> members of std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >::_Vector_impl: </div><div> _M_start = 0x104e8ba70, </div><div> _M_finish = 0x104e8ba78, </div><div> _M_end_of_storage = 0x104e8ba78</div><div> }</div><div> }, <No data fields>}</div><div>
}</div><div> }, </div><div> members of GroupingEntity: </div><div> myParent = 0x0, </div><div> nextInParent = 0x0, </div><div> prevInParent = 0x0, </div><div> firstSenseEntity = 0x104e809b0, </div><div> lastSenseEntity = 0x104e809b0</div><div> }, </div><div> <RefEntity> = {</div><div> <CubitEntity> = {</div><div> _vptr$CubitEntity = 0x10085a520, </div><div> entityId = 11</div><div> }, </div><div> <CubitObservable> = {</div><div> _vptr$CubitObservable = 0x10085a618, </div><div> observerList = 0x0</div><div> }, </div><div> <ToolDataUser> = {</div><div> _vptr$ToolDataUser = 0x10085a648, </div><div>
toolData = 0x0</div><div> }, </div><div> <CubitAttribUser> = {</div><div> _vptr$CubitAttribUser = 0x10085a6b0, </div><div> headAttrib = 0x0</div><div> }, </div><div> members of RefEntity: </div><div> autoMergeStatus = 3, </div><div> markedFlag = 0, </div><div> listFlag = 0, </div><div> mColor = -1</div><div> }, <No data fields>}</div><div>(gdb) p *this_blank</div><div>$2 = {</div><div> <GroupingEntity> = {</div><div> <TopologyEntity> = {</div><div> <ModelEntity> = {</div><div> _vptr$ModelEntity = 0x10085a470, </div><div> deactivatedStatus_ = 0 '\0', </div><div> encountered_ = 0 '\0'</div><div>
}, </div><div> members of TopologyEntity: </div><div> bridgeMan = {</div><div> <TBOwner> = {</div><div> _vptr$TBOwner = 0x10085a790</div><div> }, </div><div> members of BridgeManager: </div><div> topologyEntity = 0x104e7fdf0, </div><div> mergeList = {</div><div> <std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >> = {</div><div> _M_impl = {</div><div> <std::allocator<TopologyBridge*>> = {</div><div> <__gnu_cxx::new_allocator<TopologyBridge*>> = {<No data fields>}, <No
data fields>}, </div><div> members of std::_Vector_base<TopologyBridge*, std::allocator<TopologyBridge*> >::_Vector_impl: </div><div> _M_start = 0x104e7fbf0, </div><div> _M_finish = 0x104e7fbf8, </div><div> _M_end_of_storage = 0x104e7fbf8</div><div> }</div><div> }, <No data fields>}</div><div> }</div><div> }, </div><div> members of GroupingEntity: </div><div> myParent = 0x0, </div><div> nextInParent = 0x0, </div><div> prevInParent = 0x0, </div><div> firstSenseEntity = 0x104e7f500, </div><div> lastSenseEntity =
0x104e7f500</div><div> }, </div><div> <RefEntity> = {</div><div> <CubitEntity> = {</div><div> _vptr$CubitEntity = 0x10085a520, </div><div> entityId = 9</div><div> }, </div><div> <CubitObservable> = {</div><div> _vptr$CubitObservable = 0x10085a618, </div><div> observerList = 0x0</div><div> }, </div><div> <ToolDataUser> = {</div><div> _vptr$ToolDataUser = 0x10085a648, </div><div> toolData = 0x0</div><div> }, </div><div> <CubitAttribUser> = {</div><div> _vptr$CubitAttribUser = 0x10085a6b0, </div><div> headAttrib = 0x104e836d0</div><div> }, </div><div> members of RefEntity: </div><div>
autoMergeStatus = 3, </div><div> markedFlag = 0, </div><div> listFlag = 0, </div><div> mColor = -1</div><div> }, <No data fields>}</div></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "> </div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><font style="font-family: arial, helvetica, sans-serif; " size="2">Rajeev</font><br><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jane Hu <janejhu@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Rajeev Jain
<jain@mcs.anl.gov> <br><b><span style="font-weight: bold;">Cc:</span></b> CGMA Development <cgma-dev@mcs.anl.gov> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, May 21, 2012 1:16 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: testgeom_occ<br> </font> </div> <br><div id="yiv272799251">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. <br><br>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.<br>
<br>Jane<br><br><div class="yiv272799251gmail_quote">On Mon, May 21, 2012 at 12:22 PM, Rajeev Jain <span dir="ltr"><<a rel="nofollow" ymailto="mailto:jain@mcs.anl.gov" target="_blank" href="mailto:jain@mcs.anl.gov">jain@mcs.anl.gov</a>></span> wrote:<br><blockquote class="yiv272799251gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><div><span style="font-size:14px;"><div>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?</div>
<div><br></div><div>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:</div>
<div><br></div><div>(gdb) r</div><div>Starting program: /Users/rajeevjain/cgm/itaps/testgeom_occ </div><div>Reading symbols for shared libraries ++++++++++++++++++++++++++++++..................................... done</div>
<div class="yiv272799251im"><div>Using default input file: ./../test/LeverArm.brep</div><div>Geometry engine set to: OpenCascade
6.5</div><div><br></div><div><br></div><div>ITAPS GEOMETRY INTERFACE TEST PROGRAM:</div><div><br></div><div> gLoad: </div><div>Constructed 1 Volume: 1</div><div>Model contents: </div><div>vertices: 99</div><div>edges: 159</div>
<div>faces: 63</div><div>regions: 1</div><div>Success</div><div> tags: Tags defined on model: GLOBAL_ID, NAME</div><div>Success</div><div> gentity sets: Success</div><div> topology adjacencies: Success</div><div> construct: Created swept volume 4</div>
<div>Updated volume 3</div><div>Success</div><div> primitives: Success</div><div> transforms: Success</div><div><br></div><div>Program received signal EXC_BAD_ACCESS, Could not access memory.</div></div><div>Reason: 13 at address: 0x0000000000000000</div>
<div>0x00000001041f8edf in Handle_Standard_Transient::Assign ()</div><div>(gdb) bt</div><div>#0 0x00000001041f8edf in
Handle_Standard_Transient::Assign ()</div><div>#1 0x00000001031ee1e4 in BRepBuilderAPI_ModifyShape::DoModif ()</div><div>#2 0x00000001031e46c0 in BRepBuilderAPI_Copy::BRepBuilderAPI_Copy ()</div><div>#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</div>
<div>#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</div>
<div>#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</div>
<div>#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</div><div>#7 0x0000000100028f21 in iGeom_subtractEnts (instance=0x10085e8c0, blank=0x104e7fe50, tool=0x104e7ef40, geom_entity=0x7fff5fbff8b0, err=0x7fff5fbff8cc) at iGeom_CGMA.cc:6249</div>
<div>#8 0x0000000100006231 in booleans_test (geom=0x10085e8c0) at testgeom.cc:1136</div><div>#9 0x000000010000e878 in main (argc=1, argv=0x7fff5fbffb78) at testgeom.cc:239</div><div>(gdb) list</div><div>129<span style="white-space:pre-wrap;"> </span>}</div>
<div>130<span style="white-space:pre-wrap;"> </span></div><div>131<span style="white-space:pre-wrap;"> </span>int main( int argc, char *argv[] )</div><div>132<span style="white-space:pre-wrap;"> </span>{</div><div>133<span style="white-space:pre-wrap;"> </span> // Check command line arg</div>
<div>134<span style="white-space:pre-wrap;"> </span> #ifdef FORCE_OCC</div><div>135<span style="white-space:pre-wrap;"> </span> #ifndef HAVE_OCC</div><div>136<span style="white-space:pre-wrap;"> </span> #error "Cannot force use of OCC w/out OCC support"</div>
<div>137<span style="white-space:pre-wrap;"> </span> #endif</div><div>138<span style="white-space:pre-wrap;"> </span> std::string filename = STRINGIFY(SRCDIR) "/../test/LeverArm.brep";</div></span></div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; ">
</div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><font style="font-family: arial, helvetica, sans-serif; " size="2">Rajeev</font><br><br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px;">
<div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size:12pt;"> <div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jane Hu <<a rel="nofollow" ymailto="mailto:janejhu@gmail.com" target="_blank" href="mailto:janejhu@gmail.com">janejhu@gmail.com</a>><br>
<b><span style="font-weight:bold;">To:</span></b> Rajeev Jain <<a rel="nofollow" ymailto="mailto:jain@mcs.anl.gov" target="_blank" href="mailto:jain@mcs.anl.gov">jain@mcs.anl.gov</a>> <br><b><span style="font-weight:bold;">Cc:</span></b> CGMA Development <<a rel="nofollow" ymailto="mailto:cgma-dev@mcs.anl.gov" target="_blank" href="mailto:cgma-dev@mcs.anl.gov">cgma-dev@mcs.anl.gov</a>> <br>
<b><span style="font-weight:bold;">Sent:</span></b> Monday, May 21, 2012 10:11 AM<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: testgeom_occ<br> </font> </div><div><div class="yiv272799251h5"> <br>
<div>Hi, Rajeev:<br><br>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?<br>
<br>Jane<br><br><div>On Fri, May 18, 2012 at 3:34 PM, Rajeev Jain <span dir="ltr"><<a rel="nofollow" ymailto="mailto:jain@mcs.anl.gov" target="_blank" href="mailto:jain@mcs.anl.gov">jain@mcs.anl.gov</a>></span> wrote:<br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">
<div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><div><span><span style="font-size:14px;">testgeom_occ on Mac OSX fails, when in copy_body routine, the call to IsBound fails:</span></span></div><div>
<span><span style="font-size:14px;"> if(!new_body && OCCQueryEngine::instance()->OCCMap->IsBound(*theCS))</span></span></div></div></div></blockquote></div><br>
</div><br><br> </div></div></div> </div> </blockquote></div> </div></div></blockquote></div><br>
</div><br><br> </div> </div> </blockquote></div> </div></body></html>