HISE segfaults when loading large sample maps
-
I have two large sample maps in my project, about 20GB of wav files in total. I loaded these into my samplers and saved the project. Now each time I try to open the project, HISE loads the samples and then crashes.
If I convert the samples to monoliths then no crash. However sometimes loading the monoliths causes execution timeout errors in my script.
-
Seems to be happening somewhere within
sampler->killAllVoicesAndCall(f);but the logic is a bit too deep for me to follow.@Christoph-Hart I can upload my test project for you when you have time to take a look.
-
@d-healey said in HISE segfaults when loading large sample maps:
sometimes loading the monoliths causes execution timeout errors
Have you tried raising the timeout in the settings?
-
@ustk I'll try it, but HISE shouldn't timeout my script when loading samples should it?
-
@d-healey

-
Working on a large project again - probably the same one :) and the same issue, loading wavs the project crashes/times out, convert to monoliths - in fact I only converted one of the maps to monolith - and the project loads. I will try poking Claude about this but just wanted to give this thread a bump.
-
D David Healey referenced this topic
-
@Christoph-Hart I've pinned it down. The issue is when loading the wav files HISE is opening lots of file readers (up to 2 per file) and it doesn't close them until the instrument unloads. With a lot of samples it's hitting my system
ulimit -nfile descriptor limit. I temporarily increased the limit to 65536 and I was able to load and save my large sample map without issue which confirms that this is the cause.It also ties into the same issue I had in this thread where I noticed if I had more than 8160 samples the project crashed.
-
@David-Healey Nice find

-
This is Claude's minimal fix: https://github.com/christophhart/HISE/pull/1003
I've tested it and it appears to work. The fix just closes each file reader after reading the data into the preload buffer.