Page 1 of 1

Game crashes

PostPosted: 06 Dec 2008, 04:47
by juzamjedi
This traceback is a little different. It happened when I tried to play Salvage Titan. It allowed me to select whether I wanted to pay the cost or sacrifice 3 artifacts. I had no artifacts so I selected to pay the cost and then the game crashed with this traceback.

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 390, in playSpells
  File "game\GameKeeper.pyo", line 401, in playStackSpells
  File "game\Action.pyo", line 95, in perform
  File "game\Ability\Ability.pyo", line 14, in announce
  File "game\Ability\CastingAbility.pyo", line 12, in do_announce
  File "game\Ability\ActivatedAbility.pyo", line 21, in do_announce
  File "game\Ability\Cost.pyo", line 533, in precompute
  File "game\Ability\Cost.pyo", line 514, in precompute
AttributeError: 'str' object has no attribute 'precompute'

Re: Game crashes

PostPosted: 06 Dec 2008, 18:43
by MageKing17
It was a typo in Sedris' code ('abilities.add' instead of 'card.abilities.add'). I've corrected it, the fix will be in the next release.

Re: Game crashes

PostPosted: 07 Dec 2008, 02:00
by juzamjedi
Demolish also causes the game to crash when I try to play it. There are some valid land targets, but no artifact targets. Here is the traceback:

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 385, in playSpells
  File "game\GameKeeper.pyo", line 401, in playStackSpells
  File "game\Action.pyo", line 95, in perform
  File "game\Ability\Ability.pyo", line 14, in announce
  File "game\Ability\CastingAbility.pyo", line 12, in do_announce
  File "game\Ability\ActivatedAbility.pyo", line 22, in do_announce
  File "game\Ability\Ability.pyo", line 29, in get_targets
  File "game\Ability\ActivatedAbility.pyo", line 35, in _get_targets_from_effects
  File "<string>", line 17, in effects
NameError: global name 'isArtifict' is not defined

Re: Game crashes

PostPosted: 07 Dec 2008, 03:51
by juzamjedi
"Cunning Lethemancer" also causes a crash. Pity because I really like that card. Here is the traceback:

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 96, in run
  File "game\GameKeeper.pyo", line 236, in upkeepStep
  File "game\GameKeeper.pyo", line 407, in playInstantaneous
  File "game\GameKeeper.pyo", line 414, in playStackInstant
  File "game\GameKeeper.pyo", line 425, in continuePlay
  File "game\Stack.pyo", line 29, in process_triggered
  File "game\Ability\Ability.pyo", line 14, in announce
  File "game\Ability\TriggeredAbility.pyo", line 13, in do_announce
  File "game\Ability\Effects.pyo", line 71, in robustApply
TypeError: effects() takes exactly 3 non-keyword arguments (2 given)

Re: Game crashes

PostPosted: 07 Dec 2008, 04:26
by MageKing17
Avoid double-posting... you can edit your post instead, and it's less annoying.

Demolish: Simple typo. You can see in your own traceback it says "'isArtifict' is not defined". The correct class is isArtifact, obviously. Fixed, and (as always) the fix'll be in the next release.

