Failing to load needed PS4 libs using packaged build in UE4.11

I was recently experimenting with making PS4 packages of our UE4 game. When running the built package on the PS4 I noticed I couldn’t get our FMOD effects to play. While looking through the logs I noticed this error:

[2016.04.18-22.29.44:337][ 0]LogFMODOculus: StartupModule
[2016.04.18-22.29.44:337][ 0]LogFMOD: FFMODStudioModule startup
[2016.04.18-22.29.44:337][ 0]LogFMOD: Lib path = ‘…/…/…/CharacterDemo/Plugins/FMODStudio/Binaries’
[2016.04.18-22.29.44:338][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading /app0/characterdemo/plugins/fmodstudio/binaries/ps4/libfmodL.prx
[2016.04.18-22.29.44:338][ 0]LogFMOD:Error: Failed to load module (error code -2147352574)
[2016.04.18-22.29.44:338][ 0]LogFMOD:Error: Failed to load FMOD DLL ‘/app0/characterdemo/plugins/fmodstudio/binaries/ps4/libfmodL.prx’, FMOD sounds will not play!
[2016.04.18-22.29.44:338][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading /app0/characterdemo/plugins/fmodstudio/binaries/ps4/libfmodstudioL.prx
[2016.04.18-22.29.44:338][ 0]LogFMOD:Error: Failed to load module (error code -2147352574)
[2016.04.18-22.29.44:338][ 0]LogFMOD:Error: Failed to load FMOD DLL ‘/app0/characterdemo/plugins/fmodstudio/binaries/ps4/libfmodstudioL.prx’, FMOD sounds will not play!

If I change the path in FFMODStudioModule::GetDLLPath to be:

FString::Printf(TEXT(“/app0/prx/lib%s.prx”), ShortName);

Then the FMOD libraries loads correctly:

03:05:08 [2016.04.19-00.01.41:470][ 0]LogFMODOculus: StartupModule
03:05:08 [2016.04.19-00.01.41:471][ 0]LogFMOD: FFMODStudioModule startup
03:05:08 [2016.04.19-00.01.41:471][ 0]LogFMOD: Lib path = ‘…/…/…/CharacterDemo/Plugins/FMODStudio/Binaries’
03:05:08 [2016.04.19-00.01.41:471][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading /app0/prx/libfmodL.prx
03:05:08 [2016.04.19-00.01.41:533][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading /app0/prx/libfmodstudioL.prx

Is this the right change to make or is there some project configuration setting I’m missing that causes the PS4 FMOD dlls to not be copied into the location it’s looking for them?

Hi,
The prx loading changed in 4.11 since Epic added official support for plugins with dynamic libraries. As part of that change the prx loading path changed from:

return FString::Printf(TEXT("/app0/%s/ps4/lib%s.prx"), *ShortLibPath, ShortName);

To the new form:

return FString::Printf(TEXT("lib%s.prx"), ShortName);

Can you confirm you have this latest version already and that it wasn’t working for you?

I did test the above path string and it worked as far as I could tell, but there are various configurations so I might have missed something. Are you running a code project from within Visual Studio using on-demand cooking, via the editor with “Launch Game”, or are you testing a packaged build?

I was running against FMOD 1.08.01. I just noticed that 1.08.02 was released and it fixes that prx loading line. This appears to fix the issue for me. I’m testing against a packaged build BTW not using the on-demand cooking.

Good to hear, let me know if you run into any more packaging problems with the new version.