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

Comments

Projects
None yet
2 participants
@onlyjob

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

gcc checks the types more closely, and d is too small for size_t
Fixes #117

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

This comment has been minimized.

Show comment
Hide comment
@IssMneur

IssMneur Mar 16, 2015

Member

23d96d3 should resolve this issue.

Member

IssMneur commented Mar 16, 2015

23d96d3 should resolve this issue.

@onlyjob

This comment has been minimized.

Show comment
Hide comment
@onlyjob

onlyjob 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

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

This comment has been minimized.

Show comment
Hide comment
@IssMneur

IssMneur Mar 16, 2015

Member

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

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

Member

IssMneur commented Mar 16, 2015

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

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

@onlyjob

This comment has been minimized.

Show comment
Hide comment
@onlyjob

onlyjob Mar 16, 2015

Same thing.

onlyjob commented Mar 16, 2015

Same thing.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 5, 2015

jbeich
games/wxlauncher: add DEBUG option and put verbose logging behind it
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

games/wxlauncher: add DEBUG option and put verbose logging behind it
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

This comment has been minimized.

Show comment
Hide comment
@IssMneur

IssMneur Jun 27, 2015

Member

0.9.6 release resolves this issue.

Member

IssMneur commented Jun 27, 2015

0.9.6 release resolves this issue.

@IssMneur IssMneur closed this Jun 27, 2015

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost 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

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

mat813 pushed a commit to mat813/freebsd-ports that referenced this issue Oct 10, 2016

jbeich
games/wxlauncher: add DEBUG option and put verbose logging behind it
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: https://svn.freebsd.org/ports/head@385443 35697150-7ecd-e111-bb59-0022644237b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment