Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Will Not Launch if PublishSingleFile is Enabled #2204

Open
MeharDT opened this issue Mar 31, 2024 · 3 comments
Open

Game Will Not Launch if PublishSingleFile is Enabled #2204

MeharDT opened this issue Mar 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MeharDT
Copy link
Contributor

MeharDT commented Mar 31, 2024

Release Type: Official Release

Version: 4.2.0.2122

Platform(s): Windows

Describe the bug
If true or "Produce single file" is enabled when creating a build, the resulting executable will fail to launch.

To Reproduce
Steps to reproduce the behavior:

  1. Start Stride 4.2.0.2122 and create a New Game project for Windows
  2. Once loaded, open Visual Studio and Publish the project to a local folder
  3. Ensure File publish options -> Produce single file is selected in Profile settings

Expected behavior
Game should launch when the executable is opened.

@MeharDT MeharDT added the bug Something isn't working label Mar 31, 2024
@Doprez
Copy link
Contributor

Doprez commented Mar 31, 2024

Can confirm this seems to have been an issue since 4.1, I have tried before.

@MeharDT
Copy link
Contributor Author

MeharDT commented Apr 9, 2024

Event Viewer log,

Application: MyGame.Windows.exe
CoreCLR Version: 8.0.324.11423
.NET Version: 8.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: 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. (Parameter 'path1')
   at System.ArgumentNullException.Throw(String paramName)
   at System.IO.Path.Combine(String path1, String path2)
   at Stride.Core.PlatformFolders.GetApplicationLocalDirectory() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\PlatformFolders.cs:line 109
   at Stride.Core.PlatformFolders..cctor() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\PlatformFolders.cs:line 31
   --- End of inner exception stack trace ---
   at Stride.Core.PlatformFolders.set_IsVirtualFileSystemInitialized(Boolean value) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\PlatformFolders.cs:line 90
   at Stride.Core.IO.VirtualFileSystem..cctor() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.IO\VirtualFileSystem.cs:line 85
   --- End of inner exception stack trace ---
   at Stride.Core.Storage.ObjectDatabase.CreateDefaultDatabase() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.Serialization\Storage\ObjectDatabase.cs:line 85
   at Stride.Engine.Game.InitializeAssetDatabase() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Engine\Game.cs:line 401
   at Stride.Engine.Game.PrepareContext() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Engine\Game.cs:line 258
   at Stride.Games.GameBase.Run(GameContext gameContext)

@Doprez
Copy link
Contributor

Doprez commented May 15, 2024

Just tested in Master and seems like this works mostly as expected.
image

Above is compared to the 82 files that get generated without singlefile.

I dont know what the expectation was but this is definitely a lot better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants