Any2HRTF / Mesh2HRTF

Open software for the numerical calculation of head-related transfer functions
European Union Public License 1.2
103 stars 11 forks source link

NumCalc runtime error #130

Open leverscut1 opened 3 months ago

leverscut1 commented 3 months ago

I'm encountering a runtime error when calculating using NumCalc script. The error message is as follows: "... waiting for resources and checking every second (May 22 2024, 13:02:07) 1 NumCalc instances running at 3.80% CPU load 247.32 GB RAM available (8.59 GB used), 19.61 GB required

terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

Any insights or recommendations to resolve this issue would be greatly appreciated.

f-brinkmann commented 3 months ago

I don't think I encountered that before. @schaastrommla do you have an idea?

schaastrommla commented 3 months ago

Hard to tell, I seems NumCalc wants to allocate some memory with zero or a negative value, but I have no idea where. Can be anything from a missing parameter in the inputfile to a programming error or some integer value getting too big. What is the background of the problem? A "simple" calculation, or a restart with just a different evaluation grid, or just a memory check? How many elements, how many clusters?

leverscut1 commented 3 months ago

This problem may be caused by too many faces in the calculated model, because the AEL of the input .stl model is about 1mm, and there are about 380,000 meshes. This problem will not occur when calculating a model with an AEL of 2mm, but I hope can fix this problem

f-brinkmann commented 3 months ago

Definately worth a try. If your on windows, Meshmixer is an easy way to remesh to a constant edge length. If its a head, you could also use the grading tools in https://github.com/Any2HRTF/Mesh2HRTF/tree/master/mesh2hrtf/Mesh2Input/Meshes

leverscut1 commented 3 months ago

Thank you very much for your suggestion. However, I have tried several remeshing methods to obtain a uniform mesh with AEL=1mm, but the error still occurs. I guess it might not be an issue with the mesh structure.

f-brinkmann commented 3 months ago

Did you try to remesh the ears with 1 mm and everything else with approx. 2 mm?

leverscut1 commented 2 months ago

Did you try to remesh the ears with 1 mm and everything else with approx. 2 mm? This approach is feasible and completes the calculation, but I still wish to try running the entire head with an AEL of 1mm to evaluate its accuracy. I also have a significant amount of memory (about 250GB). However, a bug is preventing this from being accomplished.

f-brinkmann commented 2 months ago

I understand and agree that it would be nice to know whats happening there. I think @schaastrommla is currently on vacation. Maybe he could have a look if you upload the project somewhere.

Regarding the accuracy, I think you are very fine with the 1 mm for the ears - at least according to what we know from literature...

leverscut1 commented 2 months ago

Understood. Thanks for answering these questions, and best regards.