<?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 for GetOrganizationIds in DEBUG builds (linked to ACAP_STATD.lib) in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646853#M10095</link>
    <description>&lt;P&gt;The issue happens because the&amp;nbsp;&lt;SPAN&gt;ITERATOR_DEBUG_LEVEL values of Archicad and the Add-On are different (Archicad is a final build, the Add-On is a debug build). This cause problems only if there are standard library containers on the called interface.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Because of this issue it's not recommended anymore to use ACAP_STATD.lib, and you also need to set the&amp;nbsp;ITERATOR_DEBUG_LEVEL to 0 in your Add-On.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please see this change on how to update your configuration:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/commit/243d12edee1cd3b5ddd90937ca88dbf665be567d" target="_blank" rel="noopener"&gt;https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/commit/243d12edee1cd3b5ddd90937ca88dbf665be567d&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2025 09:39:49 GMT</pubDate>
    <dc:creator>Viktor Kovacs</dc:creator>
    <dc:date>2025-01-21T09:39:49Z</dc:date>
    <item>
      <title>Crash for GetOrganizationIds in DEBUG builds (linked to ACAP_STATD.lib)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646824#M10094</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I've come across this weird issue where Archicad crashes in my Debug builds when I request the &lt;STRONG&gt;OrganizationId&lt;/STRONG&gt; of the user. I was able to pinpoint that the issue only happens when linking to &lt;STRONG&gt;ACAP_STATD.lib&lt;/STRONG&gt;. If I use &lt;STRONG&gt;ACAP_STAT.lib&lt;/STRONG&gt; (as I usually do only for Release builds) then the issue doesn't happen.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;And I've further figured out that the return value of &lt;STRONG&gt;GetOrganizationIds()&lt;/STRONG&gt; is not properly initialized in &lt;STRONG&gt;ACAP_STATD.lib&lt;/STRONG&gt;. Here's some example code to show this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;auto gsid = ACAPI::CreateGSIDObject ();
if (gsid.IsErr ()) { return APIERR_GENERAL; }

auto maybeOrganizationIds = gsid-&amp;gt;GetOrganizationIds ();
if (maybeOrganizationIds.IsErr ()) { return APIERR_GENERAL; }

// For AC27 &amp;amp; AC28 this outputs the following depending on linked ACAPI library
// ACAP_STAT.lib: "Initialized: 1"
// ACAP_STATD.lib: "Initialized: 0"
ACAPI_WriteReport ("Initialized: %d", true, maybeOrganizationIds.Storage ().initialized_);&lt;/LI-CODE&gt;
&lt;P&gt;In AC26 the same crash happens with &lt;STRONG&gt;ACAPI_Protection_GetGSIDOrganizationIds()&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I've only tested on Windows so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a summary table of my results:&lt;/P&gt;
&lt;TABLE style="height: 147px; width: 100%;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="57px"&gt;&lt;STRONG&gt;Archicad API DevKit Version&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%" height="57px"&gt;&lt;STRONG&gt;Linked To ACAP_STAT.lib&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%" height="57px"&gt;&lt;STRONG&gt;Linked To ACAP_STATD.lib&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="30px"&gt;
&lt;P&gt;26.7000 Win&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;no crash&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;&lt;STRONG&gt;&lt;EM&gt;crashes&lt;/EM&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="30px"&gt;27.6003 Win&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;no crash&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;&lt;STRONG&gt;&lt;EM&gt;crashes&lt;/EM&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="30px"&gt;28.3001 Win&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;no crash&lt;/TD&gt;
&lt;TD width="25%" height="30px"&gt;&lt;EM&gt;&lt;STRONG&gt;crashes&lt;/STRONG&gt;&lt;/EM&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone else reproduce this behavior or even knows a fix?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 07:23:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646824#M10094</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-01-21T07:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Crash for GetOrganizationIds in DEBUG builds (linked to ACAP_STATD.lib)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646853#M10095</link>
      <description>&lt;P&gt;The issue happens because the&amp;nbsp;&lt;SPAN&gt;ITERATOR_DEBUG_LEVEL values of Archicad and the Add-On are different (Archicad is a final build, the Add-On is a debug build). This cause problems only if there are standard library containers on the called interface.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Because of this issue it's not recommended anymore to use ACAP_STATD.lib, and you also need to set the&amp;nbsp;ITERATOR_DEBUG_LEVEL to 0 in your Add-On.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please see this change on how to update your configuration:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/commit/243d12edee1cd3b5ddd90937ca88dbf665be567d" target="_blank" rel="noopener"&gt;https://github.com/GRAPHISOFT/archicad-addon-cmake-tools/commit/243d12edee1cd3b5ddd90937ca88dbf665be567d&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 09:39:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646853#M10095</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2025-01-21T09:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Crash for GetOrganizationIds in DEBUG builds (linked to ACAP_STATD.lib)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646864#M10096</link>
      <description>&lt;P&gt;Thanks Viktor for the detailed answer!&lt;BR /&gt;&lt;BR /&gt;I'm a bit concerned that having to switch to &lt;SPAN class="blob-code-inner blob-code-marker " data-code-marker="+"&gt;MultiThreadedDLL &amp;amp; ACAP_STAT.lib also in Debug builds might interfere with the debug information and thus in my debugging workflow. But I'll give it a try and report back.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 10:43:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/646864#M10096</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-01-21T10:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Crash for GetOrganizationIds in DEBUG builds (linked to ACAP_STATD.lib)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/650214#M10100</link>
      <description>&lt;P&gt;I've tested and the normal debugging workflow seems not to be affected &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; So all good! I'll just change all my Add-Ons to these settings.&lt;BR /&gt;&lt;BR /&gt;Thanks again &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/12765"&gt;@Viktor Kovacs&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 15:56:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Crash-for-GetOrganizationIds-in-DEBUG-builds-linked-to-ACAP/m-p/650214#M10100</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-02-03T15:56:56Z</dc:date>
    </item>
  </channel>
</rss>

