Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WX-3.0 must be built with "-DNDEBUG" #117

Closed
onlyjob opened this issue Mar 15, 2015 · 6 comments
Closed

WX-3.0 must be built with "-DNDEBUG" #117

onlyjob opened this issue Mar 15, 2015 · 6 comments

Comments

@onlyjob
Copy link

onlyjob commented Mar 15, 2015

With WX-3.0 wxLauncher must be built with "-DNDEBUG" (which was default with WX-2.8).

When built without "-DNDEBUG" wxlauncher segfaults on second start when ~/.wxlauncher/global.ini exists:

ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxArgNormalizer /usr/include/wx-3.0/wx/strvararg.h:456
[2] wxLauncher::OnInit() /mnt/tmpssd/src/wxlauncher/wxlauncher-release-0.9.5/code/wxLauncherApp.cpp:219
[3] wxEntry(int&, wchar_t**)
[4] main /mnt/tmpssd/src/wxlauncher/wxlauncher-release-0.9.5/code/wxLauncherApp.cpp:50
[5] __libc_start_main
[6] _start

It is very counter-intuitive that is necessary to build with "-DNDEBUG" on WX-3.0 and it is not mentioned anywhere.
Perhaps build system should be modified to handle NDEBUG build flag automatically?

IssMneur added a commit to IssMneur/wxlauncher that referenced this issue Mar 16, 2015
Fixes scp-fs2open#117

Visual Studio doesn't seem to care either way, so %ld it is.
@IssMneur
Copy link
Member

23d96d3 should resolve this issue.

@onlyjob
Copy link
Author

onlyjob commented Mar 16, 2015

No the issue is still there. I applied 23d96d3, built on Debian/amd64 & WX-3.0 without "-DNDEBUG" and got the following crash:

ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxArgNormalizer /usr/include/wx-3.0/wx/strvararg.h:456
[2] ~ConvertedBuffer /usr/include/wx-3.0/wx/string.h:3490
[3] ~ConvertedBuffer /usr/include/wx-3.0/wx/string.h:3490
[4] MainWindow::MainWindow() /mnt/tmpssd/src/wxlauncher/wxlauncher-release-0.9.5/code/MainWindow.cpp:77
[5] wxLauncher::OnInit() /mnt/tmpssd/src/wxlauncher/wxlauncher-release-0.9.5/code/wxLauncherApp.cpp:248
[6] wxEntry(int&, wchar_t**)
[7] main /mnt/tmpssd/src/wxlauncher/wxlauncher-release-0.9.5/code/wxLauncherApp.cpp:50
[8] __libc_start_main
[9] _start

@IssMneur
Copy link
Member

What do you have on line 77 of code/MainWindow.cpp? I have:

this->mainTab->AddPage(new ModsPage(this->mainTab), _("Mods"), false);

@onlyjob
Copy link
Author

onlyjob commented Mar 16, 2015

Same thing.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 5, 2015
DEBUG=off (default) now shows splash screen on startup due to being on
the same #if NDEBUG bandwagon used to turn off verbose logging.

GitHub:		scp-fs2open/wxLauncher#117
PR:		199919
Submitted by:	lightside <lightside@gmx.com> (maintainer)


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@385443 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 5, 2015
DEBUG=off (default) now shows splash screen on startup due to being on
the same #if NDEBUG bandwagon used to turn off verbose logging.

GitHub:		scp-fs2open/wxLauncher#117
PR:		199919
Submitted by:	lightside <lightside@gmx.com> (maintainer)
@IssMneur
Copy link
Member

0.9.6 release resolves this issue.

@ghost
Copy link

ghost commented Feb 7, 2016

this still happens to me as of current git d56c6de

wx 3.0.2

ASSERT INFO:
./include/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxFileConfig::Parse(wxTextBuffer const&, bool)
[2] wxFileConfig::wxFileConfig(wxInputStream&, wxMBConv const&)
[3] ModList::ParseModIni(wxString const&, wxString const&, bool)
[4] ModList::ModList(wxWindow_, wxSize&, wxString)
[5] ModsPage::OnTCChanged(wxCommandEvent&)
[6] ModsPage::ModsPage(wxWindow_)
[7] MainWindow::MainWindow()
[8] wxLauncher::OnInit()
[9] wxAppConsoleBase::CallOnInit()
[10] wxEntry(int&, wchar_t**)
[11] main
[12] __libc_start_main
[13] _start /usr/src/glibc-2.20/csu/../sysdeps/x86_64/start.S:125

svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
DEBUG=off (default) now shows splash screen on startup due to being on
the same #if NDEBUG bandwagon used to turn off verbose logging.

GitHub:		scp-fs2open/wxLauncher#117
PR:		199919
Submitted by:	lightside <lightside@gmx.com> (maintainer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants