#131 wxJSON <= 1.2 - problem when linking with wxWidgets 2.9.1

open
wxJSON (16)
5
2012-12-15
2011-04-19
No

Patrick discovered a bug when wxJSON is linked against wxWidgets 2.9.1 64 bits:

There is an ASSERTION failure with wxjson on 64bit (it compiles fine) :

/src/wx291debug/include/wx-2.9/wx/strvararg.h(449): assert "(argtype &
(wxFormatStringSpecifier<T>::value)) == argtype" failed in
wxArgNormalizer(): format specifier doesn't match argument type

it is happening when:
wxJSONValue preference;

ASSERT INFO:
/home/psc/src/wx291debug/include/wx-2.9/wx/strvararg.h(449): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxOnAssert(char const*, int, char const*, char const*, char const*) /home/psc/src/wxWidgets-2.9.1/./src/common/appbase.cpp:1129
[2] wxArgNormalizer() /home/psc/src/wx291debug/include/wx-2.9/wx/strvararg.h:449
[3] wxJSONValue::Item(wxString const&) /home/psc/src/kiku/kiku/jsonval.cpp:1818
[4] MainFrame::createpreference() /home/psc/src/kiku/kiku/main.cpp:2699
[5] MainFrame() /home/psc/src/kiku/kiku/main.cpp:247

Patrick also discovered the problem but not the casue:

needed to comment this line in jsonval.cpp in wxJSONValue::Item()
wxLogTrace( traceMask, _T("(%s) actual object: %s"), __PRETTY_FUNCTION__, GetInfo().c_str());

The ASSERTION failure does not occur in wxWidgets 2.8 64-bit.

I will try to reproduce the error on 32-bit systems (I do not own a 64 bit machine) in order to determine if the problem is in the architecture (64bit) or in the wxWidgets version; it seems that the failure only happens with 2.9.1

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks