HAPI_Initialize exiting without error

   1401   6   4
User Avatar
Member
2 posts
Joined: Oct. 2017
Offline
Hello,
I am trying an integration of Houdini Engine in my own C++ application.
Basically I linked the libHAPI.a to my visual studio 2015 project, added the include path for HAPI.h, HAPI_Common.h, HAPI_Helpers.h, HAPI_Version.h, and HAPI_API.h and included them, then added all the dlls located in the bin folder of Houdini to the root folder of my application.
When implementing on my application side, everything seems fine as all the functions are recognized and HAPI_CookOptions_Create seems to be working properly. On the other hand, as soon as I call HAPI_Initialize, the process gets killed without any error, just a simple “exit 1”. Has anyone already been through this ? Here is my code :


HAPI_CookOptions cookOptions = HAPI_CookOptions_Create();

HAPI_Session session;
HAPI_CreateInProcessSession( &session );
HAPI_Result res= HAPI_Initialize(
&session, // session
&cookOptions,
true, // use_cooking_thread
-1, // cooking_thread_stack_size
NULL, // environment files
NULL, // otl_search_path
NULL, // dso_search_path
NULL, // image_dso_search_path
NULL ); // audio_dso_search_path

I am using the latest Houdini 16 version with a 30 days trial licence for Houdini Engine.

Thanks in advance!

Gautier
User Avatar
Staff
322 posts
Joined: Sept. 2016
Offline
Hi Gautier,

Did you setup your HFS and PATH environment variable?

Instead of moving all the dlls to your application root, you ‘d rather have the HFS and PATH environnement variable properly setup in your project settings:

HFS should point to houdini’s install folder, and PATH to houdini's bin folder

for example
HFS=C:\Program Files\Side Effects Software\Houdini 16.0.736
PATH=%PATH%;C:\Program Files\Side Effects Software\Houdini 16.0.736\bin

(Replace the above Houdini path with your installation folder.)
User Avatar
Member
2 posts
Joined: Oct. 2017
Offline
That was it !
Thank you, by copying all the dll I had some files missing. Setting up the PATH env variable did the job.
User Avatar
Member
2 posts
Joined: Nov. 2018
Offline
Hi,

I currently have the same issue in my integration. I'm upgrading from 16.5.571 to 17.5.258

Using Houdini 16.5.571 and setting the env variables everything works fine.
HFS=C:\Program Files\Side Effects Software\Houdini 16.5.571
PATH=%PATH%;C:\Program Files\Side Effects Software\Houdini 16.5.571\bin

But when I upgrade to 17.5.258 and setting the env variables, it results in a hard crash without errors when I call HAPI_Initialize
HFS=C:\Program Files\Side Effects Software\Houdini 17.5.258
PATH=%PATH%;C:\Program Files\Side Effects Software\Houdini 17.5.258\bin

Has something changed from 16.5 to 17.5 that would explain this?

Cheers
User Avatar
Staff
322 posts
Joined: Sept. 2016
Offline
Hi,

The HAPI library itself has changed a lot between 16.5 and 17.5 …
Would you happen to still be linking against the old 16.5 library?
Did you update both the headers and libraries?
User Avatar
Staff
332 posts
Joined: Sept. 2016
Offline
Also check you are building release and not debug. If you want to see a callstack you can download PDB symbols for your build.
User Avatar
Member
2 posts
Joined: Nov. 2018
Offline
Thanks, guys

I managed to resolve the issue. The problem came from our side.

Thanks again and sorry
  • Quick Links