News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Codeblocks and wxwidgets 3.3 under Windows

Started by gd_on, March 25, 2025, 04:00:30 PM

Previous topic - Next topic

gd_on

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) !
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Miguel Gimenez

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

    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.

gd_on

With that patch, it's effectively OK now. Thanks
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Miguel Gimenez

Fixed in r13642, thank you for reporting and testing.