<?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: Archicad 28 crashes when change material/composite properties in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-28-crashes-when-change-material-composite-properties/m-p/658150#M10240</link>
    <description>&lt;P&gt;Fixed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the info in this article&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.graphisoft.com/t5/Developer-Insights/New-memory-allocator-in-Archicad-28/ba-p/635403" target="_self"&gt;New memory allocator in Archicad 28&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 09:45:27 GMT</pubDate>
    <dc:creator>kolioi</dc:creator>
    <dc:date>2025-04-08T09:45:27Z</dc:date>
    <item>
      <title>Archicad 28 crashes when change material/composite properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-28-crashes-when-change-material-composite-properties/m-p/658015#M10239</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;
&lt;P&gt;My plugin crashes at random places on AC28 but the same code works fine on AC27 and AC26.&lt;/P&gt;
&lt;P&gt;Here is briefly what I am doing: I have a function that creates composite structures in a loop (Walls/Slabs/Roofs). Some of the materials already exist (created by the previous composite) and their properties are overwritten. The same apply and for all composites - their properties are overwritten if a composite has already been created. The first time I call the function all composites are created successfully. If I call the function again, some composites and materials are overwritten and then AC crashes.&lt;/P&gt;
&lt;P&gt;Again, this happens on AC28 only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a screenshot of a typical crash&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kolioi_0-1743604465110.jpeg" style="width: 801px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/85465i602D36E14049B6E2/image-dimensions/801x440?v=v2" width="801" height="440" role="button" title="kolioi_0-1743604465110.jpeg" alt="kolioi_0-1743604465110.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and the corresponding call stack&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt; 	tbbmalloc.dll!00007ffdf5fa806e()	Unknown
 	tbbmalloc.dll!00007ffdf5fa87ab()	Unknown
 	GSRoot.dll!00007ffddb686e63()	Unknown
&amp;gt;	MyPlugin.apx!operator new(unsigned __int64 nBytes) Line 86	C++
 	MyPlugin.apx!std::_Default_allocate_traits::_Allocate(const unsigned __int64 _Bytes) Line 137	C++
 	MyPlugin.apx!std::_Allocate&amp;lt;16,std::_Default_allocate_traits&amp;gt;(const unsigned __int64 _Bytes) Line 258	C++
 	MyPlugin.apx!std::allocator&amp;lt;std::_Container_proxy&amp;gt;::allocate(const unsigned __int64 _Count) Line 987	C++
......
Exception thrown at 0x00007FFDC9CD2E0C (ObjectDatabase.dll) in Archicad.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.&lt;/LI-CODE&gt;
&lt;P&gt;This looks like dereferencing a null pointer or trying to release memory that has already been released.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I noticed AC28 use a whole lot of RAM compared to AC26 (and AC27)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kolioi_1-1743605256067.jpeg" style="width: 481px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/85468iFFBD5A3BE8C3BC46/image-dimensions/481x296?v=v2" width="481" height="296" role="button" title="kolioi_1-1743605256067.jpeg" alt="kolioi_1-1743605256067.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kolioi_2-1743605306516.jpeg" style="width: 481px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/85469i3D5A57905ECA705E/image-dimensions/481x287?v=v2" width="481" height="287" role="button" title="kolioi_2-1743605306516.jpeg" alt="kolioi_2-1743605306516.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas what might be wrong and how to fix it?&lt;BR /&gt;&lt;BR /&gt;I am compiling w/ Visual Studio 2022 platform toolset v143 C++ 17 on Windows 10&lt;BR /&gt;The same crash happens on Mac as well&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 21:39:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-28-crashes-when-change-material-composite-properties/m-p/658015#M10239</guid>
      <dc:creator>kolioi</dc:creator>
      <dc:date>2025-04-03T21:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Archicad 28 crashes when change material/composite properties</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-28-crashes-when-change-material-composite-properties/m-p/658150#M10240</link>
      <description>&lt;P&gt;Fixed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the info in this article&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.graphisoft.com/t5/Developer-Insights/New-memory-allocator-in-Archicad-28/ba-p/635403" target="_self"&gt;New memory allocator in Archicad 28&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 09:45:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-28-crashes-when-change-material-composite-properties/m-p/658150#M10240</guid>
      <dc:creator>kolioi</dc:creator>
      <dc:date>2025-04-08T09:45:27Z</dc:date>
    </item>
  </channel>
</rss>

