cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The 2025 Technology Preview Program is now live. Join today!

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

Crash in destructor of DG::Browser

andrewille
Participant

Hello,

I am experiencing random crashes in the destructor of my class, which extends the DG::Browser class. The weird thing is that I do not override the destructor. So I think this might be an issue of ArchiCAD 26.


Can somebody relate or has a solution for this? Thanks.

13 REPLIES 13

Hi André,

 

The race condition looks promising; some garbage collection may have destroyed the browser control.

 

Let me know if this works.

 

Best, Akos

 

dushyant
Enthusiast

@andrewille  - Hi, were you able to solve this?

Hello @dushyant ,

yes, indeed. I found a workaround that works for me in all tested versions of ArchiCad. You need to manually destroy the DG::Browser instance earlier. I hooked the method when a project is closed to do it. Maybe it would also work with the shutdown hook. Just do it early enough so the rest of Archicad is still initialized and then you won't get any race conditions anymore.

Okay, great that you were able to fix it!
Could you please share where exactly you destroy the DG::Browser instance so that is early enough to avoid the crash?
Just to confirm - in your case, did you explicitly call ~OAuthBrowser() or used some other way to destroy it?

Thanks.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!