hholzgra / ocitysmap

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

Page bottom indexes broken #41

Closed hholzgra closed 1 year ago

hholzgra commented 2 years ago

Currently a lot of (all?) render requests fail with a

assert actual_n_cols >= rendering_area.n_cols

assertion failure.

As this seem to have started just recently it was probably caused by:

https://github.com/hholzgra/ocitysmap/commit/0620cef834996715d10f5ec815020ce4c3499c8f

Full backtrace:

Traceback (most recent call last):
  File "/home/maposmatic/maposmatic/scripts/render.py", line 516, in run
  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 691, in _render_one
    renderer.render(surface, dpi, osm_date)
  File "/home/maposmatic/ocitysmap/ocitysmap/layoutlib/single_page_renderers.py", line 586, in render
    self._index_renderer.render(ctx, self._index_area, dpi)
  File "/home/maposmatic/ocitysmap/ocitysmap/indexlib/StreetIndex.py", line 880, in render
    assert actual_n_cols <= rendering_area.n_cols
AssertionError
hholzgra commented 2 years ago

This is fixed for most cases, but may still be hit in edge cases as the index area size / column count calculation does not take actual category header heights into account yet, assuming fixed height for all entries instead.

hholzgra commented 1 year ago

So far this has not reoccurred on the public server, so closing this for now (will re-open in case it actually occurs again)