"double free of location in 'Trig_Great_Aether_Actions'" ??

Zedzy

ℑΣÐℑΨ
Reaction score
41
I get the message "double free of location in 'Trig_Great_Aether_Actions'" when a unit finishes this ability. It is in a test map, so there are no other triggers besides one that set the melee time of day.

Code:
Great Aether
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Great Aether 
    Actions
        Custom script:   local unit GA_TargetedUnit_Unit
        Custom script:   local location GA_Caster_Start_Point
        Custom script:   local location GA_PositionOfTarget_Point
        Custom script:   local location GA_CasterMoveTo_Point
        Custom script:   local integer GA_AttackNum_Int
        Custom script:   local group GA_EndDamage_UnitGroup
        Set GA_TargetedUnit_Unit = (Target unit of ability being cast)
        Set GA_CasterStart_Point = (Position of (Triggering unit))
        Set GA_PositionOfTarget_Point = (Position of GA_TargetedUnit_Unit)
        Set GA_CasterMoveto_Point = (GA_PositionOfTarget_Point offset by 128.00 towards (Angle from GA_PositionOfTarget_Point to GA_CasterStart_Point) degrees)
        Unit - Make (Triggering unit) Invulnerable
        Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        Wait ((Distance between GA_CasterStart_Point and GA_CasterMoveto_Point) / 1024.00) seconds
        Unit - Pause GA_TargetedUnit_Unit
        Unit - Pause (Triggering unit)
        Unit - Make GA_TargetedUnit_Unit face GA_CasterStart_Point over ((Distance between GA_CasterStart_Point and GA_CasterMoveto_Point) / 1024.00) seconds
        Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
        Unit - Move (Triggering unit) instantly to GA_CasterMoveto_Point, facing GA_PositionOfTarget_Point
        Wait 0.25 seconds
        Animation - Play (Triggering unit)'s Stand Victory animation
        Wait 0.25 seconds
        Unit - Add Storm Crow Form to GA_TargetedUnit_Unit
        Animation - Change GA_TargetedUnit_Unit flying height to 512.00 at 1024.00
        Wait 0.25 seconds
        Custom script:   call SetUnitAnimationByIndex(GetTriggerUnit(), 4)
        Wait 0.25 seconds
        Unit - Add Storm Crow Form to (Triggering unit)
        Animation - Change (Triggering unit) flying height to 512.00 at 1024.00
        Wait 0.50 seconds
        For each (Integer A) from 1 to (((Level of (Ability being cast) for (Triggering unit)) x 2) + 2), do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (GA_TargetedUnit_Unit is alive) Equal to True
                    Then - Actions
                        Set GA_AttackNum_Int = (Random integer number between 1 and 2)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                GA_AttackNum_Int Equal to 2
                            Then - Actions
                                Custom script:   call SetUnitAnimationByIndex(GetTriggerUnit(), 2)
                            Else - Actions
                                Custom script:   call SetUnitAnimationByIndex(GetTriggerUnit(), 8)
                        Unit - Cause (Triggering unit) to damage GA_TargetedUnit_Unit, dealing ((Real((Level of (Ability being cast) for (Triggering unit)))) x 15.00) damage of attack type Hero and damage type Normal
                        Special Effect - Create a special effect attached to the chest of GA_TargetedUnit_Unit using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
                        Special Effect - Destroy (Last created special effect)
                        Wait 0.50 seconds
                    Else - Actions
        Custom script:   call SetUnitAnimationByIndex(GetTriggerUnit(), 3)
        Wait 0.10 seconds
        Animation - Change GA_TargetedUnit_Unit flying height to (Default flying height of GA_TargetedUnit_Unit) at 1024.00
        Animation - Change (Triggering unit) flying height to (Default flying height of (Triggering unit)) at 1024.00
        Wait 0.40 seconds
        Special Effect - Create a special effect at GA_PositionOfTarget_Point using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Wait 0.10 seconds
        Unit Group - Pick every unit in (Units within 256.00 of GA_PositionOfTarget_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real(((Level of (Ability being cast) for (Triggering unit)) x 80))) damage of attack type Spells and damage type Normal
        Set GA_EndDamage_UnitGroup = (Last created unit group)
        Unit - Make (Triggering unit) Vulnerable
        Unit - Remove Storm Crow Form from (Triggering unit)
        Unit - Remove Storm Crow Form from GA_TargetedUnit_Unit
        Unit - Unpause (Triggering unit)
        Unit - Unpause GA_TargetedUnit_Unit
        Custom script:   call RemoveLocation(udg_GA_CasterMoveto_Point)
        Custom script:   call RemoveLocation(udg_GA_PositionOfTarget_Point)
        Custom script:   call RemoveLocation(udg_GA_CasterStart_Point)
        Custom script:   call DestroyGroup(udg_GA_EndDamage_UnitGroup)

This problem has arisen only when I have tried to make it MUI. Help is greatly appreciated.

Edit: Great Aether (SMBB Ike's final smash)
[YOUTUBE]<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Wxgx4o8AzH4&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Wxgx4o8AzH4&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>[/YOUTUBE]
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Why exactly are you declaring locals? Because from what I can see you are not using them...
 

Zedzy

ℑΣÐℑΨ
Reaction score
41
What do you mean I'm not using them, I use them throughout the whole trigger.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Are you trying to use them through: Actions : Set Varible?

Edit:
Cut these lines out of your trigger and see if you get the same error:
JASS:
        Custom script:   local unit GA_TargetedUnit_Unit
        Custom script:   local location GA_Caster_Start_Point
        Custom script:   local location GA_PositionOfTarget_Point
        Custom script:   local location GA_CasterMoveTo_Point
        Custom script:   local integer GA_AttackNum_Int
        Custom script:   local group GA_EndDamage_UnitGroup
 

Zedzy

ℑΣÐℑΨ
Reaction score
41
I converted it to JASS, removed all of the udg_'s, and useless functions, and now it does not do it anymore, thank you for helping me overcome my ignorance.
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
lol no problem.
But you can use locals in gui.
You just have to do it a different way to the way you were doing it :p
 

Flare

Stops copies me!
Reaction score
662
Code:
        Custom script:   local unit GA_TargetedUnit_Unit
        Custom script:   local location GA_Caster_Start_Point
        Custom script:   local location GA_PositionOfTarget_Point
        Custom script:   local location GA_CasterMoveTo_Point
        Custom script:   local integer GA_AttackNum_Int
        Custom script:   local group GA_EndDamage_UnitGroup

Should be
Code:
        Custom script:   local unit [B]udg_[/B]GA_TargetedUnit_Unit
        Custom script:   local location [B]udg_[/B]GA_Caster_Start_Point
        Custom script:   local location [B]udg_[/B]GA_PositionOfTarget_Point
        Custom script:   local location [B]udg_[/B]GA_CasterMoveTo_Point
        Custom script:   local integer [B]udg_[/B]GA_AttackNum_Int
        Custom script:   local group [B]udg_[/B]GA_EndDamage_UnitGroup

You may think you are using the local globals throughout the function, but you created new locals rather than localizing the globals (even though, I believe AceHart said they are evil incarnate :p)

You are also leaking a group at the end of your trigger
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
It is still not MUI.
Code:
((Level of (Ability being cast) for (Triggering unit)
Another thing, you should split it into two triggers, maybe three. Awful trigger IMO.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top