<?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: Acad2008 crash on arx unload in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3494746#M14665</link>
    <description>&lt;P&gt;Have you stepped thorugh the&amp;nbsp;loop to determine why it crashes? What is the context when this code executes? I don't see any check to ensure that you don't index beyond the end of &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ointDistArray, so that should be the first suspect.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jun 2012 17:18:23 GMT</pubDate>
    <dc:creator>owenwengerd</dc:creator>
    <dc:date>2012-06-11T17:18:23Z</dc:date>
    <item>
      <title>Acad2008 crash on arx unload</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3494686#M14664</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Acad crashes on unloading arx application: shows message that arx have succesfully unloaded, then pauses, then just closes and tries to report an error. I've found out the problem is caused inside for loop (i.e. uncommenting solves the problem).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;AcGePoint3dArray &lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoord&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoordCp&lt;/FONT&gt;&lt;/FONT&gt;;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;//hold all points' coordinates&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;double &lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pointDistArray&lt;/FONT&gt;&lt;/FONT&gt; [42];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;ads_point &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap1&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap2&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;for&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;=0; &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;&amp;lt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoord&lt;/FONT&gt;&lt;/FONT&gt;.&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;length&lt;/FONT&gt;&lt;/FONT&gt;(); &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;++)&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;//Acad crashes on unload arx also..&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#008000"&gt;//pCoord gets damaged within here..?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap2&lt;/FONT&gt;&lt;/FONT&gt;[0] = &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoord&lt;/FONT&gt;&lt;/FONT&gt;.&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;at&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;).&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;x&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap2&lt;/FONT&gt;&lt;/FONT&gt;[1] = &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoord&lt;/FONT&gt;&lt;/FONT&gt;.&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;at&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;).&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;y&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap2&lt;/FONT&gt;&lt;/FONT&gt;[2] = &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pCoord&lt;/FONT&gt;&lt;/FONT&gt;.&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;at&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;).&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;z&lt;/FONT&gt;&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pointDistArray&lt;/FONT&gt;&lt;/FONT&gt;[&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;] = &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;acutDistance&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap1&lt;/FONT&gt;&lt;/FONT&gt;,&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ap2&lt;/FONT&gt;&lt;/FONT&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;acutPrintf&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;_T&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"\nDistance from base point to point %u is %f."&lt;/FONT&gt;&lt;/FONT&gt;), &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pointDistArray&lt;/FONT&gt;&lt;/FONT&gt;[&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;]);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is conversion from AcGePoint3d to ads_point correct?&lt;/P&gt;&lt;P&gt;Debugging&amp;nbsp;shows the pCoord array's physical length gets damaged after the loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DL&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2012 16:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3494686#M14664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-11T16:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Acad2008 crash on arx unload</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3494746#M14665</link>
      <description>&lt;P&gt;Have you stepped thorugh the&amp;nbsp;loop to determine why it crashes? What is the context when this code executes? I don't see any check to ensure that you don't index beyond the end of &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;ointDistArray, so that should be the first suspect.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2012 17:18:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3494746#M14665</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2012-06-11T17:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Acad2008 crash on arx unload</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3495160#M14666</link>
      <description>&lt;P&gt;Thanks for the hint.&lt;/P&gt;&lt;P&gt;Apparently pointDistArray[] is ok. It is ensured it holds 42 distances according to pCoord length. I suspect it's because of the fact that pCoord's physical length is getting corrupted inside this loop.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2012 20:06:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3495160#M14666</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-11T20:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Acad2008 crash on arx unload</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3497022#M14667</link>
      <description>&lt;P&gt;Solved!&lt;/P&gt;&lt;P&gt;Owen, you were right, this is because of the pointDistArray[] runs out of its bounds, thanks!&lt;/P&gt;&lt;P&gt;But what is strange,&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;acutPrintf &lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;_T&lt;/FONT&gt;&lt;/FONT&gt;(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;"\nDistance from base point to point %u is %f."&lt;/FONT&gt;&lt;/FONT&gt;), &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;pointDistArray&lt;/FONT&gt;&lt;/FONT&gt;[&lt;FONT color="#010001"&gt;&lt;FONT color="#010001"&gt;i&lt;/FONT&gt;&lt;/FONT&gt;]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;was printing out correctly, including pointDistArray[43], thought pCoord's length&amp;nbsp;was 44 and pointDistArray's length only 42. VC didn't complain during the built, Acad just crashed on arx unload, this confused me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is it&amp;nbsp;possible?&lt;/P&gt;&lt;P&gt;Am I missing something obvious?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DL&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 19:30:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acad2008-crash-on-arx-unload/m-p/3497022#M14667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-12T19:30:40Z</dc:date>
    </item>
  </channel>
</rss>

