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

Random crashes on Win10 #2902

Open
Ittiz opened this Issue Feb 14, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@Ittiz
Copy link

Ittiz commented Feb 14, 2019

I seem to get random crashes. I don't know the source of the issue but I've provided the log. I've attached the bottom of the log files, the whole thing is too big for github:

S(t:464): (_move_tick,100801)
S(t:464): (_move_tick,104605)
S(t:464): (_move_tick,101041)
S(t:464): (_move_tick,100180)
S(t:464): (_move_tick,104078)
S(t:464): (_move_tick,102285)
S(t:464): (_move_tick,103568)
S(t:464): (_move_tick,104230)
S(t:464): (_move_tick,101042)
S(t:464): (_move_tick,102212)
S(t:464): (_move_tick,102124)
S(t:464): (_move_tick,101522)
S(t:464): (_move_tick,104838)
Deer(id=1000013;worldid=104838)(state=moving_to_target)(health=122): movement finished. calling callbacks ['<function Collector.begin_working at 0x03746300>']
Deer(id=1000013;worldid=104838)(state=moving_to_target)(health=122) begins working
S(t:464): (_move_tick,104555)
S(t:464): (_move_tick,101508)
S(t:464): (_move_tick,100807)
S(t:464): (_move_tick,100345)
S(t:464): (_move_tick,104781)
S(t:464): SchedCb(Callback(<bound method ProductionFinishedIconManager.__render_icon of <horizons.world.managers.productionfinishediconmanager.ProductionFinishedIconManager object at 0x19647970>>, (<horizons.world.ingametype.Building[25] object at 0x11C88D30>, 'produced_resource_21_1c83fba8-7ec1-4312-b7d5-0807f4c8bec5', 21, 1), {}) on <horizons.world.managers.productionfinishediconmanager.ProductionFinishedIconManager object at 0x19647970>)
Scheduler: finished tick 464
Scheduler: tick 465, cbs: 49
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x148A4E50>> on Production(state=producing;prodline=ProductionLineData(lineid=30)))
Production(state=producing;prodline=ProductionLineData(lineid=30)) finished
Production(state=producing;prodline=ProductionLineData(lineid=30)) _produce
Production(state=producing;prodline=ProductionLineData(lineid=30)) _produce Adding callback in 1440 time
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x1DAA8390>> on Production(state=producing;prodline=ProductionLineData(lineid=923331670)))
Production(state=producing;prodline=ProductionLineData(lineid=923331670)) finished
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x1029BFB0>> on Production(state=producing;prodline=ProductionLineData(lineid=2092896117)))
Production(state=producing;prodline=ProductionLineData(lineid=2092896117)) finished
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x11453030>> on Production(state=producing;prodline=ProductionLineData(lineid=17)))
Production(state=producing;prodline=ProductionLineData(lineid=17)) finished
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x0E682FF0>> on Production(state=producing;prodline=ProductionLineData(lineid=17)))
Production(state=producing;prodline=ProductionLineData(lineid=17)) finished
S(t:465): SchedCb(<bound method Production._finished_producing of <horizons.world.production.production.Production object at 0x0FA38AF0>> on Production(state=producing;prodline=ProductionLineData(lineid=1056282634)))
Production(state=producing;prodline=ProductionLineData(lineid=1056282634)) finished
S(t:465): SchedCb(<bound method Producer.update_capacity_utilization of <horizons.world.production.producer.Producer object at 0x11C738F0>> on Producer(owner: Hut(id=3;worldid=103512)(l:1;ihab:2;hap:53)))
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000009] object at 0x1E62B290>> on FieldCollector(id=1000009;worldid=102883)(state=idle))
FieldCollector(id=1000009;worldid=102883)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000008] object at 0x1E746710>> on StorageCollector(id=1000008;worldid=104341)(state=idle))
StorageCollector(id=1000008;worldid=104341)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000011] object at 0x1E52E6D0>> on SettlerCollector(id=1000011;worldid=102013)(state=idle))
SettlerCollector(id=1000011;worldid=102013)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000004] object at 0x1E5CCC50>> on Fisher(id=1000004;worldid=102497)(state=idle))
Fisher(id=1000004;worldid=102497)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000002] object at 0x1E6FD510>> on BuildingCollector(id=1000002;worldid=104070)(state=idle))
found path: [(39, 135), (38, 134)]
BuildingCollector(id=1000002;worldid=104070)(state=idle) prepares job Job(Clay Pit(id=25;worldid=103966), [ResListEntry(res=21, amount=1, target_inventory_full=False)])
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000002] object at 0x1E64B5D0>> on BuildingCollector(id=1000002;worldid=103052)(state=idle))
found path: [(14, 211), (15, 211), (16, 211), (17, 211)]
BuildingCollector(id=1000002;worldid=103052)(state=idle) prepares job Job(Clay Pit(id=25;worldid=102951), [ResListEntry(res=21, amount=1, target_inventory_full=False)])
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000004] object at 0x1E576590>> on Fisher(id=1000004;worldid=102243)(state=idle))
found path: [(208, 19), (209, 18)]
Fisher(id=1000004;worldid=102243)(state=idle) prepares job Job(Fish Deposit(id=33;worldid=5564), [ResListEntry(res=28, amount=1, target_inventory_full=True)])
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000009] object at 0x1E69F750>> on FieldCollector(id=1000009;worldid=103491)(state=idle))
FieldCollector(id=1000009;worldid=103491)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000011] object at 0x1E5FC290>> on SettlerCollector(id=1000011;worldid=102688)(state=idle))
found path: [(21, 211), (22, 211), (22, 210), (23, 210), (24, 210), (25, 210), (25, 211)]
SettlerCollector(id=1000011;worldid=102688)(state=idle) prepares job Job(Pavilion(id=5;worldid=102277), [ResListEntry(res=11, amount=1, target_inventory_full=True)])
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000008] object at 0x1E740590>> on StorageCollector(id=1000008;worldid=104332)(state=idle))
found path: None
StorageCollector(id=1000008;worldid=104332)(state=idle): found no possible job, retry in 32 ticks
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000008] object at 0x1E1B53B0>> on StorageCollector(id=1000008;worldid=101523)(state=idle))
found path: [(208, 191), (208, 192), (207, 192), (206, 192), (205, 192), (204, 192), (203, 192), (202, 192), (201, 192), (200, 192), (199, 192), (198, 192), (197, 192), (197, 191), (197, 190), (197, 189), (197, 188), (197, 187), (197, 186), (197, 185), (197, 184), (197, 183), (197, 182), (197, 181), (197, 180), (198, 180), (199, 180), (200, 180), (201, 180), (202, 180), (203, 180), (203, 179), (203, 178), (203, 177), (203, 176), (203, 175), (203, 174), (203, 173), (203, 172), (203, 171), (203, 170), (202, 170), (201, 170), (200, 170), (199, 170), (198, 170)]
StorageCollector(id=1000008;worldid=101523)(state=idle) prepares job Job(Lumberjack Hut(id=8;worldid=101628), [ResListEntry(res=4, amount=6, target_inventory_full=False)])
S(t:465): SchedCb(<bound method BuildingCollector.search_job of <horizons.world.ingametype.Unit[1000008] object at 0x1E503110>> on StorageCollector(id=1000008;worldid=101827)(state=idle))
found path: None
StorageCollector(id=1000008;worldid=101827)(state=idle): found no possible job, retry in 32 ticks
S(t:465): (_move_tick,100007)
Huker(id=1000001;worldid=100007): movement finished. calling callbacks ['Callback(<bound method FoundSettlement._reached_destination_area of <horizons.ai.aiplayer.mission.foundsettlement.FoundSettlement object at 0x210DD290>>, (), {})']
AI(Paulo da Gama/5) FoundSettlement(104812) using Huker(id=1000001;worldid=100007) reached BO area
Build: building type 1 at (121,103)
Traceback (most recent call last):
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\run_uh.py", line 381, in
main()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\run_uh.py", line 122, in main
ret = horizons.main.start(options)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\main.py", line 255, in start
horizons.globals.fife.run()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 279, in run
self.loop()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\engine\engine.py", line 296, in loop
f()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\timer.py", line 112, in check_tick
f(self.tick_next_id)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\scheduler.py", line 95, in tick
callback.callback()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\units\ship.py", line 110, in _move_tick
super()._move_tick(resume)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\units\movingobject.py", line 207, in _move_tick
self._movement_finished()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\units\ship.py", line 131, in _movement_finished
super()._movement_finished()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\units\movingobject.py", line 159, in _movement_finished
self.move_callbacks.execute()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\util\python\weakmethodlist.py", line 52, in execute
callback()
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\util\python\weakmethod.py", line 39, in call
return self.function(*args, **kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\util\python\callback.py", line 48, in call
return self.callback(*self.args, **self.kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\ai\aiplayer\mission\foundsettlement.py", line 93, in _reached_destination_area
self.warehouse = builder.execute(self.land_manager, ship=self.ship)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\ai\aiplayer\basicbuilder.py", line 86, in execute
result = cmd(land_manager.owner)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\command\building.py", line 118, in call
**self.data
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\building\storages.py", line 81, in init
super().init(*args, **kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\building\storages.py", line 40, in init
super().init(x=x, y=y, owner=owner, instance=instance, **kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\building\buildingresourcehandler.py", line 32, in init
super().init(island=island, **kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\resourcehandler.py", line 72, in init
super(ResourceHandler, self).init(**kwargs)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\building\building.py", line 73, in init
self.settlement = self.island.add_settlement(self.position, self.radius, owner)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 212, in add_settlement
self.add_existing_settlement(position, radius, settlement)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 225, in add_existing_settlement
self.assign_settlement(position, radius, settlement)
File "D:\Program-Files\Unknown-Horizons\unknown-horizons\horizons\world\island.py", line 262, in assign_settlement
assert building_tile.settlement is None
AssertionError

@LinuxDonald

This comment has been minimized.

Copy link
Member

LinuxDonald commented Feb 14, 2019

@jmdejong an idea?

@jmdejong

This comment has been minimized.

Copy link
Contributor

jmdejong commented Feb 14, 2019

I have the feeling that I've seen problems with this code before, but maybe I just had a hard time wrapping my head around it when trying to understand the savegame structure.

The problem is that all tiles of a building should always have the same owner as the building itself.
Here is situation where that is not the case.
The specific trigger in this case is the AI building or expanding a settlement

@Ittiz What kind of map are you playing? a random map or a scenario?
Have you started from a saved game or are you does this happen the first time you play a new map?

@jmdejong jmdejong added the B-bug label Feb 14, 2019

@Ittiz

This comment has been minimized.

Copy link
Author

Ittiz commented Feb 14, 2019

A random map with 7 players. I've had the game randomly crash several times. It happened the first time without me loading from save. Also after loading from a save too. Then it's been happening every subsequent time less than a minute after I load from the last save. Like the last time I saved it what ever causes the crash was already set in motion. I've attached the game save if you're interested in trying to pick it apart.

GameSave.zip

@jmdejong

This comment has been minimized.

Copy link
Contributor

jmdejong commented Feb 14, 2019

I can reproduce the crash with that savegame; it's not just windows.

I suspect that this problem is rare when there are few players, but with many players it gets more likely to trigger.

@Ittiz

This comment has been minimized.

Copy link
Author

Ittiz commented Feb 14, 2019

Yeah I played around with the game save and it seems one of the AI players is trying to build a town too near the the player's buildings. I found if I quickly build an outpost in the area so he can't build his town there and he moves on somewhere else and the crash is avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.