• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How can this crash?

Status
Not open for further replies.
Level 5
Joined
May 12, 2014
Messages
133
So I've been having major issues with my map where it would randomly crash. After countless tests, I've located it in 2 very similar spells within my map. They both involve the use of a morph ability. The issue is, the crashes happen randomly when the hero is ingame AND the crashing spell is active.

tl:dr How does this crash? How can I improve it/stop it from crashing?
The dummy spell is based on Bear Form.

  • Red Lightning
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(bearform))
    • Actions
      • Set Red_Lightning_Loop_Max = (Red_Lightning_Loop_Max + 1)
      • Set Red_Lightning_C[Red_Lightning_Loop_Max] = (Ordered unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Red_Lightning_Loop_Max Equal to 1
        • Then - Actions
          • Trigger - Turn on Red Lightning Loop <gen>
        • Else - Actions
  • Red Lightning Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Red_Lightning_Loop) from 1 to Red_Lightning_Loop_Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of Red_Lightning_C[Red_Lightning_Loop]) Less than 1.00
            • Then - Actions
              • Unit - Order Red_Lightning_C[Red_Lightning_Loop] to Night Elf Druid Of The Claw - Night Elf Form
              • Unit - Remove Red Lightning buff from Red_Lightning_C[Red_Lightning_Loop]
              • Set Red_Lightning_C[Red_Lightning_Loop] = Red_Lightning_C[Red_Lightning_Loop_Max]
              • Set Red_Lightning_Loop = (Red_Lightning_Loop - 1)
              • Set Red_Lightning_Loop_Max = (Red_Lightning_Loop_Max - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Red_Lightning_Loop_Max Equal to 0
                • Then - Actions
                  • Trigger - Turn off Red Lightning Loop <gen>
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of Red_Lightning_C[Red_Lightning_Loop]) Not equal to Guard of Renewal (Red Lightning)
                • Then - Actions
                  • Unit - Remove Red Lightning buff from Red_Lightning_C[Red_Lightning_Loop]
                  • Set Red_Lightning_C[Red_Lightning_Loop] = Red_Lightning_C[Red_Lightning_Loop_Max]
                  • Set Red_Lightning_Loop = (Red_Lightning_Loop - 1)
                  • Set Red_Lightning_Loop_Max = (Red_Lightning_Loop_Max - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Red_Lightning_Loop_Max Equal to 0
                    • Then - Actions
                      • Trigger - Turn off Red Lightning Loop <gen>
                    • Else - Actions
                • Else - Actions
 
Level 5
Joined
May 12, 2014
Messages
133
I already know that's not the problem. The dependency equivalent is one way.
Base Hero => Morph Hero
As a side note, the game never crashes if the shown triggers are disabled.
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
I already know that's not the problem. The dependency equivalent is one way.
Base Hero => Morph Hero
As a side note, the game never crashes if the shown triggers are disabled.

I wouldn't dismiss an object editor issue just yet.
Try these 2 things.
> Set the dependency equivalents to nothing.
> Try to morph the unit manually and see if it crashes.
 
Level 5
Joined
May 12, 2014
Messages
133
I wouldn't dismiss an object editor issue just yet.
Try these 2 things.
> Set the dependency equivalents to nothing.
> Try to morph the unit manually and see if it crashes.

The morph can be done manually. It's like using immolation. You can toggle on/off all you want, but once your mana is 0, you're forced to off (the trigger is for forcing off). I'll have to try that set to nothing trick later, because right now I have school. :)

- it's hero to hero
- hover to hover (move type)
I'll be sure to slap a picture on after classes. Also, isn't that what the gargoyle does? He switches between air and ground pretty freely doesn't he?
 
Level 11
Joined
Dec 19, 2012
Messages
411
Crow form is specially made for making a ground unit morph to fly unit, so it should be an exception from my statement. If your morphing doesn't morph from ground to air, it should be fine.

Its hard to tell whether using crow form will solve the game crash as you mentioned. All depends on how you set your data.

As I previously mentioned, a test map containing the crash problem (preferable) or a picture containing the configuration data inside OE (for 2 morph ability) would help more.
 
Level 11
Joined
Jun 2, 2013
Messages
613
My guess is because you are altering the variable that the for loop is using. If you are running the trigger every 0.2 seconds and you had just changed the loop max integer from 1 to 0, and then the for loop runs again, it basically will do 'for each integer from 1 to 0 do actions', which may be what crashes.

I actually don't see why you need a for loop for this to work; since the trigger is running every 0.20 seconds, you should just be able to use the If/Then/Else Statements
 
Level 5
Joined
May 12, 2014
Messages
133
My guess is because you are altering the variable that the for loop is using. If you are running the trigger every 0.2 seconds and you had just changed the loop max integer from 1 to 0, and then the for loop runs again, it basically will do 'for each integer from 1 to 0 do actions', which may be what crashes.

I actually don't see why you need a for loop for this to work; since the trigger is running every 0.20 seconds, you should just be able to use the If/Then/Else Statements

I can see where you're coming from. I should probably try setting up a Red Lightning Disable trigger or something. I actually need the loop because there are plans for multiple of this hero. (Yes, I realize that many of the triggers aren't MUI, but I'm working on it!)

I attached a copy of the current version of my map. As mentioned in the first post, there are actually 2 spells that are very alike (They are both also crashing(?)). The spells in question can be found
Custom Abilities -> Human -> Heroes
attachment.php


The heroes with the (maybe?) crashing spells are Charon and Razor. They can be found
Custom Units -> Human -> Heroes/Specials for their normal/morphed forms.
attachment.php

Razor is the Guard of Renewal, he looks like a Lightning Revenant.
Charon is the Dead Guide, he looks like Ghost Kel'thuzad.
I moved the concerning triggers into a folder called "PROBLEM TRIGGERS?"

Crow form is specially made for making a ground unit morph to fly unit, so it should be an exception from my statement. If your morphing doesn't morph from ground to air, it should be fine.

Its hard to tell whether using crow form will solve the game crash as you mentioned. All depends on how you set your data.

As I previously mentioned, a test map containing the crash problem (preferable) or a picture containing the configuration data inside OE (for 2 morph ability) would help more.

Oh, and the second spell for Charon is actually changing him from ground unit to air. However, the game doesn't crash immediately when the spell is activated, but at a random time when he is ingame. Maybe it's because the "air" unit has a height of 0?

Thank you to anyone that's helped and anyone is continuing/willing to help. Once I find all of these ridiculous crashes, the map development is definitely getting a new map added!
 

Attachments

  • Hero Locations.png
    Hero Locations.png
    104.5 KB · Views: 169
  • Spell Locations.png
    Spell Locations.png
    136.4 KB · Views: 178
  • Final Fight Enhanced v0.8b.w3x
    5.6 MB · Views: 91
Level 5
Joined
May 12, 2014
Messages
133
I'm fairly certain that's where the crash is from. However, I am but a noob. Every time these two heroes are in a playthrough, the game crashes. It could be the spells that synergize with these morph spells.
Razor's Quasar Strike (E) spell will apply the effect of red lightning if it's on.
Charon's Ghost Ride ( morph spell) gives him access to 2 new spells.

The reason I posted the map is because I could be completely wrong, and it could be something else instead involved with these heroes.
 
Level 5
Joined
May 12, 2014
Messages
133
Here's the latest crash log that I found. I was playing as Razor in this game.

EDIT: At the exact moment of this crash, I died while in Red Lightning Form to the bleed effect of a miniboss. Is this possible one source of game crashes?

Every time the vampire bat attacks a unit and damages it, it applies a bleed effect that reduces hp by 2 every second for 15 seconds. Stacks additively. Additionally, nearby vampires also gain a bloodlust effect while near a bleeding unit.

  • Vampire Bat Fangs
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to |cff0000ff[Commander]|r Vampire Bat (Wave 8)
      • DamageEventType Equal to 0
    • Actions
      • Special Effect - Create a special effect attached to the origin of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + 10.00)
      • Set Fang_Loop_Max = (Fang_Loop_Max + 1)
      • Set Fang_T[Fang_Loop_Max] = DamageEventTarget
      • Set Fang_Tick[Fang_Loop_Max] = 15
      • Set Fang_Timer[Fang_Loop_Max] = 1.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fang_Loop_Max Equal to 1
        • Then - Actions
          • Trigger - Turn on Vampire Bat Fangs Loop <gen>
        • Else - Actions
      • -------- Blood Scent Effect --------
      • Set TASability = Vampire Bat (Blood Frenzy Debuff)
      • Set TASunit = DamageEventTarget
      • Set TASduration = 15.00
      • Set TASrefresh = True
      • Set TASmaxstack = 1
      • Trigger - Run Timed AS <gen> (ignoring conditions)
  • Vampire Bat Fangs Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Fang_Loop) from 1 to Fang_Loop_Max, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Fang_T[Fang_Loop] is alive) Not equal to True
            • Then - Actions
              • Set Fang_Tick[Fang_Loop] = 0
            • Else - Actions
              • Set Fang_Timer[Fang_Loop] = (Fang_Timer[Fang_Loop] - 0.20)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Fang_Timer[Fang_Loop] Less than or equal to 0.00
                • Then - Actions
                  • Set Fang_Timer[Fang_Loop] = 1.00
                  • Set Fang_Tick[Fang_Loop] = (Fang_Tick[Fang_Loop] - 1)
                  • Unit - Set life of Fang_T[Fang_Loop] to ((Life of Fang_T[Fang_Loop]) - 2.00)
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Fang_Tick[Fang_Loop] Less than or equal to 0
            • Then - Actions
              • Set Fang_T[Fang_Loop] = Fang_T[Fang_Loop_Max]
              • Set Fang_Tick[Fang_Loop] = Fang_Tick[Fang_Loop_Max]
              • Set Fang_Timer[Fang_Loop] = Fang_Timer[Fang_Loop_Max]
              • Set Fang_Loop = (Fang_Loop - 1)
              • Set Fang_Loop_Max = (Fang_Loop_Max - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Fang_Loop_Max Less than or equal to 0
                • Then - Actions
                  • Trigger - Turn off Vampire Bat Fangs Loop <gen>
                • Else - Actions
            • Else - Actions
 

Attachments

  • 2016-01-16 13.22.33 Crash.txt
    13.7 KB · Views: 71
Level 5
Joined
May 12, 2014
Messages
133
i know this code.
from dump I can see 2DxZ this ID (it's reversed, real ID = ZxD2)
somewhere unit receives/increases level/lose this ability via trigger while being dead
some abilities causes crash when edited while unit is dead. check out for this ID and add condition to not manipulate it while target isn't alive

Will you marry me?
Turns out the two heroes that were giving me headaches left and right had like 3 spells that were triggered to upgrade other spells.
  • Red Lightning Upgraded
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Razor 2 (Red Lightning)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Razor 2 (Red Lightning) for (Triggering unit)) Equal to 1
        • Then - Actions
        • Else - Actions
          • Player - Set the current research level of Razor (Red Lightning) to ((Current research level of Razor (Red Lightning) for (Triggering player)) + 1) for (Triggering player)
His spell Quasar Strike actually created a dummy unit that used this upgrade. So upgrading this spell right after the dummy unit died crashed. I tested this with every hero that ever crashed the game, and the same story applies to them all. OMG YOU JUST FOUND LIKE EVERY SINGLE CRASH IN MY MAP.
 
Status
Not open for further replies.
Top