2025-04-02
	
		
		04:57 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		2025-04-03
	
		
		11:39 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		
		
			Laszlo Nagy 
		
		
		
		
		
		
		
		
	
			
		
Hello everybody,
My plugin crashes at random places on AC28 but the same code works fine on AC27 and AC26.
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.
Again, this happens on AC28 only.
Here is a screenshot of a typical crash
and the corresponding call stack
 	tbbmalloc.dll!00007ffdf5fa806e()	Unknown
 	tbbmalloc.dll!00007ffdf5fa87ab()	Unknown
 	GSRoot.dll!00007ffddb686e63()	Unknown
>	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<16,std::_Default_allocate_traits>(const unsigned __int64 _Bytes) Line 258	C++
 	MyPlugin.apx!std::allocator<std::_Container_proxy>::allocate(const unsigned __int64 _Count) Line 987	C++
......
Exception thrown at 0x00007FFDC9CD2E0C (ObjectDatabase.dll) in Archicad.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.This looks like dereferencing a null pointer or trying to release memory that has already been released.
Also, I noticed AC28 use a whole lot of RAM compared to AC26 (and AC27)
Any ideas what might be wrong and how to fix it?
I am compiling w/ Visual Studio 2022 platform toolset v143 C++ 17 on Windows 10
The same crash happens on Mac as well
2025-04-03 02:30 PM - edited 2025-04-08 11:45 AM