davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
97 stars 25 forks source link

Assertion failed knife in the dark card played #241

Closed huwjenjinn closed 5 years ago

huwjenjinn commented 5 years ago

Played the knife in the dark card against a damaged (2 hits remained) warrior elite which was on a mine card. Game crashed with Assertion failed

formula_vm.cpp:455 ASSERTION FAILED: Assertion failed: entry=null or (entry.creature and not entry.creature.is_land) at in VIrtual Machine: At modules/citadel/data/classes/crypt.cfg 112: ...ntry.creature and not entry.creature.is_land) .......................................................^

I have a screen shot of the ---VM: output if that's of help? _Ignore the dots preceding the circumflex only there to push the pointer underneath "island"

ghost commented 5 years ago

[...] I have a screen shot of the ---VM: output if that's of help? [...]

Yes! I think it could be very helpful. It could help a possible association to any of issues 176 or 188.

huwjenjinn commented 5 years ago

Here it is:

screenshot from 2018-08-08 09-48-53 Alas I didn't run from console so no additional info this time.

Definitely looks like the same issue as 176 imo.

huwjenjinn commented 5 years ago

Just had another error in the same vein when I played the Royal Guard**** into my summoning area which already had a mine placed.

screenshot from 2018-08-08 12-24-00 screenshot from 2018-08-08 12-23-52

ghost commented 5 years ago

[...]

Definitely looks like the same issue as 176 imo.

Not at all sure. 176 reports "stuck". That "stuck" suggests server crash (1vsAI games are played against some type of AI server locally executed). When the local server of a 1vsAI game crash, the client application stays infinitely waiting for an answer that won't come.

An assertion error at the client (with subsequent client exit) suggests a probably different root cause.

Could you please confirm that you were using the self-updating client for this, using game data controlled by the self-updating client (1.0.683)? Or, in case you were using a Git controlled version for either the engine or the game itself, could you type the revs/commits you were using?

Just had another error in the same vein when I played the Royal Guard into my summoning area which already had a mine placed.

[...]

Definitely interesting, thanks.

ghost commented 5 years ago

Just had another error in the same vein when I played the Royal Guard into my summoning area which already had a mine placed.

[...]

Hopefully this would make it easier to reproduce and fix.

ghost commented 5 years ago

I tried to reproduce, but I don't get it. :cry:

It could be 1.0.683, judging data/classes/crypt.cfg:112.

huwjenjinn commented 5 years ago

Hi again, thanks for looking.

My version was downloaded directly from the website here: http://theargentlark.com/files/argentum-age.tar.bz2

It then updated itself (created an aa folder) and when run reports version number 1.0.683 as you picked up from the crypt.cfg file screenshot from 2018-08-08 15-54-40

If you'd like me to look at anything else please just ask.

huwjenjinn commented 5 years ago

Okay, have a complete logfile of a single game where this error occurred. See the attached log of the game I took from the console output. Note that the AI was playing the cards at the time of error in a campaign scenario.

argentumAge.log

ghost commented 5 years ago

Thanks again! I don't know how to reverse engineer a game out of console output. πŸ™

There's also such thing as a server log (server-log.txt), which records log from the local server for 1vsAI games, but gets rewritten each game. I don't know how to read that log either, but it can help the other developers.

Finally there are actual multiplayer matches, where some of the bugs might be easier to understand, and some others might be harder to understand. Multiplayer games are unequivocally identifiable by their sequence number, which you can find somewhere in the player info widget present at the main and sp/mp lobbies.

Hope you enjoy the game very much. πŸ°β³πŸ“œπŸŒ³πŸ‘ΌπŸ”ͺ

huwjenjinn commented 5 years ago

I'll post up that server-log.txt as soon as I can but it won't be the concomitant log for the argentumAge.log file I uploaded previously as it's already been overwritten. I'll also try and get a multiplayer match-up to produce the same message and post up what I can here.

As for the game, it's been excellent fun so thanks to all involved.

huwjenjinn commented 5 years ago

Not sure of the cause this time but another assertion error as above. This time I have the server log file (my naming convention as keeping unique copies of the server-log.txt just in case they are useful) server-log1808091556.log

ghost commented 5 years ago

[...] This time I have the server log file [...]

Here I'm sure to see both decks, so that's definitely something.

The whole game movements are probably logged, so that would be helpful. I can't replay a game out of this in a nice automated way, but that's probably feasible for the future.

I guess for many bugs just reading the last movements would be enough. But maybe hardest bugs could be found only by investigating full logs like this.

sapientN3T commented 5 years ago

After reviewing the log file, this appears to be a duplicate of bug #218.

@huwjenjinn please confirm if your version of /data/classes/creature.cfg was missing this line if(attacker.is_land, inflict_damage(game, damage), which should be at around line number 351, at the beginning of function inflict_combat_damage?

You may want to apply patch https://github.com/davewx7/citadel/commit/cabb65fcb935471e7e746e97b94b56b75732cdfb to the file data/classes/creature.cfg

While you are doing that, I suggest you also apply patch https://github.com/davewx7/citadel/commit/b9ab76ff3202812d18a8a80181eefa470009a233 to the file data/classes/game_state.cfg

@galegosimpatico I am not familiar with the distribution mechanisms, but I hope that somehow these fixes can be pushed to all the users. Thanks.

ghost commented 5 years ago

@galegosimpatico I am not familiar with the distribution mechanisms, but I hope that somehow these fixes can be pushed to all the users. Thanks.

I had a look at https://github.com/davewx7/citadel/commit/cabb65fcb935471e7e746e97b94b56b75732cdfb supposed to fix this (if I read it right) and think this is code not requiring a server restart. I could push this new code to the server.

I don't know how the Steam version clients are supposed to get that doc's update, can't implicitly take for granted the distribution rules applying to the previously existing binary clients distribution mechanism.

You would need an action from @davewx7, or at least a statement about auto update capabilities of the Steam version client.

I doubt Steam allows updating assets from 3rd parties content. Even if it did, it'd likely require correctly certified HTTPS comms, not yet ready in Anura, at least not deployed at the Argent Lark right now.

ghost commented 5 years ago

@sapientN3T marked this as duplicate of https://github.com/davewx7/citadel/issues/218, which was closed by him, the patch being distributed in 1.0.684, so we can close.