Cunning Lethemancer: Another typo (of sorts... the function wanted a keyword argument the trigger didn't have). Fixed as well.

Re: Game crashes

PostPosted: 13 Dec 2008, 07:41
by juzamjedi
Underground River causes this crash; I also confirmed this with Karplusan Forest.

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 390, in playSpells
  File "game\GameKeeper.pyo", line 401, in playStackSpells
  File "game\Action.pyo", line 95, in perform
  File "game\Ability\Ability.pyo", line 14, in announce
  File "game\Ability\CastingAbility.pyo", line 12, in do_announce
  File "game\Ability\ActivatedAbility.pyo", line 23, in do_announce
  File "game\Ability\Cost.pyo", line 107, in compute
  File "game\Player.pyo", line 504, in getMoreMana
  File "game\Action.pyo", line 113, in perform
  File "game\Ability\Ability.pyo", line 15, in announce
  File "game\Ability\ActivatedAbility.pyo", line 56, in played
  File "game\Ability\Ability.pyo", line 42, in resolve
  File "<string>", line 33, in effects
AttributeError: '_Permanent' object has no attribute 'deal_damage'

Re: Game crashes

PostPosted: 15 Dec 2008, 14:45
by The Scientist
I checked out the underground river code. there's no yield after the damage dealing code.
And obv other 10th lands will have the same issue since they are probably copied.

Re: Game crashes

PostPosted: 17 Dec 2008, 09:20
by MageKing17
Although that's not what the crash was. It looks like 0.52 didn't have "deal_damage", but we'd started changing cards to use it already.

Re: Game crashes

PostPosted: 17 Dec 2008, 09:53
by The Scientist
Yeah I figured it was the deal_damage not being implemented at that point, but the yield needed to be added anyways.

Re: Game crashes

PostPosted: 22 Dec 2008, 05:46
by juzamjedi
Entomb causes this crash. By the way, would it be easy to have "last card played" as part of the traceback?

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 388, in playSpells
  File "game\Stack.pyo", line 40, in resolve
  File "game\Ability\Ability.pyo", line 40, in resolve
  File "<string>", line 19, in effects
  File "game\CardRoles.pyo", line 69, in move_to
  File "game\stacked_function.pyo", line 140, in __call__
  File "game\stacked_function.pyo", line 8, in logical_and
  File "game\stacked_function.pyo", line 8, in <lambda>
  File "game\stacked_function.pyo", line 57, in <lambda>
  File "game\GameObjects.pyo", line 94, in move_to
AttributeError: 'str' object has no attribute 'move_card'

Re: Game crashes

PostPosted: 22 Dec 2008, 08:34
by MageKing17
juzamjedi wrote:Entomb causes this crash. By the way, would it be easy to have "last card played" as part of the traceback?

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 388, in playSpells
  File "game\Stack.pyo", line 40, in resolve
  File "game\Ability\Ability.pyo", line 40, in resolve
  File "<string>", line 19, in effects
  File "game\CardRoles.pyo", line 69, in move_to
  File "game\stacked_function.pyo", line 140, in __call__
  File "game\stacked_function.pyo", line 8, in logical_and
  File "game\stacked_function.pyo", line 8, in <lambda>
  File "game\stacked_function.pyo", line 57, in <lambda>
  File "game\GameObjects.pyo", line 94, in move_to
AttributeError: 'str' object has no attribute 'move_card'
I have no idea, but as long as you're nice and keep providing it, we don't really need it, do we? ;P

Also, I have no idea why Entomb would cause that crash... unless post-0.52 card code was being used in 0.52. Again. As with the deal_damage crash.

Re: Game crashes

PostPosted: 23 Dec 2008, 13:06
by juzamjedi
Sift causes this crash.

How am I supposed to abuse the Demigod of Revenge if there aren't good cards that help me put him in the graveyard? #-o

Code: Select all
Traceback (most recent call last):
  File "main.py", line 7, in <module>
  File "ui\Incantus.pyo", line 778, in main
  File "ui\Incantus.pyo", line 656, in run
  File "game\GameKeeper.pyo", line 77, in start
  File "game\GameKeeper.pyo", line 97, in run
  File "game\GameKeeper.pyo", line 243, in mainPhase1
  File "game\GameKeeper.pyo", line 388, in playSpells
  File "game\Stack.pyo", line 40, in resolve
  File "game\Ability\Ability.pyo", line 40, in resolve
  File "<string>", line 18, in effects
TypeError: draw() takes exactly 1 argument (2 given)

Re: Game crashes

PostPosted: 23 Dec 2008, 20:17
by MageKing17
Well, it turns out that one was an honest-to-goodness bug, which I just fixed. So not all of your problems were caused by having the wrong version for the card code. :P

I hope to be able to release a new version soon, but I won't do it until a few certain problems have been fixed, so you'll just have to hang on and anxiously anticipate zany copy effects. :P