AWS Thinkbox Discussion Forums

Stoke simulation error --Runtime error: bad allocation

Hi,
I’m running a simulation using Stoke 2.3.6 under Max 2018 64bit and been having the same error come up many times. It says: Runtime error: bad allocation.
My setup is a FumeFX sim (version 5.0.2.1) being used as the distribution source inside Stoke. If I simulate 1 million particles per frame it does finish the sim (80 frames) but if I try anything higher than 1.2 million particles per frame it stops and gives the error, this happens around frame 60. I have also used different values on the ‘memory limit’ parameter of Stoke but still the same.
I have 64gb of ram and virtual memory is turned on (Windows 10 64bit).
Any ideas why this might be happening?
Thanks in advance.
F

Hmm. I’m surprised you’re not having problems with Fume 5.0 as there’s a thread here with others having problems with it.

On to your actual issue here… I think both you and I expect “bad allocation” to be due to Stoke trying to allocate memory and the request failing. I’d expect it to push to virtual memory in that case too… Are you able to check the memory usage when you’re bumping the particle count up? I’m not sure about memory fragmentation either, but a reboot as a test would clear that up.

Good that you mentioned it. The project was originally done in FumeFX 4. Like I mentioned previously, the sim finishes if I use 1 million particles per frame but I don’t know if it will render fine yet. Will post the results later.

I’ve been watching the Windows Task Manager while the sim is going. The memory usage will reach it’s maximum early on the sim (63.8gb used out of 64gb) and stay there for many frames until the error. I’m guessing the virtual memory is being used otherwise the error would come up right when the physical memory gets full. The same happens when I change the particle count. Have done many reboots, doesn’t help.

Hmm. If it’s bumping up against 64GB immediately, then I do think the working set is just incredibly big. I know Krakatoa has a feature called ‘partitioning’ that essentially emulates a number of particles given an original position, but I’m not sure what your pipeline looks like. Maybe the consumer of your sim could do the same…

That said, if you want to see how much memory is being allocated total, add the “Commit Size”. That’ll include paged memory:

image

Thanks for the info.
For some reason, on that project I was doing, Stoke was starting and finishing the simulation using a FFX 5 grid as the distribution and also velocity. Maybe because the project was originally created with FFX 4 and then upgraded to 5… but now, I’m doing something from scratch using FFX 5 and the latest Stoke and I just keep getting this error (the sim doesn’t start at all):

EXCEPTION_ACCESS_VIOLATION The thread tried to read from or write to a virtual address for which it does not have the appropriate address.

Any ideas?
Many thanks.

Privacy | Site terms | Cookie preferences