It is currently 18 Apr 2024, 17:25
   
Text Size

Something in Beknighted seems to cause crashes

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 31 May 2012, 21:52

This can't be a coincidence anymore. I've had 3 situations now. Here's the story:

I was playing vs Beknighted (AI in all cases) (I had played a few games against other AI before, in the same session), when suddenly after quite some turns, a crash. Since DotP isn't exactly well-coded and I've had some random crashes before, I didn't think much of it. I restarted, played vs Beknighted again, and this time I had a crash pretty soon. I waited for about 5 minutes, tried again, and this time it worked well. Played some more games against other AI, and quitted for some hours. After that, I played DotP again, played vs some AI, then Beknighted again, and quite soon: crash!

It everytime happened right before she'd play a card. It's either a 1- or 2-mana card, or a Plains (I think it's a Plains, as one crash happened when she had only one Plains out from the previous turn. I doubt it she ran out already, and the AI always starts with a land if the AI has one). At least, if my hunch is correct and it's the same card everytime.

Does anyone know here what could be the problem?
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby thefiremind » 31 May 2012, 22:15

Can you check if the game produced a MOTHER.TXT file? When the game crashes, it doesn't pop up automatically, but it could have been produced anyway.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 01 Jun 2012, 18:29

There's indeed a MOTHER.TXT. I haven't played the game since the final crash, so it should be about the crash. I see tons of Benalish Cavalry in it (a card she never had in play). Seems weird to me since it only has an effect for battling and the game even crashed at 1 Plains once (me talking about a 2-mana card was an accident). I haven't seen other Flanking creatures either, so no idea if it's card-specific or Flanking-specific. Here are the contents:

[lua] [string "BENALISH_CAVALRY_122082_TITLE (CONTINUOUS_ACTION) [192124A0]"]:2:
parameter mismatch or too few parameters [expected bzS32]

It has this line 46 times in total, if I counted correctly (all lines are the same if I saw correctly)
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby thefiremind » 01 Jun 2012, 21:51

I checked Benalish Cavalry and I can't see anything wrong in the code. I paste it here for reference:
Code: Select all
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flanking]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Flankenangriff]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Débordement]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Flanquea.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Aggirare]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[側面攻撃]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION>
    Object():GetCurrentCharacteristics():Badge_Set( BADGE_FLANKING )
    </CONTINUOUS_ACTION>
    <AI_BASE_SCORE score="300" zone="in_play" />
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY layer="7C">
    <TRIGGER value="WAS_BLOCKED_BY">
    return TriggerObject() == Object() and (SecondaryObject():GetCurrentCharacteristics():Badge_Test(BADGE_FLANKING) == 0)
    </TRIGGER>
    <CONTINUOUS_ACTION>
    SecondaryObject():GetCurrentCharacteristics():Power_Add( -1 )
    SecondaryObject():GetCurrentCharacteristics():Toughness_Add( -1 )
    </CONTINUOUS_ACTION>
    <DURATION>
    return (MTG():GetStep() == STEP_CLEANUP)
    </DURATION>
  </TRIGGERED_ABILITY>
The error in MOTHER.TXT seems to suggest that the game doesn't recognize BADGE_FLANKING as a known constant... but why should it happen only on Benalish Cavalry? That constant is used in all the creatures with flanking.

When the game doesn't crash, does the flanking ability work as intended for you?

(By the way, does anybody know where BADGE_FLANKING is defined as 30? There's no FUNCTIONS directory in the official DLC's except in the core.)
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 01 Jun 2012, 22:34

I just discovered it's Flanking in general. Decided to use Beknighted myself (never used it before) and played Zhalfirin Commander. The game still worked well, but when I ended my turn and the AI's turn began (vs Sorin Markov), right in the middle of drawing a card, the game crashed. Since the game crashes at such weird moments (Benalish Cavalry when the AI didn't even have enough mana but was about to have enough, and now Zhalfirin Commander right when the AI's turn starts), my hunch is that it crashes as soon as the AI makes calculations on how to play, when a Flanking creature comes in the equation.

