МоноГейм на Android вылетает при вырезании таблицы спрайтов

#c# #android #mono #xna #monogame

#c# #Android #моно #xna #моногейм

Вопрос:

Когда я запускаю следующий код на Android, приложение вылетает с отображением устройства

$AppName перестал работать.

в то время как IDE не говорит ничего, кроме

 10-13 16:30:21.729 D/Mono    (27656): DllImport searching in: 'libGLESv2.dll' ('./libGLESv2.so').
10-13 16:30:21.730 D/Mono    (27656): Searching for 'glGenFramebuffers'.
10-13 16:30:21.730 D/Mono    (27656): DllImport searching in: 'libGLESv2.dll' ('./libGLESv2.so').
10-13 16:30:21.730 D/Mono    (27656): Searching for 'glFramebufferTexture2D'.
10-13 16:30:21.732 D/Mono    (27656): DllImport searching in: 'libGLESv2.dll' ('./libGLESv2.so').
10-13 16:30:21.732 D/Mono    (27656): Searching for 'glReadPixels'.
10-13 16:30:21.737 D/Mono    (27656): DllImport searching in: 'libGLESv2.dll' ('./libGLESv2.so').
10-13 16:30:21.737 D/Mono    (27656): Searching for 'glDeleteFramebuffers'.
Thread finished: <Thread Pool> #4
10-13 16:30:28.944 D/Mono    (27656): [0xf415cc00] worker finishing
The thread 'Unknown' (0x4) has exited with code 0 (0x0).
10-13 16:30:36.618 D/Mono    (27656): Image addref System.Runtime.Serialization[0xdbe39100] -> System.Runtime.Serialization.dll[0xdbe25600]: 1
10-13 16:30:36.618 D/Mono    (27656): Assembly System.Runtime.Serialization[0xdbe39100] added to domain RootDomain, ref_count=1
10-13 16:30:36.621 D/Mono    (27656): AOT module 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/AndroidBuild.AndroidBuild-1/lib/x86/libaot-System.Runtime.Serialization.dll.so" not found
10-13 16:30:36.624 D/Mono    (27656): AOT module '/Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/AndroidBuild.AndroidBuild-1/lib/x86/libaot-System.Runtime.Serialization.dll.so" not found
10-13 16:30:36.626 D/Mono    (27656): Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
10-13 16:30:36.626 D/Mono    (27656): Config attempting to parse: '/Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/builds/install/mono-x86/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
10-13 16:30:36.626 D/Mono    (27656): Assembly Ref addref MonoGame.Framework[0xea6083a0] -> System.Runtime.Serialization[0xdbe39100]: 2
10-13 16:30:36.627 D/Mono    (27656): Assembly Ref addref System.Runtime.Serialization[0xdbe39100] -> mscorlib[0xea608280]: 17
10-13 16:30:36.695 F/        (27656): * Assertion at /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mono/sgen/sgen-alloc.c:384, condition `*p == NULL' not met
10-13 16:30:36.696 F/libc    (27656): Fatal signal 6 (SIGABRT), code -6 in tid 27656
  

Код, который я использую

  public void SplitSheet()
        {
            for (int i = 0; i < FramesCountTotal; i  )
            {
                //Calculate the location of the current sprite within the image.
                int Row = (int)(i / (float)fColumns);  
                int Column = i % fColumns;

                //Transform into a rectangle.
                Rectangle FrameRect = new Rectangle(fWidth * Column, fHeight * Row, fWidth, fHeight);

                //Create a new texture object with the dimensions of the sprite.
                Texture2D curFrame = new Texture2D(Core.graphics.GraphicsDevice, FrameRect.Width, FrameRect.Height);
                //Create a color array to hold the color data of the sprite.
                Color[] FrameData = new Color[FrameRect.Width * FrameRect.Height];
                //Get the color data from the spritesheet.
                textureAtlas.Image.GetData(0, FrameRect, FrameData, 0, FrameData.Length);
                //Set the colors we extracted to the texture object.
                curFrame.SetData<Color>(FrameData);
                //Add the texture to the array.
                frames.Add(curFrame);
            }
        }
  

Насколько я могу судить, строка, на которой он вылетает, curFrame.SetData<Color>(FrameData);

Есть идеи о том, как получить более конкретную отладочную информацию или почему это работает на Windows, но не на Android?