stride3d / stride3d/stride

Android Application Crash at startup

Open
#1,597 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release
Version: 4.1.0.1734
Platform(s): Android
Describe the bug
Non-deterministic System.ArgumentNullException and crash at application start.

To Reproduce
Steps to reproduce the behavior:

  1. Install GameMenu or FirstPersonShooter sample application with Android support

Expected behavior
Application to run

Screenshots
GameMenu

Log and callstacks
[Stride] [Game]: Error: Unexpected exception. System.ArgumentNullException: Array cannot be null. (Parameter 'bytes') [Stride] at System.Text.Encoding.GetString(Byte* bytes, Int32 byteCount) [Stride] at Silk.NET.Core.Native.SilkMarshal.Utf8PtrToString(IntPtr ptr) [Stride] at Silk.NET.Core.Native.SilkMarshal.PtrToString(IntPtr input, NativeStringEncoding encoding) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader, UInt32 bufSize, UInt32& length, String& infoLog) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader, String& info) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader) [Stride] at Stride.Graphics.GraphicsDevice.TryCompileShader(ShaderType shaderType, String sourceCode) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 578 [Stride] at Stride.Graphics.GraphicsDevice.CreateCopyProgram(Boolean srgb, Int32& offsetLocation, Int32& scaleLocation) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 319 [Stride] at Stride.Graphics.GraphicsDevice.GetCopyProgram(Boolean srgb, Int32& offsetLocation, Int32& scaleLocation) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 234 [Stride] at Stride.Graphics.CommandList.CopyScaler2D(Texture sourceTexture, Texture destTexture, Rectangle sourceRectangle, Rectangle destRectangle, Boolean flipY) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\CommandList.OpenGL.cs:line 515 [Stride] at Stride.Graphics.SwapChainGraphicsPresenter.EndDraw(CommandList commandList, Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\SwapChainGraphicsPresenter.OpenGL.cs:line 58 [Stride] at Stride.Games.GameBase.EndDraw(Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 816 [Stride] at Stride.Engine.Game.EndDraw(Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Engine\Game.cs:line 445 [Stride] at Stride.Games.GameBase.RawTick(TimeSpan elapsedTimePerUpdate, Int32 updateCount, Single drawInterpolationFactor, Boolean drawFrame) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 670 [Stride] at Stride.Games.GameBase.RawTickProducer() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 586System.ArgumentNullException: Array cannot be null. (Parameter 'bytes') [Stride] at System.Text.Encoding.GetString(Byte* bytes, Int32 byteCount) [Stride] at Silk.NET.Core.Native.SilkMarshal.Utf8PtrToString(IntPtr ptr) [Stride] at Silk.NET.Core.Native.SilkMarshal.PtrToString(IntPtr input, NativeStringEncoding encoding) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader, UInt32 bufSize, UInt32& length, String& infoLog) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader, String& info) [Stride] at Silk.NET.OpenGLES.GL.GetShaderInfoLog(UInt32 shader) [Stride] at Stride.Graphics.GraphicsDevice.TryCompileShader(ShaderType shaderType, String sourceCode) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 578 [Stride] at Stride.Graphics.GraphicsDevice.CreateCopyProgram(Boolean srgb, Int32& offsetLocation, Int32& scaleLocation) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 319 [Stride] at Stride.Graphics.GraphicsDevice.GetCopyProgram(Boolean srgb, Int32& offsetLocation, Int32& scaleLocation) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\GraphicsDevice.OpenGL.cs:line 234 [Stride] at Stride.Graphics.CommandList.CopyScaler2D(Texture sourceTexture, Texture destTexture, Rectangle sourceRectangle, Rectangle destRectangle, Boolean flipY) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\CommandList.OpenGL.cs:line 515 [Stride] at Stride.Graphics.SwapChainGraphicsPresenter.EndDraw(CommandList commandList, Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Graphics\OpenGL\SwapChainGraphicsPresenter.OpenGL.cs:line 58 [Stride] at Stride.Games.GameBase.EndDraw(Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 816 [Stride] at Stride.Engine.Game.EndDraw(Boolean present) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Engine\Game.cs:line 445 [Stride] at Stride.Games.GameBase.RawTick(TimeSpan elapsedTimePerUpdate, Int32 updateCount, Single drawInterpolationFactor, Boolean drawFrame) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 670 [Stride] at Stride.Games.GameBase.RawTickProducer() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Games\GameBase.cs:line 586 **System.ArgumentNullException:** 'Array cannot be null. (Parameter 'bytes')'

Additional context
Sometimes runs, sometimes not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the startup crash with the GameMenu or FirstPersonShooter Android sample, then inspect Stride.Graphics/GraphicsDevice.OpenGL.cs around TryCompileShader line 578 and the CreateCopyProgram path. Trace the Silk.NET OpenGLES GetShaderInfoLog call shown in the stack trace. Done means the samples start reliably without this ArgumentNullException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
computer-graphics, game-dev, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.