Need help debugging Unity once again - have new issues :X

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Need help debugging Unity once again - have new issues :X

Post by King of Worms »

Hi, so I updated to 2019.4.40f1

I dont even know how to describe this properly.

When I place dream inside the new unity folder, import all stuff and build a mod package, I get a crash.

Its something similar to http://forums.dfworkshop.net/viewtopic.php?p=58970 but the solution which worked before - does not. I cant even properly do that solution in this new version of HUB. Its same issue tho, it eats my memory ad infinity.

If I remove a major portion of DREAM from the "mods" folder, this issue will vanish and mod building will start to work.

Mind you, I need to remove like 50% of a DREAM mod....

So the question is, what can be causing it and how to deal with it. What changed since the last version, why now I need to remove half of my mod, for the ModBuilder to work? Why does it even matter, what files I have in "mods" when I want to build a mod which can consist of just one file?

I will trigger the bug, take the log and post it:
Editor.rar
(7.97 KiB) Downloaded 43 times

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Need help debugging Unity once again - have new issues :X

Post by King of Worms »

It usually halts at some Gausian downsample compute (which is Postprocessing stuff of Unity I guess)
Like here. (I reinstalled unity just to try it, latest master from Git, no linux/mac mono - same result)
Editor.rar
(8.68 KiB) Downloaded 41 times

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

Re: Need help debugging Unity once again - have new issues :X

Post by DunnyOfPenwick »

Pasting in the parts of the log that seem to show problems....

Code: Select all

---line 441
Project ID request failed, Reason: The requested URL returned error: 404 (404).
Unknown Unity Connect error (400). Please contact support at support@unity.com while processing request "https://core.hub-proxy.unity3d.com/api/projects/749f2e47-f08a-49c7-9fc9-76efc48f6add", HTTP error code 404
.<RI> Initialized touch support.
save path: C:/Users/Xerxes/Desktop/DFU Release/DFU MASTER 2023/Assets/Untracked/ModBuilder/DREAM - COMMONERS.dfmod.json
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
DaggerfallWorkshop.Game.Utility.ModSupport.CreateModEditorWindow:SaveModFile (bool) (at Assets/Game/Addons/ModSupport/Editor/CreateModEditorWindow.cs:450)

---line 482
'Assets/Untracked/ModBuilder/DREAM%20-%20COMMONERS.dfmod.json' does not exist
UnityEngine.StackTraceUtility:ExtractStackTrace ()
DaggerfallWorkshop.Game.Utility.ModSupport.ModManager:ImportAsset (string,UnityEditor.ImportAssetOptions) (at Assets/Game/Addons/ModSupport/ModManager.cs:988)

---line 631
Done importing asset: 'Packages/com.unity.postprocessing/PostProcessing/Shaders/Builtins/GaussianDownsample.compute' (target hash: 'dacd04c6389152acdc9f6396f6d0081d') in 0.004619 seconds
Assertion failed on expression: 'cancelButton'
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEditor.BuildPipeline:BuildAssetBundles (string,UnityEditor.AssetBundleBuild[],UnityEditor.BuildAssetBundleOptions,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget)
UnityEditor.BuildPipeline:BuildAssetBundles (string,UnityEditor.AssetBundleBuild[],UnityEditor.BuildAssetBundleOptions,UnityEditor.BuildTarget)
DaggerfallWorkshop.Game.Utility.ModSupport.CreateModEditorWindow:BuildMod () (at Assets/Game/Addons/ModSupport/Editor/CreateModEditorWindow.cs:670)
One problem appears to be a missing 'DREAM - COMMONERS.dfmod.json' file.
I don't know if that's THE problem though.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Need help debugging Unity once again - have new issues :X

Post by King of Worms »

Thank you, that missing json is not the main problem I believe.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Need help debugging Unity once again - have new issues :X

Post by Interkarma »

Hey KoW. :) Sorry to hear you're having some troubles with this again.

I still don't know the cause of your problem. It really does sound like Unity is having trouble building the large number of assets in DREAM.

The below gets me thinking:
King of Worms wrote: Fri Oct 14, 2022 3:36 pm Why does it even matter, what files I have in "mods" when I want to build a mod which can consist of just one file?
When triggering a build, the Unity editor has to compile project assets, work out dependencies, compile shader variants, and more. There's a lot going on under the hood and all assets will be considered, even if you're just trying to build a small .dfmod containing a single file. This is unfortunately just part of how Unity works - it considers the project a single "game", even though in your case it's several different mods inside the one project.

You've already smartly partitioned DREAM into different .dfmods. I wonder if we could use this as a starting point to at least workaround the build problem. I would try creating a new project for each component of DREAM and build each .dfmod individually from its own project. That way the Unity editor only has to process files in that specific mod and we might avoid whatever critical mass is sending Unity in a spin.

If nothing else, this could limit the problem to a single mod and we can start narrowing things down further.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Need help debugging Unity once again - have new issues :X

Post by King of Worms »

Thanks Interkarma,

this multi-project approach is what BadLuckBurt suggested and I think its somehow the only way now.
Its quite surprising, given the DREAM is basically the same for last 2 years, that it stopped working lately and that by quite a big margin. (Meaning I have to remove 50% of the mod)

I might try the multiple-projects process and maybe it will show some other things on the way.

Thanks for your time :)

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Need help debugging Unity once again - have new issues :X

Post by King of Worms »

Ok so I was able to make it work - I had to create 3 projects and shuffle the Dream packages around to be able to fit inside the new limitations :?

One of the project has for example just Mobs and Handheld. Otherwise it just crashes when building.

All I changed was update the master from I believe 0.13.4 to latest
And update unity to 2019.4.40f1 from prev build which was like 2019.4.20fl or smthng

These updates resulted in very substantial change of behavior. We talking 30% performance in this task compared to pre update - so something changed dramatically and I think its worth attention. If theres any chance to solve that is the question tho...

My HW is the same, I just changed GPU 1080ti for 3080 so that hardly contributes to that.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Need help debugging Unity once again - have new issues :X

Post by King of Worms »

..or not

Post Reply