blitz-research/monkey2

Android arm64-v8a - OpenCFile crashs

Opened this issue · 3 comments

Hi

if I build Monkey2 for arm64-v8a all compiles fine
(after EACCES fix from seyhajin - http://monkeycoder.co.nz/forums/topic/android-64bit-arm64-v8a/#post-16227).

After my App tries to read a config file it crashs at:

2019-07-22 07:43:55.587 18510-18679/com.lb.app I/MX2: Monkey 2 Runtime error: SIGNAL: Memory access violation
2019-07-22 07:43:55.587 18510-18679/com.lb.app I/MX2: {{!DEBUG!}}
2019-07-22 07:43:55.587 18510-18679/com.lb.app I/MX2: >OpenCFile:libc.FILE Ptr(path:monkey.types.String,mode:monkey.types.String);C:/dev/monkey2/modules/std/filesystem/filesystem.monkey2;926;5746
2019-07-22 07:43:55.587 18510-18679/com.lb.app I/MX2: path:String="en.txt"
2019-07-22 07:43:55.587 18510-18679/com.lb.app I/MX2: mode:String="rb"

Line 926 is:
Local asset:=AAssetManager_open( asstMngr,path,0 )
Is differs in my source because I add some debug log output.

The same APK on a armeabi-v7a works fine (compiled for both v7a and v8a in one APK).

I'm using the latst NDK Version (20.0.5594570).

Apologies, I removed the suggestion after realizing I was confused. I became more confused when
not seeing this in my windows config (macos only?):

'MX2_ANDROID_APP_ABI=all

I assume from your user name you are on Mac and have this switched on to enable the 64 bit mode?

No, I'm working with Win10.

My android section looks like this:
'***** ANDROID TARGET *****

'Note: Requires Android Studio + Android NDK, see: https://developer.android.com/studio/index.html

'This is where my ndk-bundle is located - yours is probably somewhere else!
'
'For android builds, you need to either set this correctly or make sure 'ndk-build' is available from the command line via you PATH.
'
'PATH=D:\devtools\Android\sdk\ndk-bundle;${PATH}
PATH=C:\apps\Android\Sdk\ndk-bundle;${PATH}

'Application.mk
'
MX2_ANDROID_APP_CFLAGS=-std=gnu99 -fno-stack-protector
MX2_ANDROID_APP_CPPFLAGS=-std=c++11 -fno-stack-protector -frtti -fexceptions
MX2_ANDROID_APP_PLATFORM=android-16
MX2_ANDROID_APP_ABI=armeabi-v7a arm64-v8a
MX2_ANDROID_APP_STL=c++_static