Closed
Description
Encountering the following exception while trying to run the TriangleDroid app within Labs either on an emulator (targeting API 28 / Android 9.0) or on a physical device (a Pixel 2 with API 30 / Android 11). I am using the master branch updated to the commit with no changes to the code: 5b4ab6d
$exception {System.InvalidProgramException: Invalid IL code in Silk.NET.SDL.SdlContext:AssertNotCreated (): IL_0008: cgt.un
Stacktrace:
at Silk.NET.SDL.SdlContext.set_Window (Silk.NET.SDL.Window* value) [0x00001] in E:\Code\Silk.NET\src\Windowing\Silk.NET.SDL\SdlContext.cs:48
at Silk.NET.SDL.SdlContext..ctor (Silk.NET.SDL.Sdl sdl, Silk.NET.SDL.Window* window, Silk.NET.Core.Contexts.IGLContextSource source, System.ValueTuple`2[Silk.NET.SDL.GLattr,System.Int32][] attributes) [0x0000f] in E:\Code\Silk.NET\src\Windowing\Silk.NET.SDL\SdlContext.cs:32
at Silk.NET.Windowing.Sdl.SdlView.get_GLContext () [0x00000] in E:\Code\Silk.NET\src\Windowing\Silk.NET.Windowing.Sdl\SdlView.cs:58
at Silk.NET.Windowing.Sdl.SdlView.CoreInitialize (Silk.NET.Windowing.ViewOptions opts, System.Nullable`1[T] additionalFlags, System.Nullable`1[T] x, System.Nullable`1[T] y, System.Nullable`1[T] w, System.Nullable`1[T] h, System.String title, Silk.NET.Core.Contexts.IGLContext sharedContext) [0x0012b] in E:\Code\Silk.NET\src\Windowing\Silk.NET.Windowing.Sdl\SdlView.cs:161
at Silk.NET.Windowing.Sdl.SdlView.CoreInitialize (Silk.NET.Windowing.ViewOptions opts) [0x00000] in E:\Code\Silk.NET\src\Windowing\Silk.NET.Windowing.Sdl\SdlView.cs:100
at Silk.NET.Windowing.Internals.ViewImplementationBase.Initialize () [0x00011] in E:\Code\Silk.NET\src\Windowing\Silk.NET.Windowing.Common\Internals\ViewImplementationBase.cs:97
at Silk.NET.Windowing.WindowExtensions.Run (Silk.NET.Windowing.IView view) [0x0000e] in E:\Code\Silk.NET\src\Windowing\Silk.NET.Windowing.Common\WindowExtensions.cs:47
at Triangle.Program.Main (System.String[] args) [0x000d7] in E:\Code\Silk.NET\src\Lab\Triangle\Program.cs:58
at TriangleDroid.MainActivity.OnRun () [0x00016] in E:\Code\Silk.NET\src\Lab\TriangleDroid\MainActivity.cs:20
at Silk.NET.Windowing.Sdl.Android.SilkActivity.Run () [0x00001] in E:\Code\Silk.NET\src\Windowing\Android\Silk.NET.Windowing.Sdl.Android\Additions\SilkActivity.cs:65
at Silk.NET.Windowing.Sdl.Android.SilkActivity.Main () [0x00019] in E:\Code\Silk.NET\src\Windowing\Android\Silk.NET.Windowing.Sdl.Android\Additions\SilkActivity.cs:45
at (wrapper native-to-managed) Silk.NET.Windowing.Sdl.Android.SilkActivity.Main()} System.InvalidProgramException
Steps to reproduce
- Platform: Mobile (physical and emulator)
- Framework Version: .NET Core 3, Xamarin Android 9.0/11.0
- API: OpenGL
- API Version: OpenGLES 3.0 (I think)
- Try to launch the TriangleDroid via Visual Studio 2019 either on an emulator or an Android device
Normal Xamarin.Android apps work properly so I am not sure if it's a problem with my specific set up. Please let me know if any other info would be of help.