HARS.exe Not releasing memory when cooking Houdini Assets in UE4

   265   1   1
User Avatar
Member
2 posts
Joined: Aug. 2019
Offline
Hi,

I'm currently using C++ to place a large number of assets into a level and cooking them. I'm then running out of memory.
I've used the cmd command “Houdini.RestartSession” which sometimes works. But most of the time won't restart the
HARS.exe process to release the memory it's using. Which results in me having to close and reopen the editor.

It's worth noting that once Houdini Assets are places in a level and the level is saved. Then loading another level without
any Houdini Assets in. It's still holding the same memory as before.

Have I missed some basic setup? Or is this a bug that'll be fixed in a future update?


Thanks in advance,

Sbrown
User Avatar
Staff
369 posts
Joined: Sept. 2016
Offline
Hi,

“Restart session” is mainly meant to be used for:
- switching to a Houdini engine debugger session without restarting UE4
- after changing the houdini engine session's parameter
- after an issue with the current HARS session happened
(Houdini crashed, or hanged and you forcefully had to kill it for whatever reason).

It was added to avoid requiring a full restart of UE4 after any of those actions, which the plugin required before.

It isn't meant to be used for what you're trying to do, aka “Clean up” the internal houdini scene to save on memory, and is likely to make things worse as this could create dangling houdini objects.
(the memory that HARS holds after loading a new level is likely due to this)

Restart session simply closes the current session, and starts a new one, without even attempting to do any clean up.

Memory can be taken on two different sides: HARS (HDAs / Input nodes) or Unreal (Plugin objects)

- HDAs that you have interacted with in the current level will be created in Houdini/HARS, any input data sent will be there as well, and will remain there until you either destroy the HDA in unreal, or load a different level.
(You can use a Houdini Engine Debugger session to see those nodes being created and deleted “live” as you use their unreal counterpart).

- Similarly, objects created by the plugin on the unreal side will remain in memory while the level is loaded, or can also remain in the transaction queue (undo/redo). Saving/Loading a level / creating a new one should help with these as well.
The plugin will also create temporary files for certain assets (in the HoudiniEngine/Temp folder).
Unused/unreferenced one can be clean up via the clean temporary file action in the file menu.
  • Quick Links