Once again MOTHER.TXT has tons of references (even more this time, didn't count them), this time with the Commander of course:

[lua] [string "ZHALFIRIN_COMMANDER_243430_TITLE (CONTINUOUS_ACTION) [1771AE28]"]:2:
parameter mismatch or too few parameters [expected bzS32]
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby thefiremind » 01 Jun 2012, 23:24

It really seems that somehow your definition of BADGE_FLANKING got lost. If I knew where it's defined it would be easier to help you.

I made a DLC that only contains a LOL file with the following line:
Code: Select all
BADGE_FLANKING = 30
Try to extract the attached ZIP file in your DotP2012 directory and see if you crash again.

EDIT: As I see the number of downloads growing up, I think it's better if I leave a little clarification: this fix is exclusive for GamerXYZ0 whose deck packs seem to miss some critical parts. It's not a crash that anyone could experience, so if you don't crash while playing with (or against) creatures with flanking, you don't need this. :wink:
Attachments
Data_DLC_0030.zip
Attempt to fix flanking crash
(3.34 KiB) Downloaded 367 times
Last edited by thefiremind on 02 Jun 2012, 00:12, edited 1 time in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 01 Jun 2012, 23:52

It appears to be fixed now, didn't have a crash anymore since then (I haven't battled vs Beknighted yet as there's no certainty she'd use a Flanking creature, but when I use Flanking myself it works fine). I've furthermore ran some tests to confirm Flanking works right for the rest (I know that doesn't have anything to do with that badge value, but just to be sure in case the problem turns out more than that):

AI seems to properly acknowledge Flanking, as Sorin had a 4/4 Vampire Outcasts on the field, but refused to block the Commander with it since I could pump it to 3/3 (and a 4/4 Lifelink is better than a 2/2 Flanking with a high-cost pump effect). And Flanking indeed works fine, as I discovered vs Karn (did the test against him to ensure my creature would actually get blocked).

So, absolutely no more problems anymore. Thank you very much!

P.s. could it have anything to do with a previous problem of mine that the deckpack decks didn't have their text before (IIRC, you were the one who gave me the file to fix that), considering Flanking is a deckpack-exclusive ability? If so, anymore problems I could have?
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby thefiremind » 02 Jun 2012, 00:03

GamerXYZ0 wrote:P.s. could it have anything to do with a previous problem of mine that the deckpack decks didn't have their text before (IIRC, you were the one who gave me the file to fix that), considering Flanking is a deckpack-exclusive ability? If so, anymore problems I could have?
I didn't remember it was you who had that problem... but I don't know what to answer, since both times it was something I would never have expected. One thing is sure: the two problems are connected. If you face another problem, come back here and we'll see what to do. :wink:

Just for curiosity, do you see the badge on the creatures with flanking? It should be an icon with two arrows that point to a horizontal line. If you miss it, I don't know where to find it, though... as for the definition of that constant, I don't know where the game keeps it, and while I could reproduce the constant definition by myself, I can't reproduce the badge graphics. :lol:
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 02 Jun 2012, 00:24

No symbol is present. Fortunately, I never pay attention to those symbols anyway.
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby Aarala » 02 Jun 2012, 08:33

If the game is the steam version it might not have downloaded the DLC correctly. You can always right click m12, properties, local files, verify integrity of game cache. However I have noticed for myself and my cousin it always seems it hasn't completely verified and has to redownload a file every time you select it. As long as you've verified 1 or 2 times then its not the issue.
Aarala
 
Posts: 15
Joined: 15 May 2012, 02:28
Has thanked: 1 time
Been thanked: 0 time

Re: Something in Beknighted seems to cause crashes

Postby GamerXYZ0 » 03 Jun 2012, 22:49

I think I've caught another problem. I say "I think" because the card in question hasn't been used yet, and the game hasn't crashed since the Flanking fix.

I just closed the game, and suddenly MOTHER.TXT pops up (which it never did before), with the following line twice (hadn't used Beknighted myself this session, but I did battle Beknighted once, without problems AFAIK):

[lua] [string "IONAS_JUDGMENT_197880_TITLE (RESOLUTION_TIME_ACTION) [18C4E2B8]"]:2: attempt to index a nil value
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Something in Beknighted seems to cause crashes

Postby thefiremind » 04 Jun 2012, 08:25

This is not a problem of yours: I looked at the code and this card doesn't check if the target is nil before pointing it. I'll report it in the core bug fixes topic.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times


Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 22 guests

Login Form