Jump to content

Changing biome texture and re-spawning it causes CTD


7Dev.io
Go to solution Solved by Peter,

Recommended Posts

Obtained 32 stack frames
0x00007ff744fa5fcf (Unity) PersistentManager::WriteFile
0x00007ff745d6cf48 (Unity) WriteObjectsToDiskThreadSafe
0x00007ff74637aa6c (Unity) CreateSerializedAssetV2
0x00007ff746315055 (Unity) CreateSerializedAssetV2
0x00007ff746280d2e (Unity) AssetDatabase::CreateSerializedAsset
0x00007ff7447ad9d9 (Unity) AssetDatabaseBindings::CreateAsset
0x00007ff74457765d (Unity) AssetDatabase_CUSTOM_CreateAsset
0x000002b78ae2e2f5 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.AssetDatabase:CreateAsset (UnityEngine.Object,string)
0x000002b595ed8c13 (Mono JIT Code) Gaia.GaiaSplatPrototype:SaveTerrainLayerAsAsset (string,string,UnityEngine.TerrainLayer) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/Utils/GaiaSplatPrototype.cs:293)
0x000002b78ce5817b (Mono JIT Code) Gaia.GaiaResource:AddPrototypeToTerrain (Gaia.GaiaConstants/SpawnerResourceType,int,UnityEngine.Terrain,bool) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/ResourcesSystem/GaiaResource.cs:1464)
0x000002b78ce5770b (Mono JIT Code) Gaia.GaiaResource:AddPrototypeToTerrain (Gaia.GaiaConstants/SpawnerResourceType,int,UnityEngine.Terrain[],bool) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/ResourcesSystem/GaiaResource.cs:1394)
0x000002b78ce5765b (Mono JIT Code) Gaia.SpawnRule:AddResourceToTerrain (Gaia.Spawner,UnityEngine.Terrain[]) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/SpawningSystem/SpawnRule.cs:333)
0x000002b78ce574cb (Mono JIT Code) Gaia.GaiaMultiTerrainOperation:HandleMissingResources (Gaia.Spawner,Gaia.SpawnRule,UnityEngine.Terrain) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/GaiaMultiTerrainOperation.cs:2710)
0x000002b595f03fdb (Mono JIT Code) Gaia.Spawner:ExecuteSpawn (Gaia.GaiaMultiTerrainOperation,Gaia.BakedMaskCache,int,int&,bool) (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:2714)
0x000002b595efc823 (Mono JIT Code) Gaia.Spawner/<AreaSpawn>d__217:MoveNext () (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:2345)
0x000002b595ef6811 (Mono JIT Code) Gaia.Spawner:EditorUpdate () (at C:/Users/peter/Documents/Unity Projects/Nemo/Assets/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:1014)
0x000002b7da4bde40 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
0x000002b60002913d (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007ffbbf7d0394 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffbbf70eb44 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
0x00007ffbbf70ecdc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
0x00007ff744f11d74 (Unity) scripting_method_invoke
0x00007ff744ef2724 (Unity) ScriptingInvocation::Invoke
0x00007ff744eed385 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff74502a4eb (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions
0x00007ff745a14525 (Unity) SceneTracker::Update
0x00007ff745b39dc9 (Unity) Application::TickTimer
0x00007ff745fc18aa (Unity) MainMessageLoop
0x00007ff745fc6820 (Unity) WinMain
0x00007ff74738b72e (Unity) __scrt_common_main_seh
0x00007ffd0a2074b4 (KERNEL32) BaseThreadInitThunk
0x00007ffd0b5026a1 (ntdll) RtlUserThreadStart
Gaia Version: 3.3.3 PRO

Unity Info:
Unity Version: 2022.2.0f1
Company Name: DefaultCompany
Product Name: Nemo
Project Version: 0.1.0
Project Data Path: C:/Users/peter/Documents/Unity Projects/Nemo/Assets
Render Pipeline: URP

System Info:
Operating System: Windows 10  (10.0.19045) 64bit
Supports Compute Shaders: Yes
Supports GPU Instancing: Yes
Supports Ray Tracing: No
Supports Async Compute: No
Supports GPU Async Compute: Yes
Supports Texture Streaming: Yes

Graphics Info:
Graphics Card Vendor: NVIDIA
Graphics Card Name: NVIDIA GeForce RTX 3090
Graphics Card Version: Direct3D 11.0 [level 11.1]
Graphics Driver Version: Direct3D11
Graphics Card Memory: 24348 MB

Processor Info:
Processor Name: Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
Processor Core Count: 20
Processor Speed: 3696 GHz

Memory Info:
Memory (RAM): 65407 MB

 

Link to comment
Share on other sites

  • Solution

Hi @7Dev.io, I had a first look at that issue and I did not get a crash to desktop, but I did get the same stack trace as you have as error message in the console, with the new terrain layer not being added to the terrain. It looks like - similar to the crash you originally reported for the beta version of 2022.2 - that there were fundamental changes in the serialization code of the unity editor which disturb asset creation from code in parts of Gaia which were working without problems in earlier unity versions.
This might potentially be a bug in the new version 2022.2 as the behavior is very erratic - the crash you originally reported was caused by us creating a terrain data object during terrain creation (which is pretty much a requirement) but only when there was a call to Resources.UnloadUnusedAssets() before - this has never been a problem in any editor version before and this might not be intentional.

While we investigate this some more, you could do one of the following as a workaround:

 

  • Use an earlier unity version (you should not encounter this crash / issue there when adding a new texture spawn rule)
  • Add the terrain layer to the terrain manually, then pull it into the spawner with the "Add Resources from Terrain" feature here:
    image.png

    Tread with care as this will reset the mask setup for your spawn rules for the already existing spawn rules in the spawner.
  • Create the new spawn rule as usual, but then add a terrain layer with the same textures to the terrain manually from the terrain inspector. This should prevent the issue from occurring as Gaia will not try to add the terrain layer anymore if a layer with the same textures is already present
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...