Monogame: Builds now crashing on startup on Android 6 & 7?

Created on 30 Jul 2019  路  7Comments  路  Source: MonoGame/MonoGame

I tried building stable and dev builds of monogame myself and then finding the app crashes on Android versions 6 & 7 when it tries to load dlls.

I then tried using the dev builds from nuget and they are showing similar behaviour.

It appears to be fine on other versions of Android as do the stable nuget builds of monogame.

07-30 11:19:50.880 E/AndroidRuntime(23660): android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'MonoGame.OpenGL.GL' threw an exception. ---> System.DllNotFoundException: dl 07-30 11:19:50.880 E/AndroidRuntime(23660): at (wrapper managed-to-native) MonoGame.Utilities.FuncLoader.dlopen(string,int) 07-30 11:19:50.880 E/AndroidRuntime(23660): at MonoGame.Utilities.FuncLoader.LoadLibrary (System.String libname) [0x00000] in <1cdd20a6d5654884ade8e071ffccae4d>:0

I'm using the latest stable Xamarin and Visual Studio Mac versions.

Is it possible that the new version of Xamarin.Android is causing this?

What version of MonoGame does the bug occur on:

  • MonoGame 3.8.0.648 nuget

What operating system are you using:

  • Mac

What MonoGame platform are you using:

  • Android
Android

Most helpful comment

It seems this has more or less been confirmed as a problem with the latest Xamarin.Android.

https://github.com/xamarin/xamarin-android/issues/3388

It's not a monogame bug but I guess you should be aware of it as I think it's present in the monogame dev nuget builds.

All 7 comments

It seems this has more or less been confirmed as a problem with the latest Xamarin.Android.

https://github.com/xamarin/xamarin-android/issues/3388

It's not a monogame bug but I guess you should be aware of it as I think it's present in the monogame dev nuget builds.

I'm able to reproduce this bug on a Nexus9 device running Android 7.1.
I have a Pixel3 which works fine though.

Is that a problem only with VS2019?
How about xamarin.Android that comes with VS2017? Does it still work or it's broken too?

It appears to be an issue with Xamarin.Android 9.4.0.51

So turns out https://github.com/xamarin/xamarin-android/issues/3311 was a bigger bug than I thought it was :/

I had the same issue.

What version of MonoGame does the bug occur on:

  • MonoGame 3.7.1

What operating system are you using:

  • Windows 10
  • VS2019 16.2.2
  • Xamarin.Android 9.4.1.0

What MonoGame platform are you using:

  • Android

Devices

  • Redmi Note 2 (Cortex-A53) Android 5.0
  • OPPO A33 (Cortex-A53) Android 5.1

Found a workaround posted by @brendanzagaeski in https://github.com/xamarin/xamarin-android/issues/3388#issuecomment-523272489_ and solved the problem temporarily.

NOTE: Use "dl" instead, save the following xml as "MonoGame.Framework.dll.config"

<configuration>
  <dllmap dll="dl" target="__Internal" />
</configuration>

Closing as the issue was on xamarin-android side and it is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Halofreak1990 picture Halofreak1990  路  4Comments

SenpaiSharp picture SenpaiSharp  路  3Comments

bjornenalfa picture bjornenalfa  路  5Comments

NET-D3v3l0p3r picture NET-D3v3l0p3r  路  3Comments

Legendree picture Legendree  路  3Comments