ProwlEngine / Prowl

An Open Source C# 3D Game Engine under MIT license, inspired by Unity and featuring a complete editor and built on Silk.NET
MIT License
328 stars 27 forks source link

Editor failing to load, constantly throwing errors. #119

Closed KirillianAmu closed 2 months ago

KirillianAmu commented 3 months ago

Describe the bug The editor tries to load, but fails, spamming different errors based on the context, the second error with the rendering pipeline occasionally happens when launching any project.

First error happens during the launch of any project after it has been created.

Error: Error in EditorWindow: Invalid token "," found while reading a compound property at position 180
   at Prowl.Runtime.StringTagConverter.ReadCompoundTag(TextNbtMemoryParser parser) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 280
   at Prowl.Runtime.StringTagConverter.ReadTag(TextNbtMemoryParser parser) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 251
   at Prowl.Runtime.StringTagConverter.Read(String input) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 40
   at Prowl.Runtime.StringTagConverter.ReadFromFile(FileInfo file) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 28
   at Prowl.Runtime.Utils.ScriptableSingleton`1.LoadOrCreateInstance() in J:\Prowl\Prowl\Prowl.Runtime\Utils\ScriptableSingleton.cs:line 92
   at Prowl.Runtime.Utils.ScriptableSingleton`1.get_Instance() in J:\Prowl\Prowl\Prowl.Runtime\Utils\ScriptableSingleton.cs:line 41
   at Prowl.Editor.EditorWindows.ViewportWindow.DrawViewport() in J:\Prowl\Prowl\Prowl.Editor\Editor\ViewportWindow.cs:line 104
   at Prowl.Editor.EditorWindows.ViewportWindow.Draw() in J:\Prowl\Prowl\Prowl.Editor\Editor\ViewportWindow.cs:line 69
   at Prowl.Editor.EditorWindows.EditorWindow.DrawWindow() in J:\Prowl\Prowl\Prowl.Editor\Editor\EditorWindow.cs:line 89Error: Error in EditorWindow: Invalid token "," found while reading a compound property at position 180
   at Prowl.Runtime.StringTagConverter.ReadCompoundTag(TextNbtMemoryParser parser) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 280
   at Prowl.Runtime.StringTagConverter.ReadTag(TextNbtMemoryParser parser) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 251
   at Prowl.Runtime.StringTagConverter.Read(String input) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 40
   at Prowl.Runtime.StringTagConverter.ReadFromFile(FileInfo file) in J:\Prowl\Prowl\Prowl.Runtime\Serializer\Formats\StringTagConverter.cs:line 28
   at Prowl.Runtime.Utils.ScriptableSingleton`1.LoadOrCreateInstance() in J:\Prowl\Prowl\Prowl.Runtime\Utils\ScriptableSingleton.cs:line 92
   at Prowl.Runtime.Utils.ScriptableSingleton`1.get_Instance() in J:\Prowl\Prowl\Prowl.Runtime\Utils\ScriptableSingleton.cs:line 41
   at Prowl.Editor.EditorWindows.ViewportWindow.DrawViewport() in J:\Prowl\Prowl\Prowl.Editor\Editor\ViewportWindow.cs:line 104
   at Prowl.Editor.EditorWindows.ViewportWindow.Draw() in J:\Prowl\Prowl\Prowl.Editor\Editor\ViewportWindow.cs:line 69
   at Prowl.Editor.EditorWindows.EditorWindow.DrawWindow() in J:\Prowl\Prowl\Prowl.Editor\Editor\EditorWindow.cs:line 89Error: Camera on Main Camera has no RenderPipeline assigned, Falling back to default.

To Reproduce I suppose it may be related to the symbols on cyrillic versions of Windows, or maybe something else.

Steps to reproduce the behavior:

  1. Create a new project on a Windows 11 install with cyrillic language.
  2. Launch the Prowl.Editor instead of Prowl.Runtime
  3. Recieve the following Error.

Expected behavior Editor launched, allowing you to do stuff.

Screenshots I've attached a video here. https://github.com/michaelsakharov/Prowl/assets/66353937/37918e70-4d34-4c03-b89e-bfdf7c874e7d

Additional context Funny enough, first time it booted it launched just fine, but right after that once I started working with stuff, it decided to do this and haven't launched properly since then. Restart didn't work.

Specs: RTX 3070, Ryzen 9 3900xt, 64gb of ram, cyrillic version of Windows 11.

If you need any further information, let me know.

michaelsakharov commented 3 months ago

Strange, the Master branch should be working.

We're currently In the middle of completely rewriting the Editor with a new custom UI solution instead of ImGUI. So this might be fixed when that comes out. We're about halfway done.

image

KirillianAmu commented 3 months ago

Gotcha, eagerly awaiting until then, I'll try and report back once that's done. Thank you for your work on the engine!

HVukman commented 3 months ago

I have the same issue. English version of Win11.

michaelsakharov commented 2 months ago

A fix for this particular issue has been pushed to the new UI Branch, Should be merged into main soon.

KirillianAmu commented 2 months ago

Despite the update, it still tends to crash on start up. Though I believe it's a different issue now.

devenv_SVW7tBNmwX devenv_S563VmY52N

michaelsakharov commented 2 months ago

Could you do me a favor and inside that first picture inside the FindType method breakpoint the Type.GetType method to see what qualifiedTypeName Contains.

It appears whatever it's using to serialize type names is not being able to be converted back to a type.

KirillianAmu commented 2 months ago

Could you do me a favor and inside that first picture inside the FindType method breakpoint the Type.GetType method to see what qualifiedTypeName Contains.

It appears whatever it's using to serialize type names is not being able to be converted back to a type.

I scrolled up through the error log, it seems to cause a problem because it Couldn't find type: Prowl.Editor.Editor.Preferences.GeneralPreferences

The window seems to say the same. WindowsTerminal_ThrNi1gGgw devenv_fkkly5FjFf WindowsTerminal_TqFCO7dKsf

michaelsakharov commented 2 months ago

Huh Well that would explain the issue, there's only 1 "Editor" in the name of that class it should be: Prowl.Editor.Preferences.GeneralPreferences

I pushed a fix that should stop the stack overflow, see if it corrects itself now, since if loading of preferences fails it should fallback to default ones.

KirillianAmu commented 2 months ago

Huh Well that would explain the issue, there's only 1 "Editor" in the name of that class it should be: Prowl.Editor.Preferences.GeneralPreferences

I pushed a fix that should stop the stack overflow, see if it corrects itself now, since if loading of preferences fails it should fallback to default ones.

Yup, that fixed it. Loaded into the editor just fine Prowl Editor_zJv4BiIE6l

michaelsakharov commented 2 months ago

Awesome :D Let me know if you run into any other issues! Im sure there will be lots haha.