Okay, this was my fault.
Tried to link a QJson Release build into a Debug build of my project. To
bad.
Now it works :)
Am 31.03.2012 22:06, schrieb Ruberg, Bjoern:
Hello,
I try to use QJson inside of a research project. I'm running this on
Windows 7 with Visual Studio (I'm forced to...). I successfully
compiled the library and integrated it into my project.
The parser works very good.
But when I try to use the serializer, I get crashfaults. This is my code:
{
QJson::Parser parser;
bool ok;
// json is a QString containing the data to convert
QVariantMap result = parser.parse(json.toAscii(), &ok).toMap();
QVariantMap data = result["data"].toMap();
int x = data["x"].toInt();
int y = data["y"].toInt();
qDebug() << "x: " << x << " y: " << y;
QVariantMap response;
response.insert("x", x + 100);
response.insert("y", y + 100);
QJson::Serializer serializer;
QByteArray resp = serializer.serialize(response);
} // <--- here it crashs
Actually the crash is happending at the closing bracket when all the
stuff is destructed. The message from studio is:
Invalid address specified to RtlValidateHeap( 005C0000, 0068A548 )
I played around with the code. Changed everything to pointers, even
serialized emtpy objects, but every time got exactly the same error.
Now I'm out of ideas.
Any ideas?
Thanks
Björn Ruberg
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QJson-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qjson-devel