Fatal Error. HELP PLEASE.

kallieblakie

New Member
Reaction score
5
okay i believe these are the codes that causes the fatal error.

Code:
Arrow Activate
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Elune's Arrow
        (Owner of (Casting unit)) Equal to Player 1 (Red)
        Arrow[1] Equal to No unit
    Actions
        Set AimingAngle[(Player number of (Owner of (Casting unit)))] = 0.00
        Set CastTarget = (Target point of ability being cast)
        Unit - Make (Casting unit) face CastTarget over 0.00 seconds
        Custom script:   call RemoveLocation (udg_CastTarget)
        Wait 0.01 seconds
        Set AimingAngle[(Player number of (Owner of (Casting unit)))] = (Facing of (Casting unit))
        Set HeroPosition[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
        Set ShootCreatingPosition[(Player number of (Owner of (Casting unit)))] = (HeroPosition[(Player number of (Owner of (Casting unit)))] offset by 34.00 towards AimingAngle[(Player number of (Owner of (Casting unit)))] degrees)
        Custom script:   call RemoveLocation (udg_HeroPosition[1])
        Unit - Create 1 Arrow for (Owner of (Casting unit)) at ShootCreatingPosition[(Player number of (Owner of (Casting unit)))] facing AimingAngle[(Player number of (Owner of (Casting unit)))] degrees
        Animation - Change (Last created unit) turn speed to 1.00
        Set Scale = (100.00 x ((Real(Radius[(Player number of (Owner of (Casting unit)))])) / 80.00))
        Animation - Change (Last created unit)'s size to (Scale%, Scale%, Scale%) of its original size
        Custom script:   call RemoveLocation (udg_ShootCreatingPosition[1])
        Set Arrow[(Player number of (Owner of (Casting unit)))] = (Last created unit)
        Set ArrowCurrentDist[(Player number of (Owner of (Casting unit)))] = 0
        Unit - Turn collision for (Last created unit) Off

Code:
Arrow Periodic
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ArrowCurrentDist[1] Less than or equal to Range[1]
            Then - Actions
                Set ArrowCurrent[1] = (Position of Arrow[1])
                Set ArrowNext[1] = (ArrowCurrent[1] offset by Speed[1] towards AimingAngle[1] degrees)
                Custom script:   call RemoveLocation (udg_ArrowCurrent[1])
                Unit - Move Arrow[1] instantly to ArrowNext[1]
                Set ArrowCurrentDist[1] = (ArrowCurrentDist[1] + (Integer(Speed[1])))
                Set UnitCheck = (Units within (Real(Radius[1])) of ArrowNext[1])
                Set Temp_UG = (Random 1 units from UnitCheck)
                Custom script:   call DestroyGroup (udg_UnitCheck)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Temp_UG) Greater than 0
                    Then - Actions
                        Unit Group - Pick every unit in Temp_UG and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is alive) Equal to True
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
                                                ((Picked unit) has buff Stunned (Pause)) Equal to True
                                                ((Picked unit) is alive) Equal to True
                                            Then - Actions
                                                Unit - Cause PlayerU[1] to damage (Picked unit), dealing 10000.00 damage of attack type Spells and damage type Normal
                                                Set ArrowCurrentDist[1] = 10000
                                                Sound - Play MetalHeavyBashFlesh2 <gen>
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        ((Picked unit) belongs to an enemy of Player 1 (Red)) Equal to True
                                                    Then - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                ((Picked unit) has buff Stunned (Pause)) Equal to True
                                                            Then - Actions
                                                                Unit - Cause PlayerU[1] to damage (Picked unit), dealing 10000.00 damage of attack type Spells and damage type Normal
                                                                Set ArrowCurrentDist[1] = 10000
                                                                Sound - Play MetalHeavyBashFlesh2 <gen>
                                                            Else - Actions
                                                        Unit - Cause PlayerU[1] to damage (Picked unit), dealing Damage[1] damage of attack type Spells and damage type Normal
                                                        Set ArrowCurrentDist[1] = 10000
                                                        Unit - Create 1 Dummy for (Owner of Arrow[1]) at ArrowNext[1] facing Default building facing degrees
                                                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                                        Unit - Add Stun to (Last created unit)
                                                        Unit - Set level of Stun for (Last created unit) to Stun[1]
                                                        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                                                        For each (Integer A) from 1 to 1, do (Actions)
                                                            Loop - Actions
                                                                Set TP = (Position of PlayerU[(Integer A)])
                                                                Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((35000.00 x (0.40 x (Real(I_bladeLevel[(Integer A)])))) / (Abs((Distance between TP and ArrowNext[(Integer A)])))) damage of attack type Spells and damage type Normal
                                                                Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((Real(I_PrecisionLevel[(Integer A)])) x (0.06 x (Abs((Distance between ArrowNext[(Integer A)] and TP))))) damage of attack type Spells and damage type Normal
                                                                Custom script:   call RemoveLocation (udg_TP)
                                                    Else - Actions
                                    Else - Actions
                    Else - Actions
                Custom script:   call RemoveLocation (udg_ArrowNext[1])
                Custom script:   call DestroyGroup (udg_Temp_UG)
            Else - Actions
                Unit - Remove Arrow[1] from the game
                Set Arrow[1] = No unit
                Set AimingAngle[1] = 0.00


Please help !

Fatal error occurs anytime in the game, sometimes no fatal error at all. I've got 12 of such triggers for 12 different players. Please help me point out the problem!
 

Frozenwind

System maker
Reaction score
99
Don't see anything except for this:

Code:
Sound - Play MetalHeavyBashFlesh2 <gen>
Are you sure it is a valid soundfile? Else it'll crash your game.

