sideeffects / HoudiniEngineForUnreal

Houdini Engine Plugin for Unreal Engine.
http://www.sidefx.com/unreal
Other
1.35k stars 374 forks source link

HoudiniEngineScheduler infinit while (true) #298

Closed manugulus closed 3 months ago

manugulus commented 5 months ago

In HoudiniEngineScheduler.cpp, in FHoudiniEngineScheduler::TaskInstantiateAsset and FHoudiniEngineScheduler::TaskCookAsset, in the while(true) we start by getting the status of the cook with:

int Status = HAPI_STATE_STARTING_COOK; HOUDINI_CHECK_ERROR_GET(&Result, FHoudiniApi::GetStatus(FHoudiniEngine::Get().GetSession(), HAPI_STATUS_COOK_STATE, &Status));

if we loose the session being in those while true, the Result is set to HAPI_RESULT_FAILURE, but the Status is not updated and remains to HAPI_STATE_STARTING_COOK. However, the only break conditions of the while(true) are checking the Status so we end up looping indefinitely. I suggest a final check is added to the Status to ensure it's not HAPI_RESULT_FAILURE or to always update the Status in FHoudiniApi::GetStatus.

dpernuit commented 3 months ago

Thanks for bringing this up - this has been fixed in recent builds of the plugin.