Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#46 crash when compile & run with Android NDK v8

0.5.0
open
nobody
Reader (16)
5
2012-06-13
2012-06-13
YoungJae Kwon
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