frozenwind.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Code:
Custom script:   call RemoveLocation (udg_CastTarget)

I'm not sure, but aren't Custom Scripts supposed to have no spaces?
And the one that Frozenwind spotted might be the problem.

EDIT:
Or not. If he can put that Sound in an action, that means it is already in the Sound Editor, which means that the sound is valid already.
 

Frozenwind

System maker
Reaction score
99
They can have spaces, right?

Hmmm... Darkrea, u just gave me a idea to remove that bug in my map, it might be caused cos of the spaces o_O.

frozenwind.

EDIT:
Darkrea said:
EDIT:
Or not. If he can put that Sound in an action, that means it is already in the Sound Editor, which means that the sound is valid already.
Reply With Quote
Not really, it sometimes isn't playable, but you can "use it as a sound".

EDIT2:
frozenwind said:
Hmmm... Darkrea, u just gave me a idea to remove that bug in my map, it might be caused cos of the spaces o_O.
Didn't fix my bug, so spaces are allowed.
 

kallieblakie

New Member
Reaction score
5
nope it's not cos of the sound cos it works. neither cos of the custom scripts.

I don't know why, but the skill can be used for 10 + 20 over times, and sometimes thorough a 30 min game. but suddenly there'll be fatal error, and i don't know where it comes from. any idea what usually causes fatal errors, other than loops, which there are none in my map. anything about variables that may cause fatal errors?
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Of course custom script is allowed. When you convert a trigger into JASS the custom script will be copied 1:1 into the JASS code.

@kallieblakie:
Remove almost every action in the trigger, then test. If it doesn't crash then restore the actions and remove a few less, then test again and so on.
This way you can pinpoint your error.

EDIT: Ok, due to your last post I assume that your map leaks like hell. After a while the trigger is just too much for the remaining memory and boom. I know that this can cause a fatal error, though I don't know whether this is the cause.
 
Reaction score
456
Have you tried if the game crashes even if these triggers are disabled?
 

kallieblakie

New Member
Reaction score
5
Have you tried if the game crashes even if these triggers are disabled?
i think that the map leaks like hell too, and these are the main triggers. any idea where are the leaks? cos the game goes into fatal errors on random timing, and only when there's more than 2 players, so there's no way i'll test by removing triggers.

Removing these triggers = nothing to play with.

Can someone help me see and fix the leaks? i have completely no idea what's causing the memory BOOM
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
> Removing these triggers = nothing to play with.

From what I see, they are just triggers for a spell.
Try keeping that trigger, and then don't cast the spell at all.
Wait for a long time and see if it's really the cause.

> Of course custom script is allowed.

I was talking about the space.

Code:
For each (Integer A) from 1 to 1, do (Actions)
    Loop - Actions
        Set TP = (Position of PlayerU[(Integer A)])
            Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((35000.00 x (0.40 x (Real(I_bladeLevel[(Integer A)])))) / (Abs((Distance between TP and ArrowNext[(Integer A)])))) damage of attack type Spells and damage type Normal
            Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((Real(I_PrecisionLevel[(Integer A)])) x (0.06 x (Abs((Distance between ArrowNext[(Integer A)] and TP))))) damage of attack type Spells and damage type Normal
            Custom script:   call RemoveLocation (udg_TP)
What's the point of Looping it? Just use the number '1'

@ Post #4
Spelt my name wrong. Twice.
 

Sim

Forum Administrator
Staff member
Reaction score
534
The best (but long) solution is to play the map disabling 1 suspicious trigger.

If it crashes you enable back the trigger and disable another one, and play the map.

If it crashes again, you enable back the trigger and disable the next one, and play the map.

Rinse and repeat.

Post your map, we might be able to notice the problem quite fast browsing through all the triggers.
 

kallieblakie

New Member
Reaction score
5
the thing is, this is the ONLY spell in my map! I can't disable and then just walk around and leave it hanging for 1 hr to wait for it to crash?

>>What's the point of Looping it? Just use the number '1'>>

I'll change it back to 1. Cos' there's a total of 12 identical triggers using different numbers for 12 players. I've checked that there's no repeat in numbers. Still coulddn't find the problem.

>>I was talking about the space.>>

I think spaces are allowed. I've been using this same script for some of my maps and works fine. Only this particular map gives me fatal error.


My map is at www.geocities.com/kallieblakie/potm_war_v2_1.zip

Thanks for helping



----------edit-------------

The fatal error occurs randomly in the game, or may not occur at all. So even if you get no fatal error testing one player, fatal error will still occur when you try to play with 2 players or more.
 

vypur85

Hibernate
Reaction score
803
Have seen your map. Wow... Really, there are 12 triggers for each player >.<. Seems like a pudge war game :). The problem could be from the 'wait'? Im not too sure. What about trying to remove the wait. Because the 'Casting Unit' can be overwritten after the wait, if another player cast it in between the waiting time. So, if this happens, maybe the trigger confuses each other and caused crash? That might not be the problem though. It's just a wild guess :). Or else, you should set the casting unit into a variable before the wait, and then use the variable after the wait.

Or, maybe just set:
Code:
[(Player number of (Owner of (Casting unit)))]
to
Code:
[1] <--for Player 1

Hope it's fixed :)
 

vypur85

Hibernate
Reaction score
803
Oh ok... Why add the wait anyway? I think your spell is already MPI (since you have 12 triggers for each player). Try adding variable to the casting unit. Or try replacing casting unit to triggering unit. I think this is the only problem. It should work better. Yet again, why added the wait? Remove it. There is no apparent leak in the triggers though (there is one i've spotted but not so bad till it would cause fatal error).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top