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

random FATAL ERROR!

Status
Not open for further replies.
Level 2
Joined
Mar 5, 2010
Messages
34
The subject of this post is : While playing my AoS map, occasionaly, all players will get a critical error/ FATAL ERROR!, and their wc3 will shut down including me.

About the map: AoE type of map. Uses GUI, around 5 ko weigth, lots of triggers. I've been making it for the past 3 years. Me and my friends are playing it every day. Crashes started to happen about 3 months ago. I will attach the map to that post.

About the crashes:

- It never happens when there are 4 players or less (the game needs to be pretty full-housed). The more players in the game, the more it tends to crash.
- It happens approx. 1 game out of 3.
- I can open it in WE and it runs smoothly
- Since the happening of crashes, I am taking note of the heroes/spells used in every game that crashes. With +/- 30 crashes, I can't find any correlation.
- Crashes tend to happen in the middle of TEAM FIGHTS

Things i suspected/still suspect

- Leaks. I tried removing all of them, but as long as I know, they can lag, but barely would they cause a crash...
- Special effects. The fact it happens during team fights makes me think it has something to do either with an overdose of SFX, sounds or informations.
- Infinite trigger? If that was it, crashes would not be random.
- Windows 7. Can it be incompatibility?
- Lightning effects. I heard they can cause crashes O,o? I only use a very small amount of those however...
- Loops. I never go faster than 0.05 time event looping triggers. However, if three spells using 0.05 time event run simultaneously, could it crash?

I opened the error logs in order to find the redundant coding. Here are the code I have seen more than twice in my log, in order of importance:

-opkE, pkE, xSoX, 7UoX, Engine 13d8, 3PDorPDo, EeRo, UXDo, BvMm, pe5w.

(to be honnest, I thought I could link those with some raw coding from units/abilities/etc... I've been using ctrl+f to look around and found nothing relevant.

FATAL ERROR!

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

The instruction at '0x6F430C91' referenced memory at '0x00000020'.
The memory could not be 'read'.

That is what it looks like (most of the times)

I hope I provided enough informations. I really need help badly... Any clue would do. I have been investigating for the past 2 months and am feeling kind of depressed now about those crashes.
 

Attachments

  • Heroes of Wonder v1.83.w3x
    5.3 MB · Views: 156
Level 2
Joined
Mar 5, 2010
Messages
34
I think I used the getlocalplayer fonction only in my -zoom trigger. I never used it anywhere else. Moreover, I think I changed it to remove all probabilities of getting the players data confused.

I agree it's alot to look through :/ If you know anything that could cause the crashes that I may not have thought up already, it could also really help!

Another hint I thought of about the crashes is : it happens 30 and + minutes into the game. It litteraly happens as randomly as possible, and that's how its so hard to see the knot of the problem...
 
I think I've found it.
Whenever you order a unit something, make sure you order it to stop first, then order it to do whatever you want (I'm talking about the Spawn triggers)

edit

Oh and since I also suspect that the crashes are being caused by performance problems, for starters, you can remove all the "Do nothing"s in there.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Gonna change it as you mentionned, and thanking you again for your time.

However, i'd like to know the reasons why giving units entering region a new order without ordering them to stop first could make a game crash. Its always been like that for the past 3 years and the crash's birth is too recent.

Also, I am going to remove the ''do nothing'' actions. To me, it looks very inoffensive though... In my opinion, there is a bigger and tastier worm hiding somewhere in that mess...
 
Level 2
Joined
Mar 5, 2010
Messages
34
I think its time I give some updates.

I removed all the ''do nothing''. Most of all, I ordered units to stop first, etc, just like you mentionned.

In 20 games, only 2 crashed. I really thought we had solved it. However, it seems the crash can still happen. Since we kind of reduced the % of crashes from 1/3 to 1/10, does that mean it is related to performances troubles?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The map shall crash from DoNothings? From overdose of sfx or performance, leaks? Very improbable. Never heard of the "stop units before giving new orders" either.

Lightnings can cause a crash when you try to destroy an invalid one while there are still native lightnings like from Chain Lightning ability in the game.

Upload an error log please. Notice that the crash might be from multiple sources, not just a single one.

@Mr_Bean987: GetLocalPlayer() has not anything to do with fatal errors and if the problem occured in such a block, it should not crash for everybody.
 
Level 2
Joined
Mar 5, 2010
Messages
34
This application has encountered a critical error:

FATAL ERROR!

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

The instruction at '0x6F4D9FCA' referenced memory at '0x993200C0'.
The memory could not be 'read'.

_____________

Attaching 5 error log to the post.
 

Attachments

  • 2012-02-02 19.13.40 Crash.txt
    13.7 KB · Views: 85
  • 2012-02-02 18.19.45 Crash.txt
    13.7 KB · Views: 125
  • 2012-02-01 20.33.06 Crash.txt
    13.7 KB · Views: 141
  • 2012-01-21 19.56.32 Crash.txt
    13.7 KB · Views: 127
  • 2012-01-20 19.14.43 Crash.txt
    13.7 KB · Views: 81
Level 2
Joined
Mar 5, 2010
Messages
34
Hey

I recently had a flash of brightness. As you saw in my map, there are tons of spells that requieres triggers. Moreover, most of them spells use dummy units. Very often, does dummies dont have any variable attached to them and are recalled as ''last created unit''.

Could that be the cause?

Like if 6 spells are casted at once. All of them use ''last created unit''. Could the game screw-up while trying to read them and crash?

Thanks for answering,
Regards
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Last Created Unit is global, so it can be overwritten by other triggers. However, wc3 runs jass code single-threadedly, meaning code is executed consecutively and not overlapping without determination. So the chance to get in conflict are implementing waits that only stops the current trigger's instance or you call another trigger from that one like this:

  • Actions
    • Unit - Create 1 Footman --> saved the Footman in Last Created Unit
    • Unit - Kill (Last Created Unit) --> calls second trigger
    • Game - Display (Name of (Last Created Unit)) --> Grunt
  • Events
    • Unit - Unit dies
  • Actions
    • Unit - Create 1 Grunt --> now stores the Grunt in Last Created Unit
But no, killing null or invalid units does not cause fatal errors and I also doubt that you clog everything. If this was involved, it would probably be that the dummy just does something false later on, calling other problematic events.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Then, I need help. I really need your help as to what secret bugger makes some games crash... WaterKnight, if you know something about fatal crashes, please share that knowledge with me!
 
Level 2
Joined
Mar 5, 2010
Messages
34
My brother reported that he was playing a game, 4v4 with random pubs, and the game crashed after only 2 minutes of playing. Which means... Confusion to me.
 
I found the problem!
There's an infinite loop that's occuring ;)

Look at your Spawn Triggers.

There's one trigger that orders the unit to attack-move to a different rect under a certain condition when it enters one rect.
There's another tirgger that orders the unit to move to the first rect when it enters the second ;)

There's your problem! :D

  • RedCornerRight
    • Events
      • Unit - A unit enters RedCornerRight <gen>
    • Conditions
    • Actions
      • Set BlueCornerRight = (Center of BlueCornerRight <gen>)
      • Set RedCornerLeft = (Center of RedCornerLeft <gen>)
      • Set RedSpawnPointR = (Center of RedSpawnPointRight <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To BlueCornerRight
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Facility [Custom] 0034 <gen> is dead) Equal to False
            • Then - Actions
              • Unit - Order (Triggering unit) to Attack-Move To RedSpawnPointR
            • Else - Actions
              • Unit - Order (Triggering unit) to Attack-Move To RedCornerLeft
        • Else - Actions
      • Custom script: call RemoveLocation(udg_BlueCornerRight)
      • Custom script: call RemoveLocation(udg_RedCornerLeft)
      • Custom script: call RemoveLocation(udg_RedSpawnPointR)
And

  • AttackRedSpawnPointRight
    • Events
      • Unit - A unit enters RedSpawnPointRight <gen>
    • Conditions
    • Actions
      • Set RedCornerRight = (Center of RedCornerRight <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To RedCornerRight
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To RedCornerRight
        • Else - Actions
      • Custom script: call RemoveLocation(udg_RedCornerRight)
See what I mean? ;)

The same thing's happening between the other spawn triggers as well =p
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
That explains the fatal error how? The triggering won't happen instantly, not even if you would teleport the unit directly because the enter event is delayed. And sheer infinite loops do not cause fatal errors but close wc3 immediately.

@TC: Apparently, there are a lot of ways to commit one. The script functions in question are usually wrapped in custom functions to catch them. For example, the index to player function is potential source of a fatal error when a bad value is passed (out of 0-15 or 1-16 in GUI) and you would check that number before applying the native. If it's out of bounds, report it.
 
Level 2
Joined
Mar 5, 2010
Messages
34
When the crash first happened, I so too thought it was a bad triggered spell, and so I started taking note of every hero that were in every crashing game. In the end, I had one sheet for the potential crashers, and one for the heroes that would not be suspicious.

After not too long I was forced to forfeit, since all of the heroes would be on both sheets and I could found no correlation.

Moreover, I asked my brother about the game that crashed within the first 2 minutes. He said people had not even started fighting each other, and some players had yet to pick their hero.

That messes up my estimations. For the first time, it would seem that it was not a performance related flaw.

Magtheridon96: I read carefully your previous post about the spawn triggers. Yet, since the two regions are at least 4-5 seconds from each other, the two triggers cannot collide. Moreover, there is a building to agro the attack from creeps when they reach ''RedSpawnPointRight''. Although it would seem to create a loop, I have not had troubles with that :/.

I must say, thanks so much for helping me. Every step closer to solving that mystery is a blast of happiness. I sincerly hope we can think this out!
 
Level 2
Joined
Mar 5, 2010
Messages
34
Well, players have started to report that crashes mostly happen when Moknatal Seer and Naga are in the game. What they mostly do = lightning effects.

Are lightning effects something to watch out for?
 
Level 2
Joined
Mar 5, 2010
Messages
34
Well, we probably found it then. I mean, almost all of my custom spells using a target unit are based of the dummy spell ''Chain Lightning''. Although, 14 out of 15 times, all values are set to 0 and there is no lightning effect being generated. Since there are so many spells that use that ''chain lightning'' template...

Ok let's take a closer look to the spell that, according to my players, is most related to game crashes: It's a map wide call of the storm. A gigantic lightning strikes the ground. Then the electricity splits up and jumps to nearby enemies.

What I did for this spell is: the hero casts a spell made of the original ''silence'' for the AoE. A special effect of a Moonsoon is casted on the area. A dummy appears and casts some dummy ''thunder clap'' for the AoE dmg. Then, another dummy appears and casts chain lightning to a random enemy target. Voila

Now, dont get me wrong. The spell itself is fine. Moknatal Seer has been alot of times. 4 games out of 5 nothing happens. I think its some bigger deal than just the spell, but the combining of this spell (which uses chain lightnings) with other spells based on the same template simultaneously.

Oh and not only chain lightning effects, but any lightning effect in general. whether it is Forked lightning based spells, finger of death, chain healing from Rokhan, anything.

so... I think we're on a good track now. Tell me if you think it's worth the try and.. If yes, I will probably try and remove lightning effects here and there
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The instruction at '0x6F4D9FCA' referenced memory at '0x993200C0'.
The memory could not be 'read'.
Unfortunatly this just means the game crashed due to a generic segmentation fault caused by an instruction at '0x6F4D9FCA'.

This sort of error is commonly caused by a reference to some object which has a value tested but as the page the object was in has been freed the memory manager generates a segmentation fault. It can also be caused by a reference failing to be set when using dynamic memory allocation (as allocating memory does not garuntee the contense of the allocated memory).

Try and think programaticly about the game and what is going on. You might be able to corollate a cause then.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Unfortunatly this just means the game crashed due to a generic segmentation fault caused by an instruction at '0x6F4D9FCA'.

This sort of error is commonly caused by a reference to some object which has a value tested but as the page the object was in has been freed the memory manager generates a segmentation fault. It can also be caused by a reference failing to be set when using dynamic memory allocation (as allocating memory does not garuntee the contense of the allocated memory).

Try and think programaticly about the game and what is going on. You might be able to corollate a cause then.

Wow, this is getting warm... Dr Super Good, maybe you did read my first post, which not only details the correlations I found up to now, but shows as well how limited my knowledge is. I really want to solve that, but starting from '' a segmentation fault '' where should I start to look up? Please tell me more.
 
Level 2
Joined
Mar 5, 2010
Messages
34
plenty.

Do you want me to upload the map at tis current stage so you can look it up?
 

Attachments

  • Heroes of Wonder v1.85.w3x
    5.5 MB · Views: 82
Last edited:
Level 2
Joined
Mar 5, 2010
Messages
34
I usually just turn triggers off when i don't need em. I don't think I ''remove'' them though. Although, I remove plenty PLENTY dummy units.
 
Level 2
Joined
Mar 5, 2010
Messages
34
I can almost without hesitation say that lightning effects were creating those crits.

in version 1.84, crashes were frequent, and I started to suspect Lightning effects. Consequently, I removed alot of them. Then I released 1.85.

More than 800 games of versions 1.85 were played. People reported that crashes could still happen, but in very rare cases. Everytime, some heavy lightning effects would be involved, such as links between heroes, lightning effect for ''petrify'' (over time), etc.

This goes along with the fact that it tends to crash when games are 5v5 (more spells, more LE). I will try and reduce the usage of ''triggered'' lightning effects, if possible to null. I will then give you guys feedback regarding whether it is solved, finally.

Regards,
Aero.
 
Status
Not open for further replies.
Top