EvergineTeam / Feedback

Feedback, feature requests, and bug reports for Evergine.
https://evergine.com
14 stars 1 forks source link

Xamarin Android project gives Object reference error on GraphicsContext CreateDevice #59

Closed stellarfoto closed 3 years ago

stellarfoto commented 3 years ago

I was using the default Android project that is creates with WaveEngine 3.1.06768 preview 2.

In the MainActivity of the Android Project. I can not get it past the following error.

public class MainActivity : Activity { private void ConfigureGraphicsContext(MyApplication application, Surface surface) { GraphicsContext graphicsContext = new VKGraphicsContext(); graphicsContext.CreateDevice(); // <<<<---- This line is the one that created the Null Reference Error. } }

{System.NullReferenceException: Object reference not set to an instance of an object at WaveEngine.Vulkan.VKGraphicsContext.CreatePhysicalDevice () [0x00053] in <3d10ca1b02a94d989f728cc631ffc56d>:0 at WaveEngine.Vulkan.VKGraphicsContext.CreateDeviceInternal () [0x00006] in <3d10ca1b02a94d989f728cc631ffc56d>:0 at WaveEngine.Common.Graphics.GraphicsContext.CreateDevice (WaveEngine.Common.Graphics.ValidationLayer validationLayer) [0x00007] in <742836b136714d80bd4c888c22a3113f>:0 at Designer.Android.MainActivity.ConfigureGraphicsContext (Designer.MyApplication application, WaveEngine.Common.Graphics.Surface surface) [0x00007] in D:\Unity Repo\SolidBuilder\Designer\Designer.Android\MainActivity.cs:61 at Designer.Android.MainActivity+<>cDisplayClass0_0.b__0 () [0x00001] in D:\Unity Repo\SolidBuilder\Designer\Designer.Android\MainActivity.cs:44 at WaveEngine.AndroidView.AndroidSurfaceView.CreateContextAndInitialization (Android.Views.ISurfaceHolder holder) [0x00045] in <89c3d1e743a442588ef92a7c6636cd00>:0 at WaveEngine.AndroidView.AndroidSurfaceView.SurfaceCreated (Android.Views.ISurfaceHolder holder) [0x0001c] in <89c3d1e743a442588ef92a7c6636cd00>:0 at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceCreated_Landroid_viewSurfaceHolder (System.IntPtr jnienv, System.IntPtr nativethis, System.IntPtr native_holder) [0x0000f] in <4454a86dea24313a2bdb807df77c27a>:0 at (wrapper namic-method) Android.Runtime.DynamicMethodNameCounter.9(intptr,intptr,intptr)}

Thank you for your help.

Greg

minolo commented 3 years ago

Hi there!

The Android templates are not ready for use yet. They should be disabled in the editor but they appear due to a bug.

For more info please check #52