The last few days I dealt with a bug which prevented me from starting virtual players in MPPM. I had to manually add a dependency to the Packages/manifest.json to overcome this issue. However, I ran into a new error which prevents MPPM from working. The virtual player now starts, but gives me this error preventing any multiplayer tests from working:
“Asset Database is set to Read Only, but it has found out-of-date assets. This should not happen!”
I had this error today as well. In Unity 6000.0.0b12 with MPPM 1.0.0 (no “pre”).
This happened after importing my template asset into a new project. Then activating all three virtual players all at once. I’m guessing that choked the system, and I may have modified the scene. I don’t normally do this after having issues before but wanted to give that a try again.
My best bet is to simultaneously enable three virtual players in a fresh project / cleaned Library. Then simultaneously - since that takes a while and one wants to stay busy - edit the open scene or a prefab (try saving them too) while the players are still activating.
I have a feeling this is a bad idea but the system doesn’t prevent one from modifying assets while players are activating.
I’m using Unity 2023.2.15f1 and MPPM 0.6.0. The package I had to add a dependency for was A* Pathfinding Project. It is the only package I use that is directly located in the Packages folder.
Even with Stack Trace Logging set to full for everything, I don’t get more information regarding this new error. At least the VP compiles and I can actually start the play mode. However, the error comes first and after that I get a bunch of warnings regarding missing scripts on game objects. Needless to say, that it is unplayable.
Thanks for the details. If it’s possible for your project, I’d suggest trying to update to a newer version of Unity. Ideally the latest Unity 6 preview, but if not possible then the latest you can. I’d also suggest updating MPPM to its 1.0.0 version at the same time. The error you’re seeing is coming from the asset database, and there were a few fixes made to that code since 2023.2. Although evidently we still appear to have bugs to address in that area as shown by @CodeSmile above.
Just updated to Unity 6 and MPPM 1.0. I also deleted the Library folder once again.
When I try to activate a virtual player in MPPM the new player window does not even open. But after some time I see that the VP encountered 4 errors, which I can not see in detail and in my console I get this one:
I actually tried to repro this error yesterday having seen it only once or twice by activating multiple players while also editing scenes and prefabs at the same time. Was unable to provoke this issue, but could send a report for other errors I’m getting (particularly: Editor scene load cannot be used in playmode when exiting playmode).
@wabugi That’s a new one for me. Looks like the clone is not acknowledging messages being sent to it. Perhaps because it has crashed, which would be worrying. If you’re in a position to share your project (or ideally if you’re able to reproduce this on a fresh empty project), could you file a bug report through the editor?
@CodeSmile Yes please file bug reports for other issues that you’re able to reproduce.
Hello @simon-lemay-unity , I’m also getting a “Timeout reached” warning that blocks the instance windows since the MPPM 1.0 release.
I’ve sent a bug report, but the test-team can’t reproduce the bug. There is my entire project + logs if someone of the Unity MPPM team wants to understand the bug.
How to reproduce?
It seems the bug happens on Windows (it tried on my Mac, no problem)
On Unity 6 (6000.0.0b13) but also on the Unity 2023.2.16f1
On Windows 10 (10.0.19045) 64bit (for sure because it is my version)
On the MPPM 1.0 release (I did not have the bug on the preview)
When I want to activate a new instance from the MPPM window, it turned activated, but the window instance doesn’t display. I have this error in my main editor log :
And on the VP Editor.log, I have this weird entry :
UnityException: SJSON Parse Error (memory) at line 8: Error consuming: =
size = 0,5
at (wrapper managed-to-native) UnityEditor.SJSON.Decode_Injected(UnityEngine.Bindings.ManagedSpanWrapper&)
at UnityEditor.SJSON.Decode (System.Byte[] sjson) [0x00030] in <d6c5d70a43ff42ab8825e02a2b63daf0>:0
at UnityEditor.SJSON.LoadString (System.String json) [0x00023] in <d6c5d70a43ff42ab8825e02a2b63daf0>:0
Rethrow as UnityException: SJSON Parse Error (string) at line 8: Error consuming: =
size = 0,5
at UnityEditor.SJSON.LoadString (System.String json) [0x00048] in <d6c5d70a43ff42ab8825e02a2b63daf0>:0
at UnityEditor.WindowLayout.ShowWindowWithDynamicLayout (System.String windowId, System.String layoutDataPath) [0x00046] in <d6c5d70a43ff42ab8825e02a2b63daf0>:0
at Unity.Multiplayer.Playmode.InternalBridge.Editor.WindowLayout.ShowWindowWithDynamicLayout (System.String windowId, System.String layoutFile) [0x00001] in .\Library\PackageCache\com.unity.multiplayer.playmode\InternalBridge\WindowLayout.cs:10
at Unity.Multiplayer.Playmode.Workflow.Editor.ModeSwitcher.SwitchToView (Unity.Multiplayer.Playmode.Workflow.Editor.LayoutFlags layoutFlags) [0x00083] in .\Library\PackageCache\com.unity.multiplayer.playmode\Workflow\Editor\EditorModes\ModeSwitcher.cs:112
at Unity.Multiplayer.Playmode.Workflow.Editor.StandardCloneWorkflow+<>c__DisplayClass4_0.<Initialize>b__4 () [0x00041] in .\Library\PackageCache\com.unity.multiplayer.playmode\Workflow\Editor\Workflow\StandardCloneWorkflow.cs:115
at Unity.Multiplayer.Playmode.Workflow.Editor.ClonedPlayerApplicationEvents.InvokeOpenPlayerWindow () [0x00001] in .\Library\PackageCache\com.unity.multiplayer.playmode\Workflow\Editor\EditorSystems\Events\ClonedPlayerApplicationEvents.cs:23
at Unity.Multiplayer.Playmode.Workflow.Editor.ClonedPlayerSystems+<>c__DisplayClass10_0.<Listen>b__8 (Unity.Multiplayer.Playmode.Workflow.Editor.OpenPlayerWindowMessage _) [0x00000] in .\Library\PackageCache\com.unity.multiplayer.playmode\Workflow\Editor\EditorSystems\ClonedPlayerSystems.cs:65
at Unity.Multiplayer.Playmode.VirtualProjects.Editor.MessagingService+<>c__DisplayClass21_0`1[TMessage].<Receive>g__Wrapper|0 (System.Object o) [0x00000] in .\Library\PackageCache\com.unity.multiplayer.playmode\VirtualProjects\Editor\Messaging\MessagingService.cs:207
at Unity.Multiplayer.Playmode.VirtualProjects.Editor.MessagingService.HandleIncomingData (System.Byte[] bytes) [0x00209] in .\Library\PackageCache\com.unity.multiplayer.playmode\VirtualProjects\Editor\Messaging\MessagingService.cs:299
UnityEngine.DebugLogHandler:Internal_LogException_Injected(Exception, IntPtr)
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Unity.Multiplayer.Playmode.VirtualProjects.Editor.MessagingService:HandleIncomingData(Byte[]) (at .\Library\PackageCache\com.unity.multiplayer.playmode\VirtualProjects\Editor\Messaging\MessagingService.cs:306)
UnityEditor.MPE.ChannelClient:IncomingChannelClientData(Int32, Byte[])
(Filename: ./Library/PackageCache/com.unity.multiplayer.playmode/VirtualProjects/Editor/Messaging/MessagingService.cs Line: 306)
So far I have not encountered a timeout. You may want to try deleting the virtual players’ cached data by deleting Library/VP/(every folder) but leave the .json file in the VP folder because that contains your players’ tags and roles.
already done that, nothing changed. I also tried to completely delete the Library folder. And I tried to remove the packages caches from my AppData. Nothing worked on ANY of my projects using MPPM.
@DarkRewar Thanks for posting that SJSON-related error! That’s actually quite telling of what’s going on, although I don’t have an explanation for it, and unfortunately no workaround either.
Basically it appears the layout files on your system are written with decimal values using a comma instead of a period. Assuming you’re not using a custom version of the package, could you look into the Library/PackageCache/com.unity.multiplayer.playmode@1.0.0/Workflow/Layouts folder and see if any of the SJSON files there contain the string “size = 0,5”?
Also a bit of a shot in the dark, but is your Windows system set in some particular locale (e.g. French or German)? I’m wondering if perhaps there’s something somewhere that parses decimal values differently based on the locale.
@simon-lemay-unity I opened every SJON Layouts, in every of them, the size is “0.5” (and not “0,5”). Reading the log I previously sent, the bug happened when it tries to WRITE the “Library/UserSettings/Layouts\layout_0010.wlt” file. So, I updated the layout_0010.sjson file to set the size to 1 like that:
It didn’t work, I think it does not update the package properly if I modify it myself. But the real problem is that my Windows is set to French. And maybe, when it tries to write the file, it converts 0.5 to 0,5 (like readable French float number).
EDIT: I changed my regional format to English and it worked so it seems the bug only happens on regional format that uses “,” as decimal (like French). Pls, fix this
If you’d like to try the fix locally, you can change file Workflow/Editor/EditorModes/Convert.cs and replace @$"size = {size}" with string.Format(CultureInfo.InvariantCulture, "size = {0}", size) (at line 11). You’ll probably need to include the System.Globalization namespace too. That should allow the layout files to be generated with the correct format.
Sadly, this does not fix my “out-of-date assets” issue. I don’t feel comfy giving away my project. I will see if I can reproduce the error. This could take a bit since time is short right now.