There is a regression in wxWidgets causing assertion window on closing codeblocks if the project tree is expanded and is big.
../src/generic/treectlg.cpp(1539): assert "IsVisible(item)" failed in GetNextVisible(): this item itself should be visible
I've reported it to wxWidgets project and fix is identified.
https://github.com/wxWidgets/wxWidgets/issues/26839