Menu

#46 crash when compile & run with Android NDK v8

0.5.0
closed-accepted
nobody
Reader (16)
5
2015-03-06
2012-06-13
No

if (pBuffer != NULL)
{
Json::Reader* jsonReader = new Json::Reader();
bool isParsingSuccessful = jsonReader->parse( pBuffer, pBuffer+size, m_jsonObj,false );

if ( !isParsingSuccessful )
{
string err = "JSON parsing Error :" + aniFilePath;
CCAssert(0,err.c_str());
}

// sth wrong in NDK free() mechanism, so let it leak on android(BUG).
delete jsonReader;

}

when I used above code, it works fine with iOS SDK, however same code cause crash when it compiled & run with Android NDK.

Error log messages are given below.

06-13 14:21:23.080: A/libc(16726): @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree
06-13 14:21:23.080: A/libc(16726): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)

I also tried 0.6.0 rc2, it causes same crash only on android ndk.

I think it might be bug of libc.so in Android NDK, but please let me know if there is any workaround.

Thanks.

Discussion

  • Christopher Dunn

    Pretty sure this relates to the global null Value object, which was a mistake. We applied the Android patch here: https://github.com/open-source-parsers/jsoncpp/

     
  • Christopher Dunn

    • status: open --> closed-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.