Hi Thomas

I am getting crash behaviour in the interim 0.5 PythonOCC release, 
related to the new GarbageCollector implementation. The code below 
crashes on my PC:

----------------------------------------
from OCC.gp import *
from OCC.BRepPrimAPI import *
from OCC.BRepBuilderAPI import *
from OCC.TopExp import *
from OCC.TopoDS import *

o = 0.0
w = 0.1
fp1 = (o,o,o)
fp2 = (w,w,w)

mkbox = BRepPrimAPI_MakeBox(gp_Pnt(fp1[0],fp1[1],fp1[2]), 
gp_Pnt(fp2[0],fp2[1],fp2[2]))
s = mkbox.Shape()
del mkbox

print s.ShapeType()
GarbageCollector.garbage.smart_purge()
# The next line crashes my system
print s.ShapeType()
----------------------------------------

It is almost as if calling _kill_pointed for the mkbox causes shape "s" 
to become "corrupted" in some way. I dug through the SWIG code a bit, 
but cannot see anything obviously wrong, so I was hoping you could shed 
some light on the issue.

By the way, I did get the SVN compiled myself as well, and get the same 
crash with my compiled lib as well as the one you made available on your 
website.

Thanks,
Frank


_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to