You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a small improvement for the situation, where the machine on which the renderer runs does not have enough free RAM. Maybe it is better to fail gracefully and catch the OOM and display a nice message instead of the python stack trace?
map-machine render --cache /maps/cache -z 19 -o /maps/cotopaxi.svg -b" -78.551165,-0.745289,-78.276507,-0.513904"
INFO Constructing ways...
INFO Constructing nodes...
INFO Drawing ways...
Traceback (most recent call last):
File "/usr/local/bin/map-machine", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/map_machine/main.py", line 32, in main
mapper.render_map(arguments)
File "/usr/local/lib/python3.9/site-packages/map_machine/mapper.py", line 316, in render_map
map_.draw(constructor)
File "/usr/local/lib/python3.9/site-packages/map_machine/mapper.py", line 92, in draw
occupied = Occupied(
File "/usr/local/lib/python3.9/site-packages/map_machine/pictogram/point.py", line 27, in init
self.matrix = np.full((int(width), int(height)), False, dtype=bool)
File "/usr/local/lib/python3.9/site-packages/numpy/core/numeric.py", line 343, in full
a = empty(shape, dtype, order)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 8.23 GiB for an array with shape (102399, 86271) and data type bool
The text was updated successfully, but these errors were encountered:
Oh. Thank you! I've never tested it for such a big pictures.
Yes, I think firstly I should add some error handling, but the overlap computing algorithm itself is quite primitive. I have to make it more optimal in the future.
I would like to propose a small improvement for the situation, where the machine on which the renderer runs does not have enough free RAM. Maybe it is better to fail gracefully and catch the OOM and display a nice message instead of the python stack trace?
The text was updated successfully, but these errors were encountered: