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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top