We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

APIEnv_Get3DImageSetsID Crash (API 26)

Oleg
Expert

Call the APIEnv_Get3DImageSetsID crashed Archicad ( exception thrown in debugger).
It seems APIEnv_Change3DImageSetsID too.

Both in our Addon and the Environment_Control example.

Is there an API bug ?

Update: 
The Environment_Control example works for Release build. 
But crashes for Debug build.

2 REPLIES 2
akomporday
Graphisoft Alumni
Graphisoft Alumni

Hi Oleg,

These types of crashes usually happen because of uninitialized variables. In some cases, in debug build the uninitialized memory gets set to NULL, while on Release it contains memory garbage. Are filterAndCutSettings and mustConvert both initialized? 

Graphisoft's Environment_Control example. Do_SetFilterAndCutSettings () function.
Using Cmake create a VS solution. 
Release build works, Debug build crashes.

Is it works for you ?

PS: Just guess. I think, one of possible reason is different debug memory handling of std::map.  For caller (addon) and APIEnv_Get3DImageSetsID API implementation.