Discussion:
wxJSON and wxWidgets 3.0.0
jm130794
2014-02-01 12:27:19 UTC
Permalink
Hello,

When I use wxJSON 1.2 with wxWidgets 3.0, I have this error when I run my
program :

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

My program :

#include <iostream>

#include <wx/string.h>
#include <wx/wfstream.h>
#include <wx/mstream.h>

#include <wx/jsonval.h>
#include <wx/jsonreader.h>
#include <wx/jsonwriter.h>

using namespace std;

int main()
{
wxJSONValue root;
wxJSONReader reader;

wxFileInputStream inStream("values.json");

int numErrors = reader.Parse(inStream, &root);
if (numErrors > 0) {
cout << "Error" << endl;
return 1;
}

return 0;
}

and values.json :

/***************************
This is a C-style comment
***************************/
{
// this is a comment line in C++ style
"wxWidgets" :
{
"Description" : "Cross-platform GUI framework",
"License" : "wxWidgets",
"Version" :
{
"Major" : 2,
"Minor" : 8,
"Stable" : true
},
"Languages" :
[
"C++",
"Phyton",
"Perl",
"C#/Net"
]
}
}


Any ideas ?

Thanks,

Jean-Marc
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-02-01 18:04:30 UTC
Permalink
On Sat, 1 Feb 2014 04:27:19 -0800 (PST) jm130794 wrote:

j> When I use wxJSON 1.2 with wxWidgets 3.0, I have this error when I run my
j> program :

Looks like a bug in wxJSON (as there are no wxPrintf()-like functions call
in your own code). You need to break into the debugger when the assert
fails and find the wrong format string and correct it.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Loading...