• 🏆 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!

Fatal error & warcraft 3 crash

Status
Not open for further replies.
Level 4
Joined
Mar 24, 2008
Messages
87
Hi, my brother and me are creating maps, using triggers in GUI (we don't understand JASS at the moment :p).
While testing my brother's map, his warcraft 3 stops without any error message. It is always at the same place, where a trigger like this is used :

  • Déclencheur sans titre 003
    • Evénements
      • Unit - Phoenix from 0025 <gen> Takes damages
    • Conditions
      • ((Attacking unit) has buff Soins) Egal à TRUE
    • Actions
      • Unit - Set life of (Attacked unit) to ((Vie of (Attacked unit)) + (0.50 x (Damage taken)))
On mine, i can test solo without problem, but when i test with 2 or 3 players, we all get a fatal error message.
As i have many triggers i don't know which one could crash the game.
I use about 4-5 triggers using 0.01 sec Events, like this :

  • Evénements
    • Temps - Every 0.01 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Boucle - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • Si - Conditions
            • PhoenixForm[(Integer A)] Egal à TRUE
          • Alors - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • Si - Conditions
                • (Distance between (Position of Phoenix[(Integer A)]) and PointPhoenixFlyght[(Integer A)]) Supérieur ou egal à 5.00
              • Alors - Actions
                • Unit - Move Phoenix[(Integer A)] instantly to ((Position of Phoenix[(Integer A)]) offset by 8.00 towards (Angle from (Position of Phoenix[(Integer A)]) to PointPhoenixFlyght[(Integer A)]) degrees)
              • Sinon - Actions
                • Animation - Reset Phoenix[(Integer A)]'s animation
                • Animation - Change Phoenix[(Integer A)]'s animation speed to 100.00% of its original speed
                • Set PhoenixForm[(Integer A)] = FALSE
                • Unit - Move Heroes[(Integer A)] instantly to PointPhoenixFlyght[(Integer A)]
                • Unit - Unhide Heroes[(Integer A)]
                • Unit - Make Heroes[(Integer A)] Vulnérable
                • Unit - Hide Phoenix[(Integer A)]
                • Unit - Move Phoenix[(Integer A)] instantly to (Random point in Hide phoenixs <gen>)
                • Selection - Select Heroes[(Integer A)] for (Player((Integer A)))
          • Sinon - Actions
And a lot more with much special effects, like this one :

  • Fire nova
    • Evénements
      • Unit - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal à Fire nova
    • Actions
      • For each (Integer A) from 1 to 24, do (Actions)
        • Boucle - Actions
          • Unit - Create 1 Fire bolt for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (15.00 x (Real((Integer A)))) degrees
(Here units created are bolts which goes out from the triggering unit, with another trigger)
So here is my question : what can makes the game crash ?
Is there a maximum of value that warcraft 3 can calculate by an amount of time ? Or should we have to creat in JASS in order to avoid crashs ?
I saw a topic with a question near mine but i didn't see answer to my problem...

Thank you, and sorry for my bad level in english :)

Exum
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The damage taken trigger should look like this:

  • Untitled Trigger 038
    • Events
      • Unit - Paladin 0022 <gen> Takes damage
    • Conditions
      • ((Damage source) has buff Acid Bomb) Equal to True
    • Actions
      • Unit - Set life of (Triggering unit) to ((Vie of (Triggering unit)) + (0.50 x (Damage taken)))
And get rid of the leaks, thay can ultimately cause the game to crash: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
For a set of "Damage Taken" trigger, it MUST consist of TWO separate trigger
One to trigger the event:
  • Damage Taken Start
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • *YOUR CONDITIONS*
    • Actions
      • Trigger - Add to Damage Taken Effect <gen> the event (Unit - (Triggering unit) Takes damage)
      • Trigger - Turn off (This trigger)
One for effect:
  • Damage Taken Effect
    • Events
    • Conditions
    • Actions
      • *YOUR ACTIONS*
 
Level 4
Joined
Mar 24, 2008
Messages
87
I found the problem with my brother's map, he made a trigger with an action like this :

  • Unit - Cause (Damage source) to damage Boss, dealing (Damage taken) damage of attack type Sorts and damage type Normal
(Thanks to Maker, you made me wondering about "Damage source")
I didn't think that "Damage source" can't be use as an unit.

I read the post of "Things that leak", and now i'm full of questions :
- Why is it a waste to use "Triggering unit" instead of "Attacked unit" or any action dealt by the unit answering the event ?
- Should i have to creat a variable for each point / unit / effect ... i creat in order to delete it after use ?
- Is there any differents between "Remove unit" and "Kill unit" (In the purpose to avoid leaks) ?
- How can i know if my map will leak or not, without testing it 100 hours ?
- If i want to make a spell, like a fire nova, based on the creation of 24 or more fireballs (units), should i creat only one trigger with variables and so, or can i make one which creat fireballs, and one other which tells them to move, and then to be destroyed ? (As i don't know JASS, i use their attack as damage for my nova)

I have many other questions, but i think i'm myself leaking to the wrong thread :)

Edit :
For a set of "Damage Taken" trigger, it MUST consist of TWO separate trigger
In this case i use a "Specific unit event", but i wanted a lot of times to use "Damage taken" for units that wasn't created at the begining of the map. Your answer will be helpful, thanks :)

Thank for your answers.

Exum
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
For the future, if you have a problem like this again, you can easily (Although it is time consuming) figure out where the problem lies within the triggers by turning them off.

Turn off sections of triggers at a time, then test, if the problem occurs again, check the triggers of the next section.

Do this till you don't run into the problem.

Good luck, :)
 
Level 4
Joined
Mar 24, 2008
Messages
87
Hi, tryed again my map with some changes in order to avoid leaks.
While playing with one other player, had a fatal error :
------------------------------------------------------------------------------

This application has encountered a critical error:

FATAL ERROR!

Program: c:\program files\warcraft iii\war3.exe
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F4C2E7F

The instruction at '0x6F4C2E7F' referenced memory at '0x0000000C'.
The memory could not be 'read'.


War3Build: 1.24.4.6387
Played Maps\Test\Sorciers war.w3x
Player 0 W T F Race Undead StartLoc 4
Player 1 x'))))') Race Undead StartLoc 8
Player 2 Race Human StartLoc 2
Player 3 Race Human StartLoc 3
Player 4 Race Human StartLoc 4
Player 5 Race Human StartLoc 5
Player 6 Race Human StartLoc 6
Player 7 Race Human StartLoc 7
Player 8 Race Human StartLoc 8
Player 9 Race Human StartLoc 9
Player 10 Race Human StartLoc 10
Player 11 Race Human StartLoc 11
------------------------------------------------------------------------------

----------------------------------------
x86 Registers
----------------------------------------

EAX=00000000 EBX=07A84374 ECX=00000004 EDX=00000000 ESI=0012F9B4
EDI=0012F9BC EBP=03FA3564 ESP=0012F92C EIP=6F4C2E7F FLG=00010202
CS =001B DS =0023 ES =0023 SS =0023 FS =003B GS =0000


----------------------------------------
Stack Trace (Manual)
----------------------------------------
Can someone tell me if it's due to a leak or whatever else please ?

Thank,

Exum
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Ok what has happened is something in your map has caused Warcraft III to execute a jump instruction to an area of memeory that Warcraft III was not given access to and as such the opperating system threw the exception back which the game caught and shut down from.

Some how '0x0000000C' (in normal numbers this is byte 12 from memory) was referenced by a jump instruction. The jump instruction was located at 1780MB into your memory(not too sure if its giving physical or virtual adresses but am guessing physical as it was an acess vilation).

That is all that can be made out with the data you have given. Logically you must be doing something really bad to make it call such a broken instruction. Additionally blizzard must have made the game badly since you can get it to use such a broken instruction.

My knowledge of x86 is still lacking. Frankly its a massive amount to learn.
 
Last edited:
Level 4
Joined
Mar 24, 2008
Messages
87
Hi, thanks for your answer Dr super good.

I tryed to localize the problem but it happens randomly, and only while playing with another player.

It is making me crazy, if someone could take time to see what's the problem in my map it would be realy nice (knowing that it's not big : 237 Ko).

Thank,

Exum
 
Level 4
Joined
Mar 24, 2008
Messages
87
Can anyone takes a look at my map to show me what is the problem please ? :/

It's realy small :)

+Rep of course

Thanks,

Exum
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Fix all the leaks in your spells.

You are creating an insane amount of leaks. One of your triggers can create 400 leaks per second per player alone. And you have several of that kind of triggers.

That may leaks can cause the crash.

I don't recommend using 0.01 period, use 0.03.
 
Status
Not open for further replies.
Top