We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-02-12 02:04 PM - last edited on 2024-09-17 11:25 AM by Doreena Deng
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.
2024-06-27 12:51 PM
Still occuring in AC27 5003 INT FULL. I uploaded the log files.
We really need this to be fixed @Viktor Kovacs @Akos Somorjai
2024-06-27 01:04 PM
Hi Andre,
Have you submitted this as a bug report? If so, could you please tell me the bug ID you received? This would give me more information.
Thanks, Akos
2024-06-27 02:30 PM - edited 2024-06-27 02:51 PM
Hi @Akos Somorjai ,
here is the report ID: AC26-2024-06-27-12-29-23-7213
It is happening randomly on shutdown of ArchiCAD, in the destructor of DG::Browser. I reproduced it in AC26 right now because it happens more often so it was easier to trigger it.
2024-06-27 03:11 PM
Hi Andre,
Thanks, that's very useful! I forwarded your request to a developer who knows more about this.
2024-07-02 09:28 AM
Hi Andre,
We haven't found the exact cause – yet. How are you destroying the DG::Browser instance?
Thanks, Akos
2024-07-02 11:50 AM
Hi Akos,
here is a brief snippet of the hierarchy:
class LicenseManagerNew {
static LicenseManagerNew *instance; // singleton class
OAuthPalette loginPalette;
~LicenseManagerNew(); // destructor implemented, but does not explicitly destroy loginPalette
}
class OAuthPalette : DG::Palette {
OAuthBrowser browser;
// no destructor implemented
}
class OAuthBrowser : DG::Browser {
// no destructor implemented
}
The crash happens only sometimes on shutdown on ArchiCAD. As you can see, LicenseManagerNew is a singleton class which gets destroyed automatically. The destructor of it does not explicitly destroy the other components I showed, but it happens implicitly on the end of the destructor (automatically). I have not implemented any other destructors, the exception is thrown internally in the DG::Browser's destructor. I haven't recognized any pattern how to trigger it exactly, but before exiting, the browser was used and a connection might still be open (if HTTP/2 if supported, at least).
Kind Regards
André
2024-07-04 02:37 PM
Any news on this? Have you sent them the stacktrace I uploaded?
2024-07-04 03:52 PM
Hi André,
Just two "maybe" ideas so far:
- for some reason, the creation of the browser fails – do you receive any error?
- memory overwrite in BIMmTool -- have you run the add-on with any memory checks?
Best, Akos
2024-07-05 02:47 PM
Hi Akos,
the browser was created and worked fine. It's just its shutdown that causes issues. The access violation is triggered in the ArchiCAD code (as seen in the stacktrace). It tries reading a null pointer (as seen in the log). I don't think it would access any of the pointers managed by BIMmTool, would it?
To me this looks like some race condition. As I said, the destruction happens when the singleton class gets destroyed, which might happen very late. It might be so late that ArchiCAD has already freed some memory it needs for the destruction.
As a workaround, I will try to manually destroy the DG::Browser earlier now, i.e. when the project is closed. It is hard to tell whether this fixes it because it occurs so randomly. I will keep you updated.
Kind Regards
André