• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Crash when hero casts an ability

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2012
Messages
116
Hello! As the title says, Warcraft crashes when my Hero casts an ability. I put the trigger to tell me if something there causes the problem.


  • Ground Trap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ground Trap
    • Actions
      • Set GT_Point = (Target point of ability being cast)
      • Set GT_Group = (Units within (150.00 + (50.00 x (Real((Level of Ground Trap for (Triggering unit)))))) of GT_Point matching ((Owner of (Matching unit)) Equal to Player 7 (Green)))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in GT_Group and do (Unit - Cause (Triggering unit) to damage (Picked unit), dealing (30.00 x (Real((Level of Ground Trap for (Triggering unit))))) damage of attack type Spells and damage type Normal)
      • Special Effect - Create a special effect at GT_Point using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Ground Trap Dummy for (Triggering player) at GT_Point facing Default building facing degrees
      • Set GT_Dummy = (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to GT_Dummy
      • Unit - Add GT Slow to GT_Dummy
      • Unit - Order GT_Dummy to Human Mountain King - Thunder Clap
      • Custom script: call RemoveLocation(udg_GT_Point)
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Are you sure this is the reason? Only think I could think about is... an infinite loop, if the
  • Unit - Order GT_Dummy to Human Mountain King - Thunder Clap
runs this trigger, and then run itself over and over.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I mean, if the Ability the Dummy is Casting is the same than the one required to trigger this, that would cause an inifite loop. But that's not the case here.

I can't see any reason for this trigger to crash the game. Are you really really sure that this trigger is the reason for the crash?
 
Level 4
Joined
Aug 26, 2012
Messages
123
Just something I wanna to ask...
1. Do you really define that it's for Player 7, not the enemy/ally?
(if that player is special, ignore that question...)

2. I'm sure there's some telling about leaks on unit group do action... You sure don't want to use (do multiple actions)?
(Some says it's leaky, but I've never tried that....)

3. I don't know, but is (triggering player) is the same value as (owner of triggering unit)?
(Yeah, he's not know, that's why he ask...)

4. Spartpilio's idea... does the Ground Trap's orderID is the same as GT_Slow?
(Just to make sure...)
 
Level 8
Joined
Oct 26, 2008
Messages
387
Well the case i believe is what Spartipilo said, but not quite right..

  • Unit - Add GT Slow to GT_Dummy
  • Unit - Order GT_Dummy to Human Mountain King - Thunder Clap
I am assuming that the "GT Slow" is based in Thunder Clap?
If so, then the case of the infite loop isnt correct, do you have perhaps some other triggers or scripts in your map?
 
Level 5
Joined
Jan 5, 2012
Messages
116
Well, I read everything you told me and tried things. I'm sure this is the trigger that causes the problem but I forgot to mention something important I think.
The game crashes only when I cast the ability on enemy units(Player 7), when I cast it on the ground or allied units it doesn't crash the game.

GT Slow is based on Thunder Clap and Ground Trap is based on Flame Strike, so I think they have different orderIDs.

I'd also like to point out that it seems like an infinite loop since the game starts lagging so hard for like 2-3 seconds and then crashes. That's all, hope you can help me out now :D
 
Level 8
Joined
Oct 26, 2008
Messages
387
Well, I read everything you told me and tried things. I'm sure this is the trigger that causes the problem but I forgot to mention something important I think.
The game crashes only when I cast the ability on enemy units(Player 7), when I cast it on the ground or allied units it doesn't crash the game.

GT Slow is based on Thunder Clap and Ground Trap is based on Flame Strike, so I think they have different orderIDs.

I'd also like to point out that it seems like an infinite loop since the game starts lagging so hard for like 2-3 seconds and then crashes. That's all, hope you can help me out now :D


Your information doesnt suffice, not to me at last... when i face infinite loops, my game crashes instantly and with no error message, if you want upload your map in the pastebin, and give us a link, so we can check it out and have a better look at it..
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
@Elfansoer: Do multiple actions doesn't leak at all :) But it's slower than looping through array indexes if you use UnitIndexer

Yes, triggering player stands as (Owner of (Triggering Unit)) if it's a Generic Unti Event

And about the trigger... welll; I have no idea. There's no reason in this trigger to crash when targeted on Player7 units, and seems like there's no infinite loop involved. Maybe this trigger causes another trigger to crash the game.
 
Level 5
Joined
Jan 5, 2012
Messages
116
I found something new. I cast the spell and it lagged as hell but didn't crash (maybe because I reset the skill's casting time dunno) and when the units died the lag stopped. However, when the other enemy units came to the location where I had cast the spell, the dummy unit started casting the GT Slow again, and the map lagged again. Maybe the dummy unit doesn't die??
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
OOOOOOOOOOOOOOOOH I GET THIS!

I think I know the problem. If the ability you're using (ThunderClap or FlameStrike) have 0 damage, or 0 duration, or some "0" value in the fields, it may lag as hell. Happens when you give 0 duration or 0 damage to some abilities like ShadowStrike

The dummy is dying because it has the expiration timer.
 
Status
Not open for further replies.
Top