Hello all,
i am quite new to AutoCAD 2010 .net development using C# and got a problem i can´t understand.
After cutting some Solid3Ds AutoCAD suddenly crashes. Sometimes the "Send Error Report" Dialog opens, sometimes AutoCAD just disappears, sometimes it asks me if i want to save my changes.
Checked everything for memory leaks, looked at the debug output and there are no leaks at all.
Currently i cut along a PlaneSurface that is defined as follows:
Polyline acPolyline; acPolyline = new Polyline(); acPolyline.SetDatabaseDefaults(); acPolyline.AddVertexAt(0, new Point2d(0, 0), 0, 0, 0); acPolyline.AddVertexAt(1, new Point2d(-profile.Width, 0), 0, 0, 0); acPolyline.AddVertexAt(2, new Point2d(-profile.Width, profile.Height), 0, 0, 0); acPolyline.AddVertexAt(3, new Point2d(0, profile.Height), 0, 0, 0); acPolyline.Closed = true; acPolyline.Normal = profile.Axis.Direction; TransformPolyline(ref acPolyline, profile); Region acPlaneRegion = GetRegionFromPolyline(acPolyline); acPolyline.Dispose(); acPolyline = null; acPlaneRegion.TransformBy(Matrix3d.Rotation(Utilities.Math.DegreeToRadian(90), new Vector3d(1, 0, 0), new Point3d(0, 0, 0))); //acPlaneRegion.TransformBy(Matrix3d.Rotation(Utilities.Math.DegreeToRadian(-cuttingAngle), new Vector3d(0, 0, 1), new Point3d(0, 0, 0))) acPlaneRegion.TransformBy(Matrix3d.Displacement(axisPoint.GetAsVector())); PlaneSurface acPlaneSurface = new PlaneSurface(); acPlaneSurface.CreateFromRegion(acPlaneRegion);
When transmitting the PlaneSurface via the Transaction it looks fine too.
And here is how i cut with the PlaneSurface:
miterCuttingPlanes = GetMiterCuttingPlanes(profile); acSolidPart1 = acSolid.Slice(miterCuttingPlanes.PlaneCut1Out, true); if (acSolidPart1 != null) { if (profile.Cut1Out >= 90) { acSlicedSolid = acSolidPart1; acSolid.Dispose(); } else { acSlicedSolid = acSolid; acSolidPart1.Dispose(); } }
The acSolid is created by simply extruding a region along a path.
As is said before AutoCAD sometimes simply crashes/disappears when executing this. Anyone has any ideas on why this is happening?
Hello,
It is quite hard to say what might be causing the crash. Can you please share a minimal buildable sample project that I can use to reproduce the error ?
Thank you.
Please see my post here http://forums.autodesk.com/t5/NET/Crash-when-Transaction-takes-too-long/m-p/3558582/highlight/false#...