Texture '' is degenerate (dimensions 0x0)

Discussion and help for Easy Save 3
Post Reply
Moonman
Posts: 6
Joined: Fri Jan 07, 2022 10:49 am

Texture '' is degenerate (dimensions 0x0)

Post by Moonman »

I did some stuff trying to make the system save animator, so after some step is stopped to load all the buildings in game dropping a couple of errors for each "broken" instance. It happines at loading an array of GameObjesct with sprites.
I don't save any custom textures, it happines with basic Sprite/SpiteRendere. Tried to reset them, but issue remains.
I've found this happines only when I save to file, and saving works fine while aving in cache.

Code: Select all

Texture '' is degenerate (dimensions 0x0)
0x00007ff6dcddec7d (Unity) StackWalker::GetCurrentCallstack
0x00007ff6dcde59d9 (Unity) StackWalker::ShowCallstack
0x00007ff6ddd300f3 (Unity) GetStacktrace
0x00007ff6de3b2b0d (Unity) DebugStringToFile
0x00007ff6dcb45aa7 (Unity) LogRepeatingStringWithFlags
0x00007ff6dc8ac5c9 (Unity) Texture2D::CheckHasPixelData
0x00007ff6dc8b11ae (Unity) Texture2D::GetPixels32
0x00007ff6dc8632c2 (Unity) GenerateSpriteOutline
0x00007ff6dc800e8c (Unity) Sprite::GenerateOutline
0x00007ff6dc7d688f (Unity) Polygon2D::GenerateFrom
0x00007ff6dd3cf7be (Unity) PolygonCollider2D::SmartReset
0x00007ff6dc9b600f (Unity) InitializeComponentCreatedFromCode
0x00007ff6dc9afecc (Unity) AddComponentUnchecked
0x00007ff6dc9afa84 (Unity) AddComponent
0x00007ff6dcc1927a (Unity) MonoAddComponentWithType
0x00007ff6dbebb52a (Unity) GameObject_CUSTOM_Internal_AddComponentWithType
0x000001d15d328b6c (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:Internal_AddComponentWithType (UnityEngine.GameObject,System.Type)
0x000001d15d328a83 (Mono JIT Code) UnityEngine.GameObject:AddComponent (System.Type)
0x000001d18e160f93 (Mono JIT Code) [ES3ComponentType.cs:109] ES3Types.ES3ComponentType:GetOrAddComponent (UnityEngine.GameObject,System.Type) 
0x000001d18e15dd73 (Mono JIT Code) [ES3ComponentType.cs:77] ES3Types.ES3ComponentType:ReadObject<T_REF> (ES3Reader) 
0x000001d18e153b1d (Mono JIT Code) [ES3ObjectType.cs:54] ES3Types.ES3ObjectType:Read<T_REF> (ES3Reader) 
0x000001d18e15cae1 (Mono JIT Code) [ES3Type_GameObject.cs:217] ES3Types.ES3Type_GameObject:ReadComponents (ES3Reader,UnityEngine.GameObject) 
0x000001d18e159eb3 (Mono JIT Code) [ES3Type_GameObject.cs:163] ES3Types.ES3Type_GameObject:ReadObject<T_REF> (ES3Reader,object) 
0x000001d18e159990 (Mono JIT Code) [ES3ObjectType.cs:62] ES3Types.ES3ObjectType:ReadInto<T_REF> (ES3Reader,object) 
0x000001d18e154015 (Mono JIT Code) [ES3Type_GameObject.cs:127] ES3Types.ES3Type_GameObject:ReadObject<T_REF> (ES3Reader) 
0x000001d18e153b1d (Mono JIT Code) [ES3ObjectType.cs:54] ES3Types.ES3ObjectType:Read<T_REF> (ES3Reader) 
0x000001d18e153972 (Mono JIT Code) [ES3Reader.cs:249] ES3Reader:ReadObject<T_REF> (ES3Types.ES3Type) 
0x000001d18e15348d (Mono JIT Code) [ES3Reader.cs:278] ES3Reader:Read<T_REF> (ES3Types.ES3Type) 
0x000001d18e153772 (Mono JIT Code) [ES3CollectionType.cs:52] ES3Types.ES3CollectionType:ReadICollection<T_REF> (ES3Reader,System.Collections.Generic.ICollection`1<T_REF>,ES3Types.ES3Type) 
0x000001d18e15358d (Mono JIT Code) [ES3ArrayType.cs:36] ES3Types.ES3ArrayType:Read (ES3Reader) 
0x000001d18e15339c (Mono JIT Code) [ES3Reader.cs:274] ES3Reader:Read<T_REF> (ES3Types.ES3Type) 
0x000001d18e152f0b (Mono JIT Code) [ES3Reader.cs:215] ES3Reader:Read<T_REF> (string,T_REF) 
0x000001d18e152d94 (Mono JIT Code) [ES3.cs:443] ES3:Load<T_REF> (string,T_REF,ES3Settings) 
0x000001d18e152c03 (Mono JIT Code) [ES3.cs:405] ES3:Load<T_REF> (string,T_REF) 
0x000001d18e151c53 (Mono JIT Code) [Map.cs:96] Map/<Start>d__13:MoveNext () 
0x000001d18e022b50 (Mono JIT Code) UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
0x000001d18e022c7f (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
0x00007ffe0f90e034 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 
0x00007ffe0f84e724 (mono-2.0-bdwgc) [object.c:3064] do_runtime_invoke 
0x00007ffe0f84e8bc (mono-2.0-bdwgc) [object.c:3111] mono_runtime_invoke 
0x00007ff6dcd04474 (Unity) scripting_method_invoke
0x00007ff6dccff094 (Unity) ScriptingInvocation::Invoke
0x00007ff6dccb09cf (Unity) Coroutine::Run
0x00007ff6dccdb6e5 (Unity) MonoBehaviour::TryCreateAndRunCoroutine
0x00007ff6dccd1223 (Unity) MonoBehaviour::HandleCoroutineReturnValue
0x00007ff6dccd3471 (Unity) MonoBehaviour::InvokeMethodOrCoroutineChecked
0x00007ff6dcccda72 (Unity) MonoBehaviour::DelayedStartCall
0x00007ff6dc7d5044 (Unity) DelayedCallManager::Update
0x00007ff6dc9e24b9 (Unity) `InitPlayerLoopCallbacks'::`2'::EarlyUpdateScriptRunDelayedStartupFrameRegistrator::Forward
0x00007ff6dc9ca1dc (Unity) ExecutePlayerLoop
0x00007ff6dc9ca2b3 (Unity) ExecutePlayerLoop
0x00007ff6dc9cfec9 (Unity) PlayerLoop
0x00007ff6dd8fc968 (Unity) PlayerLoopController::UpdateScene
0x00007ff6dd8e87f4 (Unity) PlayerLoopController::EnterPlayMode
0x00007ff6dd8f7aba (Unity) PlayerLoopController::SetIsPlaying
0x00007ff6dd8f9e42 (Unity) Application::TickTimer
0x00007ff6ddd362ba (Unity) MainMessageLoop
0x00007ff6ddd3aadb (Unity) WinMain
0x00007ff6df04aaa2 (Unity) __scrt_common_main_seh
0x00007ffe66e77034 (KERNEL32) BaseThreadInitThunk
0x00007ffe67022651 (ntdll) RtlUserThreadStart

Code: Select all

Sprite outline generation failed - could not read texture pixel data. Did you forget to make the texture readable?
0x00007ff6dcddec7d (Unity) StackWalker::GetCurrentCallstack
0x00007ff6dcde59d9 (Unity) StackWalker::ShowCallstack
0x00007ff6ddd300f3 (Unity) GetStacktrace
0x00007ff6de3b2b0d (Unity) DebugStringToFile
0x00007ff6dc863316 (Unity) GenerateSpriteOutline
0x00007ff6dc800e8c (Unity) Sprite::GenerateOutline
0x00007ff6dc7d688f (Unity) Polygon2D::GenerateFrom
0x00007ff6dd3cf7be (Unity) PolygonCollider2D::SmartReset
0x00007ff6dc9b600f (Unity) InitializeComponentCreatedFromCode
0x00007ff6dc9afecc (Unity) AddComponentUnchecked
0x00007ff6dc9afa84 (Unity) AddComponent
0x00007ff6dcc1927a (Unity) MonoAddComponentWithType
0x00007ff6dbebb52a (Unity) GameObject_CUSTOM_Internal_AddComponentWithType
0x000001d15d328b6c (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:Internal_AddComponentWithType (UnityEngine.GameObject,System.Type)
0x000001d15d328a83 (Mono JIT Code) UnityEngine.GameObject:AddComponent (System.Type)
0x000001d18e160f93 (Mono JIT Code) [ES3ComponentType.cs:109] ES3Types.ES3ComponentType:GetOrAddComponent (UnityEngine.GameObject,System.Type) 
0x000001d18e15dd73 (Mono JIT Code) [ES3ComponentType.cs:77] ES3Types.ES3ComponentType:ReadObject<T_REF> (ES3Reader) 
0x000001d18e153b1d (Mono JIT Code) [ES3ObjectType.cs:54] ES3Types.ES3ObjectType:Read<T_REF> (ES3Reader) 
0x000001d18e15cae1 (Mono JIT Code) [ES3Type_GameObject.cs:217] ES3Types.ES3Type_GameObject:ReadComponents (ES3Reader,UnityEngine.GameObject) 
0x000001d18e159eb3 (Mono JIT Code) [ES3Type_GameObject.cs:163] ES3Types.ES3Type_GameObject:ReadObject<T_REF> (ES3Reader,object) 
0x000001d18e159990 (Mono JIT Code) [ES3ObjectType.cs:62] ES3Types.ES3ObjectType:ReadInto<T_REF> (ES3Reader,object) 
0x000001d18e154015 (Mono JIT Code) [ES3Type_GameObject.cs:127] ES3Types.ES3Type_GameObject:ReadObject<T_REF> (ES3Reader) 
0x000001d18e153b1d (Mono JIT Code) [ES3ObjectType.cs:54] ES3Types.ES3ObjectType:Read<T_REF> (ES3Reader) 
0x000001d18e153972 (Mono JIT Code) [ES3Reader.cs:249] ES3Reader:ReadObject<T_REF> (ES3Types.ES3Type) 
0x000001d18e15348d (Mono JIT Code) [ES3Reader.cs:278] ES3Reader:Read<T_REF> (ES3Types.ES3Type) 
0x000001d18e153772 (Mono JIT Code) [ES3CollectionType.cs:52] ES3Types.ES3CollectionType:ReadICollection<T_REF> (ES3Reader,System.Collections.Generic.ICollection`1<T_REF>,ES3Types.ES3Type) 
0x000001d18e15358d (Mono JIT Code) [ES3ArrayType.cs:36] ES3Types.ES3ArrayType:Read (ES3Reader) 
0x000001d18e15339c (Mono JIT Code) [ES3Reader.cs:274] ES3Reader:Read<T_REF> (ES3Types.ES3Type) 
0x000001d18e152f0b (Mono JIT Code) [ES3Reader.cs:215] ES3Reader:Read<T_REF> (string,T_REF) 
0x000001d18e152d94 (Mono JIT Code) [ES3.cs:443] ES3:Load<T_REF> (string,T_REF,ES3Settings) 
0x000001d18e152c03 (Mono JIT Code) [ES3.cs:405] ES3:Load<T_REF> (string,T_REF) 
0x000001d18e151c53 (Mono JIT Code) [Map.cs:96] Map/<Start>d__13:MoveNext () 
0x000001d18e022b50 (Mono JIT Code) UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
0x000001d18e022c7f (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
0x00007ffe0f90e034 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 
0x00007ffe0f84e724 (mono-2.0-bdwgc) [object.c:3064] do_runtime_invoke 
0x00007ffe0f84e8bc (mono-2.0-bdwgc) [object.c:3111] mono_runtime_invoke 
0x00007ff6dcd04474 (Unity) scripting_method_invoke
0x00007ff6dccff094 (Unity) ScriptingInvocation::Invoke
0x00007ff6dccb09cf (Unity) Coroutine::Run
0x00007ff6dccdb6e5 (Unity) MonoBehaviour::TryCreateAndRunCoroutine
0x00007ff6dccd1223 (Unity) MonoBehaviour::HandleCoroutineReturnValue
0x00007ff6dccd3471 (Unity) MonoBehaviour::InvokeMethodOrCoroutineChecked
0x00007ff6dcccda72 (Unity) MonoBehaviour::DelayedStartCall
0x00007ff6dc7d5044 (Unity) DelayedCallManager::Update
0x00007ff6dc9e24b9 (Unity) `InitPlayerLoopCallbacks'::`2'::EarlyUpdateScriptRunDelayedStartupFrameRegistrator::Forward
0x00007ff6dc9ca1dc (Unity) ExecutePlayerLoop
0x00007ff6dc9ca2b3 (Unity) ExecutePlayerLoop
0x00007ff6dc9cfec9 (Unity) PlayerLoop
0x00007ff6dd8fc968 (Unity) PlayerLoopController::UpdateScene
0x00007ff6dd8e87f4 (Unity) PlayerLoopController::EnterPlayMode
0x00007ff6dd8f7aba (Unity) PlayerLoopController::SetIsPlaying
0x00007ff6dd8f9e42 (Unity) Application::TickTimer
0x00007ff6ddd362ba (Unity) MainMessageLoop
0x00007ff6ddd3aadb (Unity) WinMain
0x00007ff6df04aaa2 (Unity) __scrt_common_main_seh
0x00007ffe66e77034 (KERNEL32) BaseThreadInitThunk
0x00007ffe67022651 (ntdll) RtlUserThreadStart
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Texture '' is degenerate (dimensions 0x0)

Post by Joel »

Hi there,

Please could you create a script which I can drop into a new scene in a new project containing only Easy Save which replicates the issue?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Moonman
Posts: 6
Joined: Fri Jan 07, 2022 10:49 am

Re: Texture '' is degenerate (dimensions 0x0)

Post by Moonman »

Not sure. It causes Sprite "default" constructor

Code: Select all

protected override object ReadObject<T>(ES3Reader reader)
		{
			var instance = Sprite.Create(new Texture2D(0,0), new Rect(), Vector2.zero);
			ReadObject<T>(reader, instance);
			return instance;
		}
I suppose, after running this code system just doen't load sprites instead of this default stuff what causes errors. (With reading from file mode)
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Texture '' is degenerate (dimensions 0x0)

Post by Joel »

Hi there,

Sorry, I don't think I was clear in my previous message. Please could you create a new script which replicates your issue which I can drop into a new project so that I can see the error for myself.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply