<?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 run-time check failure #2 - Point corrupted in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802549#M13799</link>
    <description>&lt;P&gt;I have been trying to figure this out for a few days now and have been having some problems. I tried to do some research &lt;A target="_self" href="https://forums.autodesk.com/t5/Autodesk-ObjectARX/Run-Time-Check-Failure-2-Stack-around-the-variable-name-was/m-p/3285007/highlight/true#M28546"&gt;Run-Time Check Failure #2 - Stack around the variable 'name'' was corrupted&lt;/A&gt; and &lt;A target="_self" href="http://arxdummies.blogspot.com/2005/04/big-picture-interview-with-jim-quanci.html"&gt;The "Big Picture" - Interview with Jim Quanci (Autodesk)&lt;/A&gt; but neither really helped me too much. The ObjectArx &amp;amp; Dummies seemed to point to the fact that I had a memory leak but if that was the case I am not sure how exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void drawCable(){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcDbPolyline *pLine = new AcDbPolyline();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int vertexPoint = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcGePoint2d tempPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int result&amp;nbsp; = acedGetPoint(NULL,_T("\nSelect the first point:"),asDblArray(tempPoint));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(result == RTNORM){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pLine-&amp;gt;addVertexAt(vertexPoint,tempPoint);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;vertexPoint++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;result&amp;nbsp; = acedGetPoint(NULL,_T("\nSelect the point:"),asDblArray(tempPoint));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;postToDb(pLine);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pLine-&amp;gt;close();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be greatly appreciated. Thanks in advance like usual.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2013 12:43:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-12T12:43:48Z</dc:date>
    <item>
      <title>run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802549#M13799</link>
      <description>&lt;P&gt;I have been trying to figure this out for a few days now and have been having some problems. I tried to do some research &lt;A target="_self" href="https://forums.autodesk.com/t5/Autodesk-ObjectARX/Run-Time-Check-Failure-2-Stack-around-the-variable-name-was/m-p/3285007/highlight/true#M28546"&gt;Run-Time Check Failure #2 - Stack around the variable 'name'' was corrupted&lt;/A&gt; and &lt;A target="_self" href="http://arxdummies.blogspot.com/2005/04/big-picture-interview-with-jim-quanci.html"&gt;The "Big Picture" - Interview with Jim Quanci (Autodesk)&lt;/A&gt; but neither really helped me too much. The ObjectArx &amp;amp; Dummies seemed to point to the fact that I had a memory leak but if that was the case I am not sure how exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void drawCable(){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcDbPolyline *pLine = new AcDbPolyline();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int vertexPoint = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcGePoint2d tempPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int result&amp;nbsp; = acedGetPoint(NULL,_T("\nSelect the first point:"),asDblArray(tempPoint));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(result == RTNORM){&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pLine-&amp;gt;addVertexAt(vertexPoint,tempPoint);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;vertexPoint++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;result&amp;nbsp; = acedGetPoint(NULL,_T("\nSelect the point:"),asDblArray(tempPoint));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;postToDb(pLine);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pLine-&amp;gt;close();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be greatly appreciated. Thanks in advance like usual.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 12:43:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802549#M13799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T12:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802592#M13800</link>
      <description>&lt;P&gt;Change:&lt;/P&gt;
&lt;PRE&gt;AcGePoint2d tempPoint;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;with:&lt;/P&gt;
&lt;PRE&gt;AcGePoint3d tempPoint;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;And change:&lt;/P&gt;
&lt;PRE&gt;pLine-&amp;gt;addVertexAt(vertexPoint,tempPoint);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;with:&lt;/P&gt;
&lt;PRE&gt;pLine-&amp;gt;addVertexAt(vertexPoint,AcGePoint2d(tempPoint.x, tempPoint.y));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 13:06:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802592#M13800</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-12T13:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802643#M13801</link>
      <description>&lt;P&gt;Excellent it worked like a charm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What exactly was the issue with the way that I was doing it? Was it because when I was only accepting a 2d point when AcedGetPoint is trying to put in a 3d point?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 13:48:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802643#M13801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T13:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802673#M13802</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;...Was it because when I was only accepting a 2d point when AcedGetPoint is trying to put in a 3d point?...&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes of course! acedGetPoint "thinks" that you pass a pointer to an array of &lt;U&gt;three double&lt;/U&gt;, but you pass a pointer to an array of &lt;U&gt;two double&lt;/U&gt;. That is why the function wrote third double to invalid location.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 14:07:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802673#M13802</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-12T14:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802681#M13803</link>
      <description>&lt;P&gt;Excellent thanks,&lt;/P&gt;&lt;P&gt;I was reading up on the poly class and I see that instead of incrementing the vertexPoint that I have in my code I could just do something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pLine-&amp;gt;addVertexAt(pLine-&amp;gt;numVerts(),AcGePoint2d(tempPoint.x,tempPoint.y));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to figure that incrementing my number would be the simpler way to go since it would only require a simple increment rather then looking up the value from the polyline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess not that I have this figured out I now just need to see how to use this to include the jig class.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 14:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3802681#M13803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T14:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: run-time check failure #2 - Point corrupted</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3803255#M13804</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Zanzabar wrote: &lt;BR /&gt;
&lt;P&gt;...I am going to figure that incrementing my number would be the simpler way to go since it would only require a simple increment rather then looking up the value from the polyline?...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think that AcDbPolyline has a class member with number of vertexes and not very much difference between the use of both ways.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;...I guess not that I have this figured out I now just need to see how to use this to include the jig class...&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I've posted a small sample project which make &lt;A href="https://forums.autodesk.com/t5/Autodesk-ObjectARX/polyline-visual-effects-dynamic-display-visual-inputs/m-p/3802793#M29983" target="_blank"&gt;Polyline with JIG.&lt;/A&gt; You can develop it further as you sees fit.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 22:18:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/run-time-check-failure-2-point-corrupted/m-p/3803255#M13804</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-12T22:18:52Z</dc:date>
    </item>
  </channel>
</rss>

