hholzgra / ocitysmap

Fork of ocitysmap repository at savannah.nongnu.org
Other
35 stars 12 forks source link

Fehlermeldung bei grossen Kartenausschnitten #38

Closed chatelao closed 1 year ago

chatelao commented 2 years ago
Traceback (most recent call last):
  File "/home/maposmatic/maposmatic/scripts/render.py", line 508, in run
    output_count = renderer.render(config, self.job.layout,
  File "/home/maposmatic/ocitysmap/ocitysmap/__init__.py", line 586, in render
    self._render_one(config, tmpdir, renderer_cls,
  File "/home/maposmatic/ocitysmap/ocitysmap/__init__.py", line 698, in _render_one
    surface.finish()
ocitysmap.cairo.MemoryError: out of memory

https://maposmatic.osm-baustelle.de/results//2022/03/16/210149_2022-03-16_12-06_ukraine-errors.txt

hholzgra commented 2 years ago

The problem is that I can't predict the necessary amount of memory up front, it depends on too many different factors.

There even seem to be some cases where small render areas lead to this for certain polygon fill styles, although I was not able to fully track this down yet.

What I can probably do is to catch the "out of memory" exception and replace the standard exception output with a more user friendly error message describing the problem ...

hholzgra commented 1 year ago

The MapOSMatic web frontend now has a more clear error message:

Screenshot_2023-03-23_22-46-31

For command line users the backtrace output should be clear enough.

For the out-of-memory errors on rather small map areas see #66 now