I’m not sure whether to post this in the cloud build category or the 2d animation category, but this issue only happens when building via the unity cloud build, so I figured I’d post it here.
We’ve recently updated our project from 2019.2.0f1 to 2019.3.0f6.
When building locally for Windows x64, the build runs fine.
Cloud builds ran fine on 2019.2.0f1 and we’ve changed the version of the cloud build to 2019.3.0f6.
The package 2D PSD Importer is on version 2.1.0, which is the most recent one I can access.
The package 2D Animation is on 3.1.1, which is the most recent one I can access.
When building in the unity cloud for windows x64 however, the build halts during the importing of assets. Specifically, when trying to import the first psb. The same issue appears on WebGL builds.
Here’s the end of the log for the windows x64 builds:
[... other filetype import]
53690: [Unity] Start importing Assets/R&D/MyGreatFile - 2.psb using Guid(4e298106fdc087a478940604ceee7f93) Importer(-1,00000000000000000000000000000000)
53691: Build was canceled
53692: Killing process...
53693: Using /BUILD_PATH/.rvm/gems/ruby-2.4.2
53694: postbuildstatus finished successfully.
53695: Finished: CANCELED
After printing line 53690, the build stops for several hours. I assume after that, it gets cancelled automatically from a timeout.
The psb in question is 6.87 MB in size, so nothing crazy. It has about 50-100 layers.
Here are the import settings for the psb:
Does anyone else have this issue?
Any advice would be greatly Appreciated!
We’ve tried downgrading the asset pipeline to V1, which seemed to fix the problem, however it prevented the Entities package from working correctly, so that doesn’t seem to be a good solution. Any more insight on why psb import does not work on the new asset pipeline in cloud builds?
You should submit a bug for this from the Editor (Help → Report a Bug).
Worth also trying to replicate this locally. Check out your project on a local machine - ideally a Mac - and try loading it, see if the asset import process stalls there also.
I sadly do not have a mac at hand. However, when removing the specific psb in question, the issue is resolved. Sadly, that psb is critically important to our game. As a side note, other psb’s with identical import settings and similar filesize and amounts of layers in our project import just fine. The issue seems to be isolated to this specific file.
There’s still some other issues on building for webgl and android, but those are unrelated I think.
I’ve created another test project, imported the psb into that project and let it cloud build. That one ran fine.
So I’m assuming that it’s some mixture of our main project and that specific psb file that make the import process stall on the cloud build.
Is there any way to get more logging information out of the import process?
The PSB import is not really getting stuck, it just takes longer than the timeout of the log not being written to.
Whenever a psb is imported it occupies 2-8 gigs of ram. The problem seems to be that this ram is not cleared after the import of a single psb in the process is done. Once the ram usage has gone up to about 30-60 gigs, I’m assuming that the swap file is being used, which in turn slows the import to a crawl.
This also happens on our local machines when we fully delete the library folder an reimport. Eventually, unity even crashes with an out of memory error. The difference is, that when we restart unity to import again, the library folder up to that point remains, where on the server it appears to be deleted when there is an error occuring during the import.
49616: [Unity] Unloading 75 Unused Serialized files (Serialized files now loaded: 0)
49617: [Unity] System memory in use before: 65.62 GB.
49618: [Unity] System memory in use after: 65.55 GB.
49619: [Unity] Unloading 91 unused Assets to reduce memory usage. Loaded Objects now: 8676.
49620: [Unity] Total: 71953.073468 ms (FindLiveObjects: 2.062369 ms CreateObjectMapping: 0.656404 ms MarkObjects: 71940.421507 ms DeleteObjects: 9.929831 ms)
î That’s a part of a build I’m currently running. Whenever a psb is imported, the memory is skyrocketing.
As you can see, just unloading the unused files takes 71 seconds. This is done about every 10 assets.
Oh nice, that’s really good investigation. You should definitely report this to the Asset DB team through Help > Report a Bug. It’s probably best to avoid mentioning Cloud Build in the ticket since it can cause confusion and cause the ticket to get classified incorrectly. If you PM me the issue tracker number then I’ll track the report and try to get the fix prioritized.