memory leak / freeze on export
I'm finding that in unity 2018.3f and presumably later. that the latest version of umotion freezes on the export of generic animations. it gets to the end is doing the compiling constraints. but never actually finishes. in some cases, it causes a memory leak where it consumes ram until I have nothing left and causes unity to crash as a result. The original generic animation lasts 17 minutes and froze at this point every time it was attempted to be exported. splitting into 5 sections doesn't seem to alleviate the problem in a real capacity. It still freezes at the same point, right before finishing. I should mention though when it's this small there doesn't seem to be the memory leak, that was present before, it stays at an exactly constant amount of memory being used and fluctuating cpu%
I'm using a ryzen 9 300X
RTX 2070 super
64 gigs of ram.
Customer support service by UserEcho
the error is actually, sampling constraints when it freezes
clarifying, I had assumed it changed what it was doing as it's exporting, but it simply always says sampling constraints as it goes.
Hi,
thank you very much for your bug report.
At the end of the export, UMotion writes the results to the Unity asset database. This invokes callbacks that other editor extensions can hook in. Please try to export your animation in an empty Unity 2018.3 project (that contains just UMotion, the character and the UMotion project) to ensure that it's no third-party scripts that cause the issue. Does it work there?
If it does not work in the "empty" project, could you *.zip that project and send it to me so that I can further debug? You can send it to me via the email support form (or request a link to my Dropbox via that email form if file size is too big).
Thank you very much and I'm sorry for the inconvenience.
Best regards,
Peter
yeah we tried to go ahead and use a blank scene with the latest unity and the latest umotion. it still simply freezes upon final export.
Ok, please follow the instructions of my previous post so that I can further debug and fix this issue:
Thank you very much.
Best regards,
Peter
Hi
I just finished my investigations.
The "umotion_project2.asset" that you've sent to me contains a very dense mocap animation that is ~142 minutes in length. This is a huge amount of data that UMotion (and Unity's underlying asset API) has to handle. Just selecting the project file in the Unity project window (that's when Unity deserializes and loads the asset for the first time) already brings my 8 GB ram laptop to it's memory limits (UMotion isn't even active in this case). In other words, there are some natural memory/performance limits a Unity integrated animation editor can handle and this is exceeding these limits.
Please try to keep your mocap animations in the range of max. 1-2 minutes (truncate your animations before you import them to UMotion via the Inspector window shown when you have the *.fbx file of the animation selected in Unity's project window) and only have one of them per UMotion project (you can have multiple smaller ones per project of course).
Also consider that animations can dramatically increase the size of the built game, it's often better to have smaller animation loops (in the range of ~10 seconds) for talking animations etc. If you're aiming to do some long cut-scenes, maybe use Motion Builder (a tool especially built for this purpose) for post processing your mocap animations and then apply some heavy compression in the Unity import settings to reduce the size (at the expense of reduced quality).
If it has been your primary goal when purchasing UMotion to edit long mocap animations, then I can offer you a refund (please send me your invoice ID via email). I'm also going to state this in the product description of UMotion in the future and maybe add a warning when trying to import an animation that's longer than 2 minutes.
You mentioned that you saw a similar problem like the one you described with an animation that is ~2 minutes in length. Could you send me a umotion project that contains one animation with this length (please note that if you add multiple animation clips with 2 minutes or longer into one UMotion project, you can get the same memory issues again as Unity always loads the whole project into the ram)? Thank you very much.
Best regards,
Peter
hi there, yes we do have a smaller scene about 2 minutes - 3 minutes at a time that seems to cause this issue as well. however, we've done projects that are sub 2 minutes that have worked. We have started to use the animation layers in Maya instead to do these long shoots. the leak only on occasion seems to eat all 64 gigs of ram we use, though it typically will cap itself around 40 and just hover there, but that's interesting information about how unity is behaving and that info will come in handy i'm sure in the future. Thanks for the offer of a refund, but we've had the program for quite a while, and still find it useful for other situations and will most likely still use it in some capacity.