-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OutOfMemory Error during routing #297
Comments
I tried running the program in Github Codespaces on a 64GB RAM machine but launching the program headless did not work and gave a 'could not find X11 display' error. |
I run this on my windows and mem break too. According to my recent study, when FR can't extend a route, the mem will increase immediately, it relates to its queue data structure.For now, it can't be fixed, you can try another auto-router such as electra. |
I can confirm that this is an issue, thank you @LimesKey for the DSN file. Here is the profiler's report during my recent session that consumed 8GB of RAM in a matter of minutes: |
I implemented a HashMap-based caching mechanism for some key planar classes to significantly reduce the new object creation count, but it made the algorithm less CPU-efficient because of the thread-safe hash lookups. I will discard these changes, because the memory need didn't decrease significantly in the end. I think there must be a separate routing issue as well related to your board, that needs further investigation. |
Is the bug/issue consider a memory leak or just it working but using up more RAM than intended? I can try it in a Github Codespace with 64GB of RAM if I can solve the headless issue. I tried Electra last night, and while it was super fast and worked, it conflicted with my graphic on my front copper layer. This is turning into less of a freerouting issues/question, but do you think I would require a third layer because of the complexity of the board? And does anyone know how to prevent the copper graphic from conflciting with the auto routing traces? |
I think the algorithm gets into to a loop incorrectly that uses up as much memory as it can over time, so in that sense it's a memory leak. It's not dangerous or harmful in any way, it's just that it would probably never finish. I suspect that it is connected to the fact that your board edge is more complex than other boards, but I might be wrong about that. If you have time you can try to test it with a simple rectangular edge. I can't help you with Electra unfortunately. |
In fact, I also met this in some of my projects when my RAM is 32GiB and it was NOT full. Maybe this is infinty recursion or loop made a stack overflow? I don't know how it works, but I know some silly bug can make this. I found a repetition in my new issue #299. Although it will not lead the program to crash, but i think it can rellect some issues. |
@andrasfuchs i think this issue is just the bigger issue of #299, and i think if we have more time, we will get the same crash in it. So to reserch #299, maybe we can fix the bug of memory leak, slow and... anyway! |
What version of freerouting are you using?
v1.90.0 (latest)
On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
Windows & Arch Linux
What EDA do you use? KiCad, KiCad with freerouting plugin, EAGLE, EasyEDA, other? What is its exact version?
KiCad with freerouting plugin & Standalone
What types of files are you working with? Can you attach the project files (.pro, .kicad_pcb, etc) or the exported DSN file? (Please note that GitHub doesn't allow DSN file uploads, so you need to ZIP it before uploading.)
myboard.zip
Did you use any command line arguments?
No
Can you post a screenshot of the problem?
Can you include the latest, related log entries from the .log file?
I'm not sure how to by using the KiCad plugin
Please list the detailed steps to reproduce the problem
Freeroute the provided file on a 16GB RAM system
What would you expect freerouting to do in this situation?
Freeroute without errors
Is fixing this issue critical for your work?
Yes
I get "java.lang.OutofMemoryError: java heap space failed reallocation of scalar replaced objects" and "Java.lang.OutofMemoryError: Heap Space". I'm KiCad with the plugin on a laptop with more than 16GB of available RAM, I've also tried running the file on another computer, same result. I've tried increasing my Windows Page File system but no luck.
The text was updated successfully, but these errors were encountered: