<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Crash when Transaction takes too long in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551730#M54339</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please show the code, and any other relevant information like platform, VS version, .NET Framework, drawing size (posting a sample dwg is very useful) , etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jul 2012 13:52:34 GMT</pubDate>
    <dc:creator>hgasty1001</dc:creator>
    <dc:date>2012-07-25T13:52:34Z</dc:date>
    <item>
      <title>Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551218#M54338</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have got a problem with AutoCAD 2010 right now. Im having some procedures that take very long to process in between a TransactionManager.StartTransaction and Commit/Abort.&lt;BR /&gt;&lt;BR /&gt;When taking too long AutoCAD sometimes just disappears/crashes without giving a call stack/Exception or anything. There are also no memory leaks or exceptions raised, though i send some status messages to the command line of AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does AutoCAD need anything like a KeepAlive? Do i have to send it some specific messages or anything? Is that a common problem?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 06:36:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551218#M54338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-25T06:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551730#M54339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please show the code, and any other relevant information like platform, VS version, .NET Framework, drawing size (posting a sample dwg is very useful) , etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gaston Nunez&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 13:52:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551730#M54339</guid>
      <dc:creator>hgasty1001</dc:creator>
      <dc:date>2012-07-25T13:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551820#M54340</link>
      <description>&lt;P&gt;Sadly i can not provide the drawing, because it crashes where the drawing gets generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VS-Version: 2008 C# Standard&lt;/P&gt;&lt;P&gt;.NET: 3.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the C# code(modified though):&lt;/P&gt;&lt;PRE&gt;using (Transaction acTransaction = TransactionManager.StartTransaction())
            {
                try
                {
                    CurrentTransaction = acTransaction;

                    BlockTableRecord acBlockTableRecord = acTransaction.GetObject(BlockIds.Peek(),
                            OpenMode.ForWrite) as BlockTableRecord;                    

                    // Create a new object
                    Region acRegion = GetProfileRegion(profile);
                    Polyline3d acPath = GetExtrusionPath(profile.Axis);

                    Solid3d acSolid = new Solid3d();
                    acSolid.SetDatabaseDefaults();
                  
                    acSolid.ExtrudeAlongPath(acRegion, acPath, 0);

                    Solid3d acSlicedSolid = acSolid;
                    try 
                    {
                        SolidAnalyzer.GetFaceNormals(profile, acSolid);
                    }
                    finally
                    {
                        if (acSlicedSolid != null)
                            acSlicedSolid.Color = Autodesk.AutoCAD.Colors.Color.FromColor(profile.OuterColor);
                    }

                    // Append the newly created object to model space and active transaction
                    acBlockTableRecord.AppendEntity(acSlicedSolid);
                    acTransaction.AddNewlyCreatedDBObject(acSlicedSolid, true);

                    acRegion.Dispose();
                    acPath.Erase();

                    // Save changes to database and close transaction
                    acTransaction.Commit();
                    AutoCADApplication.Print("Profile: " + profile.Name + " successfully constructed.");
                }
                catch (Autodesk.AutoCAD.Runtime.Exception ex)
                {
                    AutoCADApplication.Print("Failed to construct profile " + profile.Name
                        + "\n" + ex.Message + "\n\n" + ex.StackTrace);
                    acTransaction.Abort();
                }
                finally
                {
                    CurrentTransaction = null;
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The GetProfileRegion and GetExtrusionPath Methods always work/never crashed before and i can´t post them for different reasons. The profile region is a highly detailed cut of a window profile.&lt;BR /&gt;&lt;BR /&gt;The SolidAnalyzer class is defined as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;public static class SolidAnalyzer
    {
        private static string Vector3dToString(Vector3d vector)
        {
            return "[" +
                vector.X.ToString("F2") + ", " +
                vector.Y.ToString("F2") + ", " +
                vector.Z.ToString("F2")
                + "]";
        }
         
        private static Vector3d GetFaceNormal(Autodesk.AutoCAD.BoundaryRepresentation.Face face, Point3d point)
        {
            PointOnSurface ptOnSurf = face.Surface.GetClosestPointTo(point);
         
            Point2d param = ptOnSurf.Parameter;
         
            Vector3d normal = ptOnSurf.GetNormal(param);         
            Vector3d normalTest = normal.MultiplyBy(1E-6 / normal.Length);
          
            Point3d ptTest = point.Add(normalTest);
         
            PointContainment ptContainment = new PointContainment();
         
            bool reverse = false;
         
            using(BrepEntity brepEnt = face.Brep.GetPointContainment(ptTest, out ptContainment))
            {
                if(ptContainment != PointContainment.Outside)
                {
                    reverse = true;
                }
            }
         
            return normal.MultiplyBy(reverse ? -1.0 : 1.0);
        }

        public static List&amp;lt;Vector3d&amp;gt; GetFaceNormals(Profile profile, Solid3d profileSolid)
        {
            List&amp;lt;Vector3d&amp;gt; faceNormals = new List&amp;lt;Vector3d&amp;gt;();

            using (Brep brep = new Brep(profileSolid))
            {
                foreach (Autodesk.AutoCAD.BoundaryRepresentation.Face face in brep.Faces)
                {
                    PointContainment ptContainment = new PointContainment();

                    using (BrepEntity brepEnt = face.GetPointContainment(new Point3d(0, 0, 0), out ptContainment))
                    {
                        faceNormals.Add(GetFaceNormal(face, new Point3d(0, 0, 0)));

                        //if (ptContainment == PointContainment.Inside ||
                        //    ptContainment == PointContainment.OnBoundary)
                        {
                            AutoCADApplication.Print("\nFace Normal at " +
                                "[0, 0, 0] = " + Vector3dToString(GetFaceNormal(face, new Point3d(0, 0, 0))));
                        }
                    }
                }
            }

            return faceNormals;
        }
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After adding the SolidAnalyzer class and using GetFaceNormals AutoCAD sometimes first freezes/does not respond and then crashes or disappears after some normals have been written to the commandline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;This procedure takes very long because the solid3d has &amp;gt;300 faces most of the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 14:19:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3551820#M54340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-25T14:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558582#M54341</link>
      <description>&lt;P&gt;I have not run your code to test what's going on exactly, but i can guess just looking... Please see my comments below...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="background: white; color: black; font-family: Consolas; font-size: 8pt;"&gt;
&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: blue;"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;Transaction&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;TransactionManager&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;StartTransaction&lt;/SPAN&gt;())&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;{&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;CurrentTransaction&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;BlockTableRecord&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acBlockTableRecord&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;GetObject&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;BlockIds&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Peek&lt;/SPAN&gt;(),&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;OpenMode&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;ForWrite&lt;/SPAN&gt;) &lt;SPAN style="color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;BlockTableRecord&lt;/SPAN&gt;;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// Fenton : you must dispose all AutoCAD objects before &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// this function goes out of scope, use using. Otherwise those objects will be disposed by the GC on a worker thread, which will most likely crash AutoCAD&lt;/SPAN&gt;&lt;SPAN style="color: green;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;Region&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acRegion&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;GetProfileRegion&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;))&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;Polyline3d&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acPath&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;GetExtrusionPath&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Axis&lt;/SPAN&gt;))&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;Solid3d&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acSolid&lt;/SPAN&gt; = &lt;SPAN style="color: blue;"&gt;new&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;Solid3d&lt;/SPAN&gt;())&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acSolid&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;SetDatabaseDefaults&lt;/SPAN&gt;();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acSolid&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;ExtrudeAlongPath&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;acRegion&lt;/SPAN&gt;, &lt;SPAN style="color: #010001;"&gt;acPath&lt;/SPAN&gt;, 0);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// Fenton: what does this line mean? if you are trying&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// to make a copy, think again because it won't&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;//Solid3d acSlicedSolid = acSolid;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// Fenton: this is better&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;Solid3d&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;acSlicedSolid&lt;/SPAN&gt; = &lt;SPAN style="color: blue;"&gt;new&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;Solid3d&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acSlicedSolid&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;CopyFrom&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;acSolid&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;SolidAnalyzer&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;GetFaceNormals&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;, &lt;SPAN style="color: #010001;"&gt;acSolid&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;finally&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;acSlicedSolid&lt;/SPAN&gt; != &lt;SPAN style="color: blue;"&gt;null&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acSlicedSolid&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Color&lt;/SPAN&gt; = &lt;SPAN style="color: #010001;"&gt;Autodesk&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;AutoCAD&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Colors&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Color&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;FromColor&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Ou&lt;/SPAN&gt;​&lt;SPAN style="color: #010001;"&gt;terColor&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// Append the newly created object to model space and active transaction&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acBlockTableRecord&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;AppendEntity&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;acSlicedSolid&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;AddNewlyCreatedDBObject&lt;/SPAN&gt;(&lt;SPAN style="color: #010001;"&gt;acSlicedSoli&lt;/SPAN&gt;​&lt;SPAN style="color: #010001;"&gt;d&lt;/SPAN&gt;, &lt;SPAN style="color: blue;"&gt;true&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acPath&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Erase&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;// Save changes to database and close transaction&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Commit&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;AutoCADApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Print&lt;/SPAN&gt;(&lt;SPAN style="color: #a31515;"&gt;"Profile: "&lt;/SPAN&gt; + &lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Name&lt;/SPAN&gt; + &lt;SPAN style="color: #a31515;"&gt;" successfully constructed."&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="color: #010001;"&gt;Autodesk&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;AutoCAD&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Runtime&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Exception&lt;/SPAN&gt; &lt;SPAN style="color: #010001;"&gt;ex&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;AutoCADApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Print&lt;/SPAN&gt;(&lt;SPAN style="color: #a31515;"&gt;"Failed to construct profile "&lt;/SPAN&gt; + &lt;SPAN style="color: #010001;"&gt;profile&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + &lt;SPAN style="color: #a31515;"&gt;"\n"&lt;/SPAN&gt; + &lt;SPAN style="color: #010001;"&gt;ex&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Message&lt;/SPAN&gt; + &lt;SPAN style="color: #a31515;"&gt;"\n\n"&lt;/SPAN&gt; + &lt;SPAN style="color: #010001;"&gt;ex&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;StackTrace&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;acTransaction&lt;/SPAN&gt;.&lt;SPAN style="color: #010001;"&gt;Abort&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;finally&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #010001;"&gt;CurrentTransaction&lt;/SPAN&gt; = &lt;SPAN style="color: blue;"&gt;null&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;!--EndFragment--&gt; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 23:14:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558582#M54341</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2012-07-30T23:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558600#M54342</link>
      <description>&lt;P&gt;I also just posted this for you guys...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2012/07/forcing-the-gc-to-run-on-the-main-thread.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/07/forcing-the-gc-to-run-on-the-main-thread.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2012 23:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558600#M54342</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2012-07-30T23:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558926#M54343</link>
      <description>&lt;P&gt;Thanks, Fenton.&lt;BR /&gt;&lt;BR /&gt;The line where it says acSlicedSolid= ... was just a remain of a slicing procedure i commented out to test, sadly i forgot that line. It wasn´t intended to copy anything, it´s not a struct. Was used to determine which Solid3d to be cut because it was cut multiple times and that one was just a pointer to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, the GC won´t collect them in this case cause the objects are still referenced and using "using" doesn´t solve it either. I´ve just splitted it into multiple small transactions now and somehow it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I can´t really tell why though..., thanks a lot for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2012 07:12:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3558926#M54343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-31T07:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Crash when Transaction takes too long</title>
      <link>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3559670#M54344</link>
      <description>&lt;P&gt;No problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you post a working sample project, I'll take a look at it for you.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2012 16:05:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/crash-when-transaction-takes-too-long/m-p/3559670#M54344</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2012-07-31T16:05:53Z</dc:date>
    </item>
  </channel>
</rss>

