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

Consistent crash in assign_settlement() at island.py:262 build 2017.2.158 #2767

Open
nalramli opened this Issue Jan 12, 2018 · 12 comments

Comments

Projects
None yet
6 participants
@nalramli

nalramli commented Jan 12, 2018

I have a consistent, reproducible crash in assign_settlement() at island.py:262. Load the attached saved game and let it run for 75 seconds, and the crash will happen.

unknown-horizons-2018-01-11_20-08-08.log

2018-01-06_Nabil.sqlite.zip

yamldata.cache.zip

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jan 12, 2018

Member

@mender27 could you take an look please if we have the problem in master too please?

Member

LinuxDonald commented Jan 12, 2018

@mender27 could you take an look please if we have the problem in master too please?

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jan 12, 2018

Member

@LinuxDonald sure thing!

Member

AndyMender commented Jan 12, 2018

@LinuxDonald sure thing!

@AndyMender AndyMender self-assigned this Jan 12, 2018

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jan 14, 2018

Member

Unfortunately, I cannot load the savegame file with the following traceback:

Failed to load /home/andy/.unknown-horizons/save/2018-01-06_Nabil.sqlite
Traceback (most recent call last):
  File "/home/andy/git-repos/unknown-horizons/horizons/main.py", line 344, in start_singleplayer
    session.load(options)
  File "/home/andy/git-repos/unknown-horizons/horizons/spsession.py", line 45, in load
    super().load(*args, **kwargs)
  File "/home/andy/git-repos/unknown-horizons/horizons/session.py", line 255, in load
    self.world._init(savegame_db, options.force_player_id, disasters_enabled=options.disasters_enabled)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/__init__.py", line 164, in _init
    self.load_raw_map(savegame_db)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/__init__.py", line 263, in load_raw_map
    island = Island(savegame_db, islandid, self.session, preview=preview)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/island.py", line 97, in __init__
    settlement = Settlement.load(db, settlement_id, self.session, self)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/settlement.py", line 180, in load
    tile = island.ground_map[coords]
KeyError: (207, 138)

@nalramli I would need additional information about your OS and Unknown Horizons installation :).

Member

AndyMender commented Jan 14, 2018

Unfortunately, I cannot load the savegame file with the following traceback:

Failed to load /home/andy/.unknown-horizons/save/2018-01-06_Nabil.sqlite
Traceback (most recent call last):
  File "/home/andy/git-repos/unknown-horizons/horizons/main.py", line 344, in start_singleplayer
    session.load(options)
  File "/home/andy/git-repos/unknown-horizons/horizons/spsession.py", line 45, in load
    super().load(*args, **kwargs)
  File "/home/andy/git-repos/unknown-horizons/horizons/session.py", line 255, in load
    self.world._init(savegame_db, options.force_player_id, disasters_enabled=options.disasters_enabled)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/__init__.py", line 164, in _init
    self.load_raw_map(savegame_db)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/__init__.py", line 263, in load_raw_map
    island = Island(savegame_db, islandid, self.session, preview=preview)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/island.py", line 97, in __init__
    settlement = Settlement.load(db, settlement_id, self.session, self)
  File "/home/andy/git-repos/unknown-horizons/horizons/world/settlement.py", line 180, in load
    tile = island.ground_map[coords]
KeyError: (207, 138)

@nalramli I would need additional information about your OS and Unknown Horizons installation :).

@nalramli

This comment has been minimized.

Show comment
Hide comment
@nalramli

nalramli Jan 14, 2018

Hi @AndyMender , please check the attached log file, does it have the information you need? My OS is Windows 10 Professional.

Thanks.

nalramli commented Jan 14, 2018

Hi @AndyMender , please check the attached log file, does it have the information you need? My OS is Windows 10 Professional.

Thanks.

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jan 14, 2018

Member

Yes, my apologies. The log contains the final call prior to the game crashing:

  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\resourcehandler.py", line 71, in __init__
    super(ResourceHandler, self).__init__(**kwargs)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\building\building.py", line 74, in __init__
    self.settlement = self.island.add_settlement(self.position, self.radius, owner)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 212, in add_settlement
    self.add_existing_settlement(position, radius, settlement)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 225, in add_existing_settlement
    self.assign_settlement(position, radius, settlement)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 262, in assign_settlement
    assert building_tile.settlement is None
AssertionError

I will investigate this. Does the game crash every time you reach that point or does it happen with only this one savegame file?

Member

AndyMender commented Jan 14, 2018

Yes, my apologies. The log contains the final call prior to the game crashing:

  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\resourcehandler.py", line 71, in __init__
    super(ResourceHandler, self).__init__(**kwargs)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\building\building.py", line 74, in __init__
    self.settlement = self.island.add_settlement(self.position, self.radius, owner)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 212, in add_settlement
    self.add_existing_settlement(position, radius, settlement)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 225, in add_existing_settlement
    self.assign_settlement(position, radius, settlement)
  File "C:\Users\Nabil\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 262, in assign_settlement
    assert building_tile.settlement is None
AssertionError

I will investigate this. Does the game crash every time you reach that point or does it happen with only this one savegame file?

@nalramli

This comment has been minimized.

Show comment
Hide comment
@nalramli

nalramli Jan 15, 2018

I'm not sure if it always crashes at this call, but it does crash every time I load this particular saved game, after exactly 75 seconds. I am able to play other games for many minutes without crashing.

nalramli commented Jan 15, 2018

I'm not sure if it always crashes at this call, but it does crash every time I load this particular saved game, after exactly 75 seconds. I am able to play other games for many minutes without crashing.

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jan 15, 2018

Member

To me this looks like an issue with settlement placement. When I try to load the savegame file, UH outright refuses to do so complaining about the coordinates of the settlement.

Member

AndyMender commented Jan 15, 2018

To me this looks like an issue with settlement placement. When I try to load the savegame file, UH outright refuses to do so complaining about the coordinates of the settlement.

@nalramli

This comment has been minimized.

Show comment
Hide comment
@nalramli

nalramli Jan 16, 2018

For me the game loads fine and plays for a short period of time until it crashes.

There is one additional hint that may be related. Just before I saved this game, I saw opponent boats heading towards the island where my settlement is, so I quickly built towers to cover the entire area and block them from building there. They sent several boats so this happened a few times and I built towers near where they were going to block them. I'm not sure if this has anything to do with the crash, but just wanted to share in case it is useful.

nalramli commented Jan 16, 2018

For me the game loads fine and plays for a short period of time until it crashes.

There is one additional hint that may be related. Just before I saved this game, I saw opponent boats heading towards the island where my settlement is, so I quickly built towers to cover the entire area and block them from building there. They sent several boats so this happened a few times and I built towers near where they were going to block them. I'm not sure if this has anything to do with the crash, but just wanted to share in case it is useful.

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Jan 16, 2018

Member

It might be related, in fact. We do have some issues with the boatbuilder tests so who knows.

Member

AndyMender commented Jan 16, 2018

It might be related, in fact. We do have some issues with the boatbuilder tests so who knows.

@nihathrael nihathrael added the B-crash label Jan 21, 2018

@martlin2cz

This comment has been minimized.

Show comment
Hide comment
@martlin2cz

martlin2cz Mar 13, 2018

I'm attaching mine save. The behaviour is simillar - game crashes after a few seconds. Seems like the AI tries to build something, but has no are where to place it since the map is "full".

before-crash-save.zip

martlin2cz commented Mar 13, 2018

I'm attaching mine save. The behaviour is simillar - game crashes after a few seconds. Seems like the AI tries to build something, but has no are where to place it since the map is "full".

before-crash-save.zip

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Mar 13, 2018

Member

What version of UH are you using? Have you tested it too with git master version?

Member

LinuxDonald commented Mar 13, 2018

What version of UH are you using? Have you tested it too with git master version?

@jmdejong

This comment has been minimized.

Show comment
Hide comment
@jmdejong

jmdejong May 6, 2018

Contributor

@martlin2cz Are you using a custom map in that save? I can't seem to load it because it's missing the map file m@rtlins-1island-100.sqlite
If that's the case, could you please upload that too?

Contributor

jmdejong commented May 6, 2018

@martlin2cz Are you using a custom map in that save? I can't seem to load it because it's missing the map file m@rtlins-1island-100.sqlite
If that's the case, could you please upload that too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment