Long-standing Map Editor isssue

Maps & Map Editor
Aaron-Libra [github] · 7 months ago

Issue description

In all fairness, I assume that this is something that you probably already know about. It seems harmless enough but I'm just not a fan of leaving errors live comfortable and neglected lives. They all need to be squashed (or at least reported lol).

There really isn't anything that I can tell you about specifics because it has been happening now for as long as I can remember and it duplicates itself, so it's in the log twice. Same error, same instance, double reported. In all honesty, it looks like it's probably a Unity specific error that we might just have to live with. It happens no matter what and under no special circumstances. It doesn't crash the editor or anything sooo...

But yeah, anyway, it's this:

Serializing null of type 'Byte[]'.:
E 17:06:18,208 S000001 ~Mai
at Mafi.Serialization.BlobWriter.TryStartArraySerialization[T] (T[] arr) [0x00000]
at Mafi.Serialization.BlobWriter.WriteArray[T] (T[] arr) [0x00000]
at Mafi.Core.Terrain.Generation.EncodedImageAndMatrix.Serialize (Mafi.Core.Terrain.Generation.EncodedImageAndMatrix value, Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Core.Terrain.Generation.WorldRegionMapAdditionalData.SerializeData (Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Core.Terrain.Generation.WorldRegionMapAdditionalData+<>c.<.cctor>b__64_0 (System.Object obj, Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Serialization.BlobWriter.FinalizeSerialization () [0x00000]
at Mafi.Core.SaveGame.MapSerializer.StartSave (Mafi.Core.Terrain.Generation.IWorldRegionMap map, Mafi.Core.Terrain.Generation.IWorldRegionMapPreviewData previewData, Mafi.Core.Terrain.Generation.IWorldRegionMapAdditionalData additionalData, Mafi.Core.SaveGame.SaveCompressionType saveCompressionType) [0x00000]
at Mafi.Unity.MapEditor.MapEditor.trySaveMapAsWip (System.String mapFilePath, System.String& error) [0x00000]
at Mafi.Unity.MapEditor.MapEditor.saveMapAsWip () [0x00000]
at Mafi.Unity.MapEditor.MapEditor.Save () [0x00000]
at Mafi.Unity.UiToolkit.Library.Button.clicked () [0x00000]
at UnityEngine.UIElements.Clickable.Invoke (UnityEngine.UIElements.EventBase evt) [0x00000]
at UnityEngine.UIElements.Clickable.ProcessUpEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.Vector2 localPosition, System.Int32 pointerId) [0x00000]
at UnityEngine.UIElements.Clickable.OnPointerUp (UnityEngine.UIElements.PointerUpEvent evt) [0x00000]
at UnityEngine.UIElements.EventCallbackFunctor1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) [0x00000] at UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) [0x00000] at UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPathWithCompatibilityEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.EventBase compatibilityEvt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) [0x00000] at UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) [0x00000] at UnityEngine.UIElements.PointerEventBase1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00000]
at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00000]
at UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) [0x00000]
at UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) [0x00000]
at UnityEngine.UIElements.PanelEventHandler.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.EventSystems.BaseEventData sourceEventData) [0x00000]
at UnityEngine.UIElements.PanelEventHandler.OnPointerUp (UnityEngine.EventSystems.PointerEventData eventData) [0x00000]
at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerUpHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000]
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000]
at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000]
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000]
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000]
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000]
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000]
at UnityEngine.EventSystems.EventSystem.Update () [0x00000]

Then this is it's sister error:

Serializing null of type 'Byte[]'.:
E 17:03:51,669 S000001 ~Mai
at Mafi.Serialization.BlobWriter.TryStartArraySerialization[T] (T[] arr) [0x00000]
at Mafi.Serialization.BlobWriter.WriteArray[T] (T[] arr) [0x00000]
at Mafi.Core.Terrain.Generation.EncodedImageAndMatrix.Serialize (Mafi.Core.Terrain.Generation.EncodedImageAndMatrix value, Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Core.Terrain.Generation.WorldRegionMapAdditionalData.SerializeData (Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Core.Terrain.Generation.WorldRegionMapAdditionalData+<>c.<.cctor>b__64_0 (System.Object obj, Mafi.Serialization.BlobWriter writer) [0x00000]
at Mafi.Serialization.BlobWriter.FinalizeSerialization () [0x00000]
at Mafi.Core.SaveGame.MapSerializer.StartSave (Mafi.Core.Terrain.Generation.IWorldRegionMap map, Mafi.Core.Terrain.Generation.IWorldRegionMapPreviewData previewData, Mafi.Core.Terrain.Generation.IWorldRegionMapAdditionalData additionalData, Mafi.Core.SaveGame.SaveCompressionType saveCompressionType) [0x00000]
at Mafi.Unity.MapEditor.MapEditor.trySaveMapAsWip (System.String mapFilePath, System.String& error) [0x00000]
at Mafi.Unity.MapEditor.MapEditor.autoSaveMap () [0x00000]
at Mafi.Unity.MapEditor.MapEditor.pushNewUndoSnapshot (System.String name, System.Nullable`1[T] affectedArea) [0x00000]
at Mafi.Unity.MapEditor.MapEditor.selectedFeatureConfigChanged (System.Boolean isFinal) [0x00000]
at Mafi.Unity.UiToolkit.Library.ObjectEditor.ObjEditor.invokeOnValueChangedSafe (System.Boolean isFinal) [0x00000]
at Mafi.Unity.UiToolkit.Library.ObjectEditor.ObjEditor.onCustomEditChange (System.Boolean isFinal) [0x00000]
at Mafi.Unity.MapEditor.CustomEditors.Polygon3fEditor.postDragEnd (RTG.Gizmo gizmo, System.Int32 handleId) [0x00000]
at RTG.Gizmo.EndDragSession () [0x00000]
at RTG.Gizmo.OnInputDevicePickButtonUp () [0x00000]
at RTG.Gizmo.HandleInputDeviceEvents_SystemCall () [0x00000]
at RTG.RTGizmosEngine.Update_SystemCall () [0x00000]
at RTG.RTGApp.Update () [0x00000]

I'm mostly just sending this in because I don't want to publish the map when I finally get it done and potentially have it crash out when people try to play it, but thankfully, if I'm correct, I don't think it's harmful in that sense.

Reproduction steps

Most times when I load or save my map in the editor is when this happens, or after an autosave too. Never during any actions while editing, that I've noticed. My guess would be that it's just maybe that the editor still has some rough edges with polygon features (which is all of the features basically lol there's ALOT of polygons everywhere...for everything... haha...which is why it's such a funny and unhelpful error message for it to throw) and how it stores the preview images.

It might be occurring when it fails to generate/encode the image data for one of the terrain regions during the undo snapshot (wouldn't be any of the other asset types)...since another thing I've noticed is that sometimes undo either doesn't work or skips the most recent action and undoes something else instead. So now I just don't make mistakes that would require an undo, so that's a silver-lining.

Game version and build number

Update 4 | v0.8.0 (b548)

Operating system

Windows

Attachments

Sorry, I don't really want to give my map out in public but I'm sure you understand. I could email it if you really wanted to take a look if this seems unusual after all? Shoot me a msg to callaaron (-a-t-) proton (-d-o-t-) me, if so. (added those dashes cuz bots know the brackets avoidance trick these days)

16 Showing 1–1 of 1