Crashing at ~API_HotlinkNode()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Getting this message on the crash breakpoint:
Critical error detected c0000374
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Archicad.exe.
This happened here:
GS::Array<API_Guid>& hotlinks;
//.. more codes here that retrieves hotlink guids
for (UInt32 i = 0; i < hotlinks.GetSize(); ++i)
{
//get the hotlink node
API_HotlinkNode hotlinkNode = Hotlink::GetNode(hotlinks[i]);
GS::UniString nameUStr = hotlinkNode_1.name;
if (!FilterHotlinkName(nameUStr))
continue; <== crashes here
// .. more codes here
}
FilterHotlinkName() checks the name if it follows a certain format and if it is valid value. Hotlink::GetNode() handles correct ArchiCAD version calls:
API_HotlinkNode Hotlink::GetNode(API_Guid i_guid)
{
API_HotlinkNode hotlinkNode = {};
hotlinkNode.guid = i_guid;
#if ARCHICAD_VER >= 27
LastGSErr = ACAPI_Hotlink_GetHotlinkNode(&hotlinkNode);
#else
LastGSErr = ACAPI_Database(APIDb_GetHotlinkNodeID, &hotlinkNode);
#endif
return hotlinkNode;
}
Specifically, the crash happens here (APIdefs_Database.h):
~API_HotlinkNode ()
{ vvvvvvvvvvvvvvvvvvvvv==== crashes here
delete sourceLocation; sourceLocation = nullptr;
delete serverSourceLocation; serverSourceLocation = nullptr;
BMKillPtr (&userData.data);
}
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
Solved! Go to Solution.
- Labels:
-
Possible Bug
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I guess about reason.
Actually, you can not copy and assign the API_HotlinkNode structure.
Formally this structure have to declare empty copy constructor snd assignmen operator to protect it, as it has such destructor.
So you can not to return API_HotlinkNode from the GetNode function by value.
For example, you may to implement the GetNode function like this: bool GetNode( const API_Guid& guid, API_HotlinkNode* node ).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I guess about reason.
Actually, you can not copy and assign the API_HotlinkNode structure.
Formally this structure have to declare empty copy constructor snd assignmen operator to protect it, as it has such destructor.
So you can not to return API_HotlinkNode from the GetNode function by value.
For example, you may to implement the GetNode function like this: bool GetNode( const API_Guid& guid, API_HotlinkNode* node ).