<?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: Exception when using libcpr library in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/579821#M8979</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you find any solution to this problem? I am facing an almost similar problem when using the libcpr library with Archicad. (The error is different, but Archicad crashes). Iam using libcpr 1.10.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;cpr::Response r = cpr::Get(cpr::Url{ "http://www.httpbin.org/get" });&lt;/PRE&gt;
&lt;P&gt;As you have also mentioned, this(and the POST request) works perfectly on a stand-alone C++ project for me as well.&lt;/P&gt;
&lt;P&gt;However, when I use it with Archicad 27, it crashes and gives me an access violation error, like so, and then a stack-based cookie overrun.&lt;/P&gt;
&lt;P&gt;I am suspecting this could be a clash with libcurl dlls (since my application already uses libcurl and libcpr is a wrapper around libcurl). Not sure, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error details:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;============================================================

Exception thrown at 0x00007FF99C111BB5 (Addon.apx) in Archicad.exe: 0xC0000005: Access violation reading location 0x0000108A3D944CF0.

The thread 0x734 has exited with code 0 (0x0).
Unhandled exception at 0x00007FF99C14B1D1 (Addon.apx) in Archicad.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.

The program '[48704] Archicad.exe' has exited with code 0 (0x0).

============================================================&lt;/LI-CODE&gt;
&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Dec 2023 21:52:22 GMT</pubDate>
    <dc:creator>rajani</dc:creator>
    <dc:date>2023-12-17T21:52:22Z</dc:date>
    <item>
      <title>Exception when using libcpr library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/371815#M1414</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;I'm getting an Archicad breakpoint exception that closes the program when using libcpr library.&lt;/P&gt;&lt;P&gt;In my plugin example, I have the following simple HTTP GET request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;cpr::Response r = cpr::Get(cpr::Url{ "http://www.httpbin.org/get" });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works in&amp;nbsp;a plain C++ project in Visual Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an exception that breaks at GSNew.hpp in the operator delete:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;inline void CCALL operator delete (void* p, size_t) throw ()
{
	GS::MemoryManager::Free (p);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This break occurs inside libcpr at&amp;nbsp;session.h in line 51, in destructor:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;~Session() = default;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything I can do to fix this? Apprently the same happens &lt;A href="https://community.graphisoft.com/t5/Developer-forum/An-unhandled-exception-was-encountered-during-a-user-callbac/m-p/239959" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:54:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/371815#M1414</guid>
      <dc:creator>BrunoValads</dc:creator>
      <dc:date>2023-03-01T11:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exception when using libcpr library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/579821#M8979</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you find any solution to this problem? I am facing an almost similar problem when using the libcpr library with Archicad. (The error is different, but Archicad crashes). Iam using libcpr 1.10.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;cpr::Response r = cpr::Get(cpr::Url{ "http://www.httpbin.org/get" });&lt;/PRE&gt;
&lt;P&gt;As you have also mentioned, this(and the POST request) works perfectly on a stand-alone C++ project for me as well.&lt;/P&gt;
&lt;P&gt;However, when I use it with Archicad 27, it crashes and gives me an access violation error, like so, and then a stack-based cookie overrun.&lt;/P&gt;
&lt;P&gt;I am suspecting this could be a clash with libcurl dlls (since my application already uses libcurl and libcpr is a wrapper around libcurl). Not sure, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error details:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;============================================================

Exception thrown at 0x00007FF99C111BB5 (Addon.apx) in Archicad.exe: 0xC0000005: Access violation reading location 0x0000108A3D944CF0.

The thread 0x734 has exited with code 0 (0x0).
Unhandled exception at 0x00007FF99C14B1D1 (Addon.apx) in Archicad.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.

The program '[48704] Archicad.exe' has exited with code 0 (0x0).

============================================================&lt;/LI-CODE&gt;
&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 21:52:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/579821#M8979</guid>
      <dc:creator>rajani</dc:creator>
      <dc:date>2023-12-17T21:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Exception when using libcpr library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/580109#M8992</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you specified DEBUVERS somewhere in your project settings or code? That might have a side effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, try to put the include for cpr before any of the GSRoot includes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 09:13:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/580109#M8992</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2023-12-13T09:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exception when using libcpr library</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/581078#M9013</link>
      <description>&lt;P&gt;Hi Akos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response. I tried both the fixes you suggested, but unfortunately that did not fix the issue.&lt;/P&gt;&lt;P&gt;I get the same errors I reported above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any alternate/additional solutions that I could try to address this issue?&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajani&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 00:18:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-when-using-libcpr-library/m-p/581078#M9013</guid>
      <dc:creator>rajani</dc:creator>
      <dc:date>2023-12-20T00:18:42Z</dc:date>
    </item>
  </channel>
</rss>

