<?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 crashes after closing dialog box in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242673#M3809</link>
    <description>&lt;BLOCKQUOTE&gt;Akos wrote:&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
This is the correct line:&lt;BR /&gt;
&lt;BR /&gt;
			GS::Guid nGuid = APIGuid2GSGuid((*guid_Operators)&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;);&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos
&lt;/BLOCKQUOTE&gt;&lt;I&gt;&lt;BR /&gt;
&lt;BR /&gt;
Sorry, bbcode tricked me:&lt;/I&gt;
&lt;PRE&gt;GS::Guid nGuid = APIGuid2GSGuid((*guid_Operators)&lt;I&gt;);
&lt;/I&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Jul 2019 13:15:36 GMT</pubDate>
    <dc:creator>Akos Somorjai</dc:creator>
    <dc:date>2019-07-24T13:15:36Z</dc:date>
    <item>
      <title>Archicad crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242671#M3807</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've got working code for retrieving and displaying the amount of unique operators and targets of SEOs within a project. This works fine until I close the dialog box, and Archicad crashes. I've debugged and this is the error Visual Studio gave me:&lt;BR /&gt;
&lt;PRE&gt;Exception thrown at 0x000000000033203A in Archicad.exe: 0xC0000005: Access violation executing location 0x000000000033203A. occurred&lt;/PRE&gt;
&lt;BR /&gt;Here's the code for getting the operators:&lt;BR /&gt;
&lt;PRE&gt;static int GetNumberOfOperators() {

	int size = 0;
	GSErrCode err = NoError;

	GS::Array&amp;lt;API_Guid&amp;gt;	allElements;
	GS::Array&amp;lt;GS::UniString&amp;gt; currentOperators;
	ACAPI_Element_GetElemList(API_ZombieElemID, &amp;amp;allElements);

	for (const API_Guid&amp;amp; guid : allElements) {
		GS::Array&amp;lt;GS::UniString&amp;gt; allOperators;
		API_Guid** guid_Operators = nullptr;
		Int32 nLinks;
		bool insert = true;
		err = ACAPI_Element_SolidLink_GetOperators(guid, &amp;amp;guid_Operators, &amp;amp;nLinks);

		if (err != NoError)
			continue;

		for (int i = 0; i &amp;lt; nLinks; i++) {
			GS::Guid nGuid = APIGuid2GSGuid(guid_Operators[0]&lt;I&gt;);
			GS::UniString sGuid = nGuid.ToUniString();
			for (USize a = 0; a &amp;lt; currentOperators.GetSize(); a++) {
				if (sGuid == currentOperators&lt;A&gt;)
					insert = false;
			}
			if (insert) {
				allOperators.Insert(i, sGuid);
				currentOperators.Push(sGuid);
			}
		}
		size += allOperators.GetSize();
		
		BMhFree(reinterpret_cast&amp;lt;GSHandle&amp;gt; (guid_Operators));

	}

	return size;

}&lt;/A&gt;&lt;/I&gt;&lt;/PRE&gt;
&lt;BR /&gt;The code for getting targets is pretty much exactly the same except for getting targets instead of operators.&lt;BR /&gt;&lt;BR /&gt;Any help with this would be gratefully received.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:23:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242671#M3807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-05T11:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242672#M3808</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
This is the correct line:&lt;BR /&gt;
&lt;BR /&gt;
			GS::Guid nGuid = APIGuid2GSGuid((*guid_Operators)&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;);&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Wed, 24 Jul 2019 13:14:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242672#M3808</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2019-07-24T13:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242673#M3809</link>
      <description>&lt;BLOCKQUOTE&gt;Akos wrote:&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
This is the correct line:&lt;BR /&gt;
&lt;BR /&gt;
			GS::Guid nGuid = APIGuid2GSGuid((*guid_Operators)&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;);&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos
&lt;/BLOCKQUOTE&gt;&lt;I&gt;&lt;BR /&gt;
&lt;BR /&gt;
Sorry, bbcode tricked me:&lt;/I&gt;
&lt;PRE&gt;GS::Guid nGuid = APIGuid2GSGuid((*guid_Operators)&lt;I&gt;);
&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:15:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242673#M3809</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2019-07-24T13:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242674#M3810</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the reply, although unfortunately this didn't fix my issue. Is there anything else that could be the cause of the crash?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 25 Jul 2019 10:18:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242674#M3810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-25T10:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242675#M3811</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Then I guess the problem is not in this function. Could you please send me the bug ID from GSReport?&lt;BR /&gt;
&lt;BR /&gt;
Thanks, Akos&lt;BR /&gt;
&lt;BR /&gt;
P.S.: you can use a GS::HashSet instead of the GS::Array, then you don't have to check if the guid is already in there.</description>
      <pubDate>Thu, 25 Jul 2019 12:44:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242675#M3811</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2019-07-25T12:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242676#M3812</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Here's the bug ID:&lt;BR /&gt;

&lt;PRE&gt;AC21-2019-07-26-09-42-25-4517&lt;/PRE&gt;

&lt;BR /&gt;
Also, thanks for the suggestion to use GS::HashSet.&lt;BR /&gt;
&lt;BR /&gt;
Cheers</description>
      <pubDate>Fri, 26 Jul 2019 07:46:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242676#M3812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-26T07:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242677#M3813</link>
      <description>Thanks!&lt;BR /&gt;
&lt;BR /&gt;
It hasn't showed up in our crash report database yet; did you send it in?&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Fri, 26 Jul 2019 11:38:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242677#M3813</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2019-07-26T11:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242678#M3814</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've tried sending it again:&lt;BR /&gt;

&lt;PRE&gt;AC21-2019-07-30-11-04-47-2331&lt;/PRE&gt;

&lt;BR /&gt;
Cheers&lt;BR /&gt;
&lt;BR /&gt;
EDIT: I've managed to solve the problem, as I was looking at the entirely wrong function. My output function had a memory error which was causing the problem. Thanks for the assistance anyway.</description>
      <pubDate>Tue, 30 Jul 2019 09:05:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242678#M3814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T09:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArchiCAD crashes after closing dialog box</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242679#M3815</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
This crash happens when your add-on is being unloaded, and its coming from your add-on. Maybe you free something twice?&lt;BR /&gt;
&lt;BR /&gt;
 SEO_Counter_Export.apx + 19243&lt;BR /&gt;
  C0000005 ACCESS_VIOLATION reading location 0xffffffffffffffff&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Thu, 01 Aug 2019 15:00:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-crashes-after-closing-dialog-box/m-p/242679#M3815</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2019-08-01T15:00:21Z</dc:date>
    </item>
  </channel>
</rss>

