Author Topic: wxWidgets 3.1.5  (Read 11332 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
wxWidgets 3.1.5
« on: March 11, 2021, 06:26:35 pm »
I'm trying to compile under Windows 10, Code::Blocks (last svn 12302) with wxWidgets 3.1.5 (just to try because I have the feeling that the release is almost ready !).
Compilation seems OK (if I use a Mingw64 distribution with binutils 2.35). But, when starting C::B, I obtain an assert message telling me a problem in GetString(), len!=(-1) msw/choice.cpp (369). This assert on that line of code was not present in previous 3.1.4 version. If I comment line 369 in msw\choice.cpp, I have no more this assert Message, but it's probably not a good idea.
Problem in wxWidgets msw code or in C::B ? I don't know.
« Last Edit: March 11, 2021, 06:57:14 pm by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.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: 1553
Re: wxWidgets 3.1.5
« Reply #1 on: March 11, 2021, 06:54:33 pm »
Cannot reproduce with MinGW64 and binutils 2.30, but I am generating 32 bits binaries.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #2 on: March 11, 2021, 07:15:03 pm »
I don't think it's a 32/64 bits problem. It looks more as a GetString call with a string not correctly initialised the first time.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.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: 1553
Re: wxWidgets 3.1.5
« Reply #3 on: March 11, 2021, 07:29:35 pm »
Did you try renaming default.conf?

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #4 on: March 11, 2021, 07:50:41 pm »
I din't ... but after a rename, and a new default.conf creation by C::B, the problem is still there.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.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: 1553
Re: wxWidgets 3.1.5
« Reply #5 on: March 11, 2021, 07:52:19 pm »
Can you attach a stack trace?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxWidgets 3.1.5
« Reply #6 on: March 11, 2021, 10:03:24 pm »
Have you tried to reproduce this in wx-samples? Does the choice (widgets probably) sample works correctly with your build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #7 on: March 12, 2021, 09:50:36 am »
@ Miguel : There is no RPT file produced, but I don't think it's what you want. How do you produce a stack trace ? Is it necessary to have a debug version of C::B ?
@ oBFusCATed : I don't have any (such) messages in  any samples I tried. Particularly, I tried "choice" in "wxwidgets" sample and it seems to work as it should.
« Last Edit: March 12, 2021, 02:42:05 pm by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxWidgets 3.1.5
« Reply #8 on: March 12, 2021, 10:30:20 am »
You need a debugger and possibly symbols. No need to build non-optimized builds.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
[Solved] Re: wxWidgets 3.1.5
« Reply #9 on: March 12, 2021, 07:12:23 pm »
OK, solved.
I have added DEBUG_FLAG=0 in my command line to build wxwidgets.
Until now, I had DEBUG_LEVEL=0. I have seen that somewhere, some time ago and until now I had no problems. But the parameter in the command line is DEBUG_FLAG, which is 1 by default and set a wxDEBUG_LEVEL (not DEBUG_LEVEL). Now, with DEBUG_FLAG=0, it forces wxDEBUG_LEVEL to 0, and I am no more annoyed by this wxAssert Message. May be, it masks an other problem, but it works as in 3.1.4 version.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #10 on: March 13, 2021, 11:30:53 am »
In parallel, I had signaled this behaviour on wxtrac.
Here is their answer :
Quote
Comment (by MaartenB):

 FYI, it was added in https://github.com/wxWidgets/wxWidgets/pull/2169

 Apparently you call `wxChoice::GetString()` with invalid index `-1`. The
 behaviour is also documented in
 https://docs.wxwidgets.org/trunk/classwx_choice.html#a3a89e3eef072e7914f8408154b4a1daa

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19096#comment:3>

So, for them, there is a call to GetString with incorrect value.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.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: 1553
Re: wxWidgets 3.1.5
« Reply #11 on: March 13, 2021, 11:48:24 am »
That was clear, the problem is finding where the call is, and the stack trace is the guide.

EDIT: can you try starting C::B from command line using --safe-mode switch?.
« Last Edit: March 13, 2021, 12:08:23 pm by Miguel Gimenez »

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #12 on: March 13, 2021, 12:29:06 pm »
running codeblocks from the command line give this :
  • without option : give the message; Nothing seems to be created (no log, no txt file), but may be I should use a C::B code compiled with -g and also perhaps wxwidgets).
  • with --safe-mode : no message.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: wxWidgets 3.1.5
« Reply #13 on: March 13, 2021, 12:58:31 pm »
I tried to disable plugins and re-enable them one by one.
The guilty seems to be FileManager plugin : no message if it is disabled alone, all other activated.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.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: 1553
Re: wxWidgets 3.1.5
« Reply #14 on: March 13, 2021, 08:31:17 pm »
Now I can reproduce, this is the stack trace:

Code
#0  0x62da1cb8 in wxChoice::GetString(unsigned int) const () from C:\Windows\system32\wxmsw315u_gcc_custom.dll
#1  0x6c32422f in FileExplorerUpdater::Update (this=0x20572958, ti=...)
    at G:\cbtrunk\src\plugins\contrib\FileManager\FileExplorerUpdater.cpp:153
#2  0x6c30a1ba in FileExplorer::OnTimerCheckUpdates (this=0x205c07e0)
    at G:\cbtrunk\src\plugins\contrib\FileManager\FileExplorer.cpp:594
#3  0x62a43222 in wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const ()
   from C:\Windows\system32\wxmsw315u_gcc_custom.dll
#4  0x0028d57c in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)