stride3d / stride3d/stride

[Build] Android build fails when trying to create default database

Open
#657 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Release Type: Official Release/GitHub
Github

Version:
master

Platform(s):
Android

Describe the bug
The building process throw the exception below when trying to create the default database for an android project.

04-20 18:15:15.033 E/mono (14748): Unhandled Exception:
04-20 18:15:15.033 E/mono (14748): System.TypeInitializationException: The type initializer for 'Stride.Core.IO.VirtualFileSystem' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Stride.Core.PlatformFolders' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
04-20 18:15:15.033 E/mono (14748): Parameter name: path1
04-20 18:15:15.033 E/mono (14748): at System.IO.Path.Combine (System.String path1, System.String path2) [0x00003] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/mcs/class/corlib/System.IO/Path.cs:102
04-20 18:15:15.033 E/mono (14748): at Stride.Core.PlatformFolders.FindCoreAssemblyDirectory (System.String entryDirectory) [0x00001] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.033 E/mono (14748): at Stride.Core.PlatformFolders.GetApplicationBinaryDirectory () [0x00006] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.033 E/mono (14748): at Stride.Core.PlatformFolders..cctor () [0x0003c] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.033 E/mono (14748): --- End of inner exception stack trace ---
04-20 18:15:15.033 E/mono (14748): --- End of inner exception stack trace ---
04-20 18:15:15.033 E/mono (14748): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)
04-20 18:15:15.033 E/mono (14748): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)
04-20 18:15:15.034 E/mono-rt (14748): [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Stride.Core.IO.VirtualFileSystem' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Stride.Core.PlatformFolders' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
04-20 18:15:15.034 E/mono-rt (14748): Parameter name: path1
04-20 18:15:15.034 E/mono-rt (14748): at System.IO.Path.Combine (System.String path1, System.String path2) [0x00003] in /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/mcs/class/corlib/System.IO/Path.cs:102
04-20 18:15:15.034 E/mono-rt (14748): at Stride.Core.PlatformFolders.FindCoreAssemblyDirectory (System.String entryDirectory) [0x00001] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.034 E/mono-rt (14748): at Stride.Core.PlatformFolders.GetApplicationBinaryDirectory () [0x00006] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.034 E/mono-rt (14748): at Stride.Core.PlatformFolders..cctor () [0x0003c] in <5ae25e3d606045f98461776333eca5c8>:0
04-20 18:15:15.034 E/mono-rt (14748): --- End of inner exception stack trace ---
04-20 18:15:15.034 E/mono-rt (14748): --- End of inner exception stack trace ---
04-20 18:15:15.034 E/mono-rt (14748): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)
04-20 18:15:15.034 E/mono-rt (14748): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project with Android added
  2. Build the project through Visual Studio with any Android device or emulator

It might be necessary to build the engine for Android in case you haven't done yet.

Expected behavior
The build for Android should run without any issue

Screenshots
image

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 failure by creating a project with Android support and building it through Visual Studio on a device or emulator. Inspect Stride.Core.PlatformFolders, especially FindCoreAssemblyDirectory and GetApplicationBinaryDirectory, along with the VirtualFileSystem initializer, to trace the null path. Done means the default database is created and the Android build runs without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.