Crash during cooking in ogg compression

Hi folks,

I’m experiencing crashes when cooking an audio file. The log states:

[...]
Cook: LogSavePackage:Display: Finished SavePackage /home/<user>/src/RSG/Saved/Cooked/LinuxNoEditor/RSG/Content/Audio/Dialogue/Generic/Outlaw_Scout_002/S__Scream_031.uasset
Cook: LogAudioDerivedData:Display: Building compressed audio format OPUS wave MISSION_BOUNTYHUNTER_GEN_ENCOUNTER_1_7_1...
Cook: /home/<user>/src/Engine/Engine/Binaries/Linux/UE4Editor: symbol lookup error: /home/<user>/src/Engine/Engine/Binaries/Linux/libUE4Editor-AudioFormatOpus.so: undefined symbol: Opus_resampler_init
CommandUtils.Run: Run: Took 923.465109s to run UE4Editor, ExitCode=127
Project.Cook: Cook failed. Deleting cooked data.
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Cook failed. ---> AutomationTool.CommandletException: BUILD FAILED: Failed while running Cook for /home/<user>/src/RSG/RSG.uproject; see log /home/<user>/Library/Logs/Unreal Engine/LocalBuildLogs/Cook-2017.10.19-19.44.48.txt
[...]

In fact it seems that the function Opus_resampler_init is missing in my binaries. Running ldd -r libUE4Editor-AudioFormatOpus.so results in:

undefined symbol: Opus_resampler_init   (./libUE4Editor-AudioFormatOpus.so)
undefined symbol: Opus_resampler_process_int    (./libUE4Editor-AudioFormatOpus.so)
undefined symbol: Opus_resampler_destroy        (./libUE4Editor-AudioFormatOpus.so)
undefined symbol: Opus_resampler_process_interleaved_int        (./libUE4Editor-AudioFormatOpus.so)

AudioFormatOpus utilizes the third party project libOpus which should import the Opus_resampler_...-methods from speex_resampler library. Looking into libOpus.build.cs I wonder if speex is properly included for Linux builds.

But I also observe that this crash always occurs on the same (new) file, so it is also quite possible that something is wrong with the input data. Of course I have already checked the obvious parameters of the file but can’t find anything suspicious on it.

Would be great to get any recommendations on this.

Resampler libs have been added to 4.18 - I suggest cherry-picking this commit.

Great, this is working. Thanks a lot for your help.