Skip to content
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

Assertion pterrain failed #2257

Closed
lmoureaux opened this issue Mar 31, 2024 · 5 comments · Fixed by #2263
Closed

Assertion pterrain failed #2257

lmoureaux opened this issue Mar 31, 2024 · 5 comments · Fixed by #2263
Labels
bug Something isn't working gui This issue requires changes to the user interface

Comments

@lmoureaux
Copy link
Contributor

Describe the bug

Getting hundreds of those in my terminal:

[critical] freeciv21-client (/home/louis/Personal/freeciv21/common/terrain.cpp:112) - Assertion pterrain failed
[critical] freeciv21-client (/home/louis/Personal/freeciv21/common/terrain.cpp:112) - Please report this message at https://github.com/longturn/freeciv21/issues

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a game
  2. Use RoundSquare (if it matters)
    1. See error

Expected behavior
No failing assertions

Platform and version (please complete the following information):

  • OS: Linux
  • Freeciv21 version: master
  • Ruleset/Longturn game (if applicable): LT82

Additional context
Multiple tileset-related PRs merged recently: #2235 #2251 #2252

@lmoureaux lmoureaux added bug Something isn't working gui This issue requires changes to the user interface labels Mar 31, 2024
@lmoureaux
Copy link
Contributor Author

Also getting these on startup:

[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_ne, road.road_arctic_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_se, road.road_arctic_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_sw, road.road_arctic_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_nw, road.road_arctic_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_lake_c_ne, road.road_coast_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_lake_c_se, road.road_coast_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_lake_c_sw, road.road_coast_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_lake_c_nw, road.road_coast_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_coast_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_coast_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_coast_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_coast_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_floor_c_ne, road.road_coast_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_floor_c_se, road.road_coast_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_floor_c_sw, road.road_coast_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_floor_c_nw, road.road_coast_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_arctic_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_arctic_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_arctic_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_arctic_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_desert_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_desert_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_desert_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_desert_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_forest_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_forest_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_forest_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_forest_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_grassland_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_grassland_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_grassland_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_grassland_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_hills_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_hills_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_hills_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_hills_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_jungle_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_jungle_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_jungle_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_jungle_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_mountains_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_mountains_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_mountains_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_mountains_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_plains_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_plains_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_plains_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_plains_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_swamp_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_swamp_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_swamp_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_swamp_c_nw, road.road_-_c_nw, or road.road_c_nw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_tundra_c_ne, road.road_-_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_tundra_c_se, road.road_-_c_se, or road.road_c_se
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_tundra_c_sw, road.road_-_c_sw, or road.road_c_sw
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_tundra_c_nw, road.road_-_c_nw, or road.road_c_nw

@lmoureaux
Copy link
Contributor Author

Stack trace for the assertion:

#0  fc_assert_handle_failure(char const*, char const*, int, char const*, QString const&)
    (condition=0x555555b3a0a2 "pterrain", file=0x555555b3a070 "/home/louis/Personal/freeciv21/common/terrain.cpp", line=112, function=0x555555b3a0b0 "Terrain_type_id terrain_index(const terrain*)", message=...) at /home/louis/Personal/freeciv21/utility/log.cpp:224
#1  0x00005555558e9c0f in terrain_index(terrain const*) (pterrain=0x0) at /home/louis/Personal/freeciv21/common/terrain.cpp:112
#2  0x00005555557b4d77 in fill_crossing_corner_sprites(tileset const*, extra_type const*, terrain const*, std::vector<drawn_sprite, std::allocator<drawn_sprite> >&, bool, bool*, bool, bool*)
    (t=0x55555664ef58, pextra=0x555555cb6048 <extras+9256>, pterrain=0x0, sprs=std::vector of length 0, capacity 80, road=false, road_near=0x7fffffffc3c0, hider=false, hider_near=0x7fffffffc3c8) at /home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:3956
#3  0x00005555557b55e6 in fill_crossing_sprite_array(tileset const*, extra_type const*, std::vector<drawn_sprite, std::allocator<drawn_sprite> >&, bv_extras, bv_extras*, terrain**, terrain*, city const*)
    (t=0x55555664ef58, pextra=0x555555cb6048 <extras+9256>, sprs=std::vector of length 0, capacity 80, textras=..., textras_near=0x7fffffffc5b0, tterrain_near=0x7fffffffc570, pterrain=0x0, pcity=0x0) at /home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:4091
#4  0x00005555557b84ad in fill_sprite_array(tileset*, mapview_layer, tile const*, tile_edge const*, tile_corner const*, unit const*)
    (t=0x55555664ef58, layer=LAYER_ROADS, ptile=0x0, pedge=0x0, pcorner=0x7fffffffc828, punit=0x0)
    at /home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:4807
#5  0x000055555579a927 in freeciv::layer::fill_sprite_array(tile const*, tile_edge const*, tile_corner const*, unit const*) const
    (this=0x5555560abf20, ptile=0x0, pedge=0x0, pcorner=0x7fffffffc828, punit=0x0) at /home/louis/Personal/freeciv21/client/tileset/layer.cpp:26
#6  0x00005555557f4fe9 in put_one_element(QPixmap*, std::unique_ptr<freeciv::layer, std::default_delete<freeciv::layer> > const&, tile const*, tile_edge const*, tile_corner const*, unit const*, int, int)
     (pcanvas=0x5555562216b0, layer=std::unique_ptr<freeciv::layer> = {...}, ptile=0x0, pedge=0x0, pcorner=0x7fffffffc828, punit=0x0, canvas_x=-25, canvas_y=58)
    at /home/louis/Personal/freeciv21/client/views/view_map_common.cpp:823

@jwrober
Copy link
Collaborator

jwrober commented Mar 31, 2024

Also getting these on startup:

[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_ne, road.road_arctic_c_ne, or road.road_c_ne
[info] freeciv21-client (/home/louis/Personal/freeciv21/client/tileset/tilespec.cpp:425) - Could not find optional sprite matching road.road_inaccessible_c_se, road.road_arctic_c_se, or road.road_c_se

I've been getting those lately too. One of @hugomflavio recent PRs I think.

@hugomflavio
Copy link
Contributor

Also getting these on startup:

...

Not sure how we get rid of those... unless we remove the messages for missing optional sprites.

@hugomflavio
Copy link
Contributor

deleted my previous comment as it linked the wrong thing. Continuing on discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gui This issue requires changes to the user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants