This code is consistently crashing my android app:
var familyColors = new Color[7];
Texture2D texture = GetMyTexture();
texture.GetData<Color>(familyColors, 0, 7);
It crashes slightly after the call to GetData, so it appears to be putting the monogame engine in a bad state that causes a later crash. It works like a charm in my windows desktop app.
Here’s the tail of the log:
02-16 14:59:54.560 D/Mono (16334): Searching for ‘java_interop_jnienv_set_byte_array_region’.
02-16 14:59:54.561 D/Mono (16334): Probing ‘java_interop_jnienv_set_byte_array_region’.
02-16 14:59:54.561 D/Mono (16334): Found as ‘java_interop_jnienv_set_byte_array_region’.
02-16 14:59:54.564 D/Mono (16334): DllImport searching in: ‘__Internal’ (’(null)’).
02-16 14:59:54.564 D/Mono (16334): Searching for ‘java_interop_jnienv_get_byte_array_region’.
02-16 14:59:54.565 D/Mono (16334): Probing ‘java_interop_jnienv_get_byte_array_region’.
02-16 14:59:54.565 D/Mono (16334): Found as ‘java_interop_jnienv_get_byte_array_region’.
02-16 14:59:54.629 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:54.629 D/Mono (16334): Searching for ‘glGenTextures’.
02-16 14:59:54.630 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:54.630 D/Mono (16334): Searching for ‘glBindTexture’.
02-16 14:59:54.631 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:54.631 D/Mono (16334): Searching for ‘glTexParameteri’.
02-16 14:59:54.634 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:54.634 D/Mono (16334): Searching for ‘glTexImage2D’.
02-16 14:59:54.649 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:54.649 D/Mono (16334): Searching for ‘glPixelStorei’.
02-16 14:59:55.339 D/Mono (16334): DllImport searching in: ‘openal32.dll’ (’./libopenal32.so’).
02-16 14:59:55.339 D/Mono (16334): Searching for ‘alGenBuffers’.
02-16 14:59:55.341 D/Mono (16334): DllImport searching in: ‘openal32.dll’ (’./libopenal32.so’).
02-16 14:59:55.341 D/Mono (16334): Searching for ‘alGetError’.
02-16 14:59:55.359 D/Mono (16334): DllImport searching in: ‘openal32.dll’ (’./libopenal32.so’).
02-16 14:59:55.360 D/Mono (16334): Searching for ‘alBufferData’.
02-16 14:59:55.361 D/Mono (16334): DllImport searching in: ‘openal32.dll’ (’./libopenal32.so’).
02-16 14:59:55.361 D/Mono (16334): Searching for ‘alGetBufferi’.
02-16 14:59:55.447 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:55.447 D/Mono (16334): Searching for ‘glGenFramebuffers’.
02-16 14:59:55.448 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:55.448 D/Mono (16334): Searching for ‘glFramebufferTexture2D’.
02-16 14:59:55.452 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:55.452 D/Mono (16334): Searching for ‘glReadPixels’.
02-16 14:59:55.457 D/Mono (16334): DllImport searching in: ‘libGLESv2.dll’ (’/system/lib/libGLESv2.so’).
02-16 14:59:55.458 D/Mono (16334): Searching for ‘glDeleteFramebuffers’.
02-16 14:59:55.460 F/ (16334): * Assertion at /Users/builder/data/lanes/3511/501e63ce/source/mono/mono/sgen/sgen-alloc.c:384, condition `*p == NULL’ not met
02-16 14:59:55.461 F/libc (16334): Fatal signal 6 (SIGABRT), code -6 in tid 16334 (tafreak.Trapdot)