I have been developing an evergine maui app with some 3d objects which was working fine on windows and android platform. Infact, it was a very smooth and quick development experience using & learning evergine.
But recently i added the default particle system asset to a particle compoent of an entity in scene, and it's throwing System.NullReferenceException error before the main screen is loaded at EvergineViewHandler.Android.cs line 53, while running it on Android physical device.
System.NullReferenceException
Message=Object reference not set to an instance of an object.
Stack Trace output:
[monodroid-assembly] Shared library 'liblog' not loaded, p/invoke '__android_log_print' may fail
[DOTNET] Create random texture
[ergineMauiFirs] Explicit concurrent copying GC freed 191(36KB) AllocSpace objects, 4(528KB) LOS objects, 49% free, 2842KB/5684KB, paused 38us total 15.301ms
[ergineMauiFirs] Explicit concurrent copying GC freed 64(34KB) AllocSpace objects, 1(132KB) LOS objects, 49% free, 2839KB/5679KB, paused 45us total 15.683ms
[0:] Error: 0 :
[0:] Precompiled shader: 5d0ed39b-6526-4c39-8de0-d00d78ba5de0 with pass: Default and directives: [DIFF-SBUFFER] not found.
System.NullReferenceException: 'Object reference not set to an instance of an object.'
Thread started: #9
System.NullReferenceException: 'Object reference not set to an instance of an object.'
The thread 9 has exited with code 0 (0x0).
Thread finished: #9
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
[mono-rt] at Evergine.Framework.Graphics.RenderObjectResourcesCache.GetMaterialSetters(RenderObjectInfo renderMesh, DrawContext drawContext, RenderPass[] passes, MaterialResourcesPerPass[]& passResources, MaterialResourceSetters& materialSetters)
[mono-rt] at Evergine.Framework.Graphics.MaterialResourcesCacheEntry.Collect()
[mono-rt] at Evergine.Framework.Graphics.RenderMeshInfo.Collect(DrawContext drawContext)
[mono-rt] at Evergine.Framework.Graphics.RenderBatch.CollectTemplate(DrawContext drawContext)
[mono-rt] at Evergine.Framework.Graphics.DrawContext.CollectBatches()
[mono-rt] at Evergine.Framework.Graphics.ForwardDrawContext.CollectBatches()
[mono-rt] at Evergine.Framework.Graphics.DrawContext.Collect()
[mono-rt] at Evergine.Framework.Graphics.CameraDrawContext.Render(CommandBuffer commandBuffer)
[mono-rt] at Evergine.Framework.Graphics.DefaultRenderPipeline.RenderSingleCamera(CameraDrawContext cameraContext)
[mono-rt] at Evergine.Framework.Graphics.DefaultRenderPipeline.Render(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Managers.RenderManager.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Managers.SceneManagers.DrawSceneManagers(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Scene.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Scene.BaseDraw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.ScreenContext.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.SingleTransition.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Services.ScreenContextManager.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Application.DrawFrame(TimeSpan gameTime)
[mono-rt] at EvergineMauiFirst.MAUI.Evergine.EvergineViewHandler.<>cDisplayClass7_0.b1() in C:\Users\Vpand\source\repos\EvergineMauiFirst\EvergineMauiFirst.MAUI\Platforms\Android\EvergineViewHandler.Android.cs:line 53
[mono-rt] at Evergine.AndroidView.AndroidSurfaceView.b340(Object )
[mono-rt] at Android.App.SyncContext.<>c__DisplayClass3_0.b0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 52
[mono-rt] at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
[mono-rt] at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Java.Lang.IRunnable.cs:line 84
[mono-rt] at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 26
I'm uploading images of particle system configuration as well.
The particle system shows up fine on windows machine.
So is it that particle system is not supported in android platform? Are there any workarounds to get through this issue? Please let me know as currently i'm not able to proceed with particle system on android.
Hi,
I have been developing an evergine maui app with some 3d objects which was working fine on windows and android platform. Infact, it was a very smooth and quick development experience using & learning evergine.
But recently i added the default particle system asset to a particle compoent of an entity in scene, and it's throwing System.NullReferenceException error before the main screen is loaded at EvergineViewHandler.Android.cs line 53, while running it on Android physical device.
System.NullReferenceException Message=Object reference not set to an instance of an object.
Stack Trace output:
[monodroid-assembly] Shared library 'liblog' not loaded, p/invoke '__android_log_print' may fail [DOTNET] Create random texture [ergineMauiFirs] Explicit concurrent copying GC freed 191(36KB) AllocSpace objects, 4(528KB) LOS objects, 49% free, 2842KB/5684KB, paused 38us total 15.301ms [ergineMauiFirs] Explicit concurrent copying GC freed 64(34KB) AllocSpace objects, 1(132KB) LOS objects, 49% free, 2839KB/5679KB, paused 45us total 15.683ms [0:] Error: 0 : [0:] Precompiled shader: 5d0ed39b-6526-4c39-8de0-d00d78ba5de0 with pass: Default and directives: [DIFF-SBUFFER] not found. System.NullReferenceException: 'Object reference not set to an instance of an object.'
Thread started: #9
System.NullReferenceException: 'Object reference not set to an instance of an object.'
The thread 9 has exited with code 0 (0x0). Thread finished: #9
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
[mono-rt] at Evergine.Framework.Graphics.RenderObjectResourcesCache.GetMaterialSetters(RenderObjectInfo renderMesh, DrawContext drawContext, RenderPass[] passes, MaterialResourcesPerPass[]& passResources, MaterialResourceSetters& materialSetters)
[mono-rt] at Evergine.Framework.Graphics.MaterialResourcesCacheEntry.Collect()
[mono-rt] at Evergine.Framework.Graphics.RenderMeshInfo.Collect(DrawContext drawContext)
[mono-rt] at Evergine.Framework.Graphics.RenderBatch.CollectTemplate(DrawContext drawContext)
[mono-rt] at Evergine.Framework.Graphics.DrawContext.CollectBatches()
[mono-rt] at Evergine.Framework.Graphics.ForwardDrawContext.CollectBatches()
[mono-rt] at Evergine.Framework.Graphics.DrawContext.Collect()
[mono-rt] at Evergine.Framework.Graphics.CameraDrawContext.Render(CommandBuffer commandBuffer)
[mono-rt] at Evergine.Framework.Graphics.DefaultRenderPipeline.RenderSingleCamera(CameraDrawContext cameraContext)
[mono-rt] at Evergine.Framework.Graphics.DefaultRenderPipeline.Render(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Managers.RenderManager.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Managers.SceneManagers.DrawSceneManagers(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Scene.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Scene.BaseDraw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.ScreenContext.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.SingleTransition.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Services.ScreenContextManager.Draw(TimeSpan gameTime)
[mono-rt] at Evergine.Framework.Application.DrawFrame(TimeSpan gameTime)
[mono-rt] at EvergineMauiFirst.MAUI.Evergine.EvergineViewHandler.<>cDisplayClass7_0.b1() in C:\Users\Vpand\source\repos\EvergineMauiFirst\EvergineMauiFirst.MAUI\Platforms\Android\EvergineViewHandler.Android.cs:line 53
[mono-rt] at Evergine.AndroidView.AndroidSurfaceView.b 340(Object )
[mono-rt] at Android.App.SyncContext.<>c__DisplayClass3_0.b 0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 52
[mono-rt] at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
[mono-rt] at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Java.Lang.IRunnable.cs:line 84
[mono-rt] at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 26
I'm uploading images of particle system configuration as well.
The particle system shows up fine on windows machine.
So is it that particle system is not supported in android platform? Are there any workarounds to get through this issue? Please let me know as currently i'm not able to proceed with particle system on android.
Thanks, Vandita