freeserf.net
freeserf.net copied to clipboard
Crash
Hi, The game crashed for the first time after many hours of play time. There may have been a fight going on, There was no error message. Is there any log file and/or auto save file?
I believe I was scrolling when it happened.
I dont know if it is the same crash but the attached save game crashes after about 35 seconds on maximum speed. quicksave-12-02-22-13-00-08.zip .
Thank you for all your reportings. At the moment my time is very limited and I work on several other projects, but I will have a look at it when I have some time on hand.
No problem. I understand your situation. Thank you very much for the excellent work on this clone! The game is very much playable and I enjoy it a lot.
I got a new crash in a new game. I got the feeling that this is directly or indirectly related to fights.
This game crashes after a few seconds on maximum speed quicksave-13-02-22-18-53-09.zip .
After the first crash ("Not reached") there is a second different crash ("Not inventory").
For the first crash maybe this is missing in HandleSerfEnteringBuildingState() in serf.cs at line 5702 case Building.Type.Castle: nextState = State.DefendingCastle; break;
The second crash happens when a pig transportation is aborted due to road demolition caused by enemy occupying a building. The pig is going to the castle but the castled is not marked as having an inventory, it stocks fish. edited
I believe I found the root cause of the two crashes mentioned just above (but not the original crash of this thread). Building.KnightRequestGranted() is called for castles and thereby destroys the castle inventory flag (stock[0].requested=0xff).
If you want I will try to create a pull request with a fix. I am new to GitHub but have used git locally.
Regarding the first crash of this thread. Somehow player1.castle.firstknight=0. Serf 0 belongs to player 0 and is of type none. I guess somehow firstknight got corrupt somewhere, I will do some digging.