Code::Blocks Forums

User forums => Help => Topic started by: gd_on on March 25, 2025, 04:00:30 pm

Title: Codeblocks and wxwidgets 3.3 under Windows
Post by: gd_on on March 25, 2025, 04:00:30 pm
As wxWidgets 3.3.0 will be released next month (due date April 15th), I'm trying to compile C::B (last svn 13640) with wxwidgets 3.3.0. Compilation and link under Windows 24H2 with Msys2/mingW64 is OK. When I open C::B, it's OK too. But when I open a project, I obtain several wxCHECK_MSG (one by opened tab containing source code) coming from src/aui/auibook.cpp at line 2592, in SetPageToolTip : apparently something wrong with page_idx (invalid page index). Recently, there has been many changes in auibook.cpp. May be it needs some adjustments in C::B for wxWidgets 3.3 (no such problems with wxWidgets 3.2.6) !
Title: Re: Codeblocks and wxwidgets 3.3 under Windows
Post by: Miguel Gimenez on March 25, 2025, 05:23:09 pm
There are only two calls to SetPageToolTip():
  - one is in a loop with well defined range (projectmanagerui.cpp:2199)
  - other uses the result of wxAuiNotebook::GetPageIndex() (editorbase.cpp:169)

Chenging the second part to this
Code
    if (nb)
    {
        const int idx = nb->GetPageIndex(this);
        if (idx != wxNOT_FOUND)
        {
            nb->SetPageToolTip(idx, toolTip);
            Manager::Get()->GetEditorManager()->MarkReadOnly(idx, IsReadOnly() || (fname.FileExists() && !wxFile::Access(fname.GetFullPath(), wxFile::write)) );
        }
    }
should fix the issue.
Title: Re: Codeblocks and wxwidgets 3.3 under Windows
Post by: gd_on on March 25, 2025, 06:06:01 pm
With that patch, it's effectively OK now. Thanks
Title: Re: Codeblocks and wxwidgets 3.3 under Windows
Post by: Miguel Gimenez on March 25, 2025, 06:21:21 pm
Fixed in r13642 (https://sourceforge.net/p/codeblocks/code/13642/), thank you for reporting and testing.