I used lua script to complete my project. But when I set libc.debug.malloc=1 to debug memory leak, then the app can’t run on android platform.
I compiled my project, cocos2d-x, and luajit with -g, it crash in the luajit code.
And then I run the sample/Lua/TestLua/, also has the crash problem.
When I change luajit to lua5.1 and also set libc.debug.malloc=1, then the app is ok.
I have tested on following phones:
“Nexus 4, cm10.1 android 4.2.2”
“Htc Desire(G7), cm7 android 2.3.3”
With following steps can always meet the crash:
- adb shell setprop libc.debug.malloc 1
- adb shell stop (note do not use adb reboot)
- adb shell start
- adb shell getprop libc.debug.malloc (if result is 1 is ok, then try again from step one)
ok, now you can run the sample/Lua/Testlua/project.android. It could be crash.
I have tested following:
version 3.0-develop (latest pulled)
bug posted at Bug #3074.