Author Topic: Codeblocks and wxwidgets 3.3 under Windows  (Read 2428 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 802
Codeblocks and wxwidgets 3.3 under Windows
« 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) !
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.5 (tests with 3.3), Msys2 Compilers 14.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1708
Re: Codeblocks and wxwidgets 3.3 under Windows
« Reply #1 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.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 802
Re: Codeblocks and wxwidgets 3.3 under Windows
« Reply #2 on: March 25, 2025, 06:06:01 pm »
With that patch, it's effectively OK now. Thanks
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.5 (tests with 3.3), Msys2 Compilers 14.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1708
Re: Codeblocks and wxwidgets 3.3 under Windows
« Reply #3 on: March 25, 2025, 06:21:21 pm »
Fixed in r13642, thank you for reporting and testing.