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

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I know there is limited knowledge about diagnosing fatal error problems, however I thought I'd post mine in
hope anybody can help fix it.

attachment.php


The fact that the error is related to memory usage, leads to me think its a memory leak problem. However,
I have very minimal memory leaks (that I'm aware of, and yes I'm fully aware of what a memory leak is) with
the exception of a couple of "one offs" because I'm lazy. This would only add to about 6 leaked points though.

I do not have any infinite loops running, hashtables or jass. Could anybody speculate as to possible reasons
why I am receiving fatal errors?

If anybody is interested about what my map is like (protected): http://www.hiveworkshop.com/forums/maps-564/hero-capture-flag-v1-6-a-226026/

I also thought this post my be good to see what people know about diagnosing and fixing these errors since
countless others have had this problem without much success on the matter.
 

Attachments

  • Error.jpg
    Error.jpg
    24.3 KB · Views: 4,693
Level 16
Joined
Mar 27, 2011
Messages
1,349
Well of course its usually the code. I'm simply asking if anybody has confirmed that certain actions cause fatal errors if used in a certain way, any particular doodads to avoid, etc.

I put my map up if people wanted to view (from in game) what operations were being performed not that I really thought many would.

I'm not exactly sure why fatal errors occur, and thats the idea of this thread.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
From what I've previously read:

  • Memory Leaks: Too many may cause fatal errors. But I have litte to none (total of about 6 leaked points).

  • Hashtables are buggy: I disagree with this statement, however I am not using any hashtables.

  • Infinite Loops: Its kinda obvious, the computer gets overloaded, freezes and crashes. I don't have any.

  • Local Actions: If used improperly, these can cause disconnections or crashes. I don't have any locally run triggers, unless this is one:

    • Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: (Movement Speed: + (String((Current movement speed of (Picked unit)))))

I would like people to confirm the points I have made, and pherhaps ellaborate and add new points. Thats all this thread is about. I want to understand fatal errors.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
No I cannot reproduce the error. It appears random.

I don't have any triggers creating units outside of map bounds or moving them there.

Triggers like these do run on a number of occasions though:

  • Conditions
  • ((Triggering unit) belongs to an ally of Player 11 (Dark Green)) Equal to True
Could this be referencing players beyond 1-16?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
The error you are getting is a segmentation fault error. This occurs when you try to read or write to memory located in pages not allocated or allowed for use by your process.

In this particular example it appears that an instruction was trying to access memory at the address 5c. Such an address is usually reserved by code read from an executable or library via read only file mapping. As the mapping is read only any atempt to modify the memory (which the instruction might try) will throw an exception and crash the process.

This kind of error is usually logical rather than a lack of resources. If the process runs out of allocatable pages of memory (page file full or address space depleted) it will throw an "out of memory" exception instead.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
The error you are getting is a segmentation fault error. This occurs when you try to read or write to memory located in pages not allocated or allowed for use by your process.

So then I have to ask. What kind of trigger actions could try reading memory which is out of bounds for the game? Since custom script seems like the most direct coding a map maker could do in GUI, I'm guessing I wrote a custom script wrong? However I only have leak cleaning scripts such as "call DestroyGroup (udg_TempGroup)"

Is the World Editor badly written? Why are fatal error problems so common amongst map makers? Surely blizzard doesn't let users allocate memory incorrectly, unless they themselves don't fully understand how their triggers cause errors?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Is the World Editor badly written?
Yes but this has nothing to do with this as JASS is cached during map load and interpreted at run time.

Why are fatal error problems so common amongst map makers? Surely blizzard doesn't let users allocate memory incorrectly, unless they themselves don't fully understand how their triggers cause errors?
This is the problem. There are game engine bugs that result in "null pointer" like errors, a common cause of segementation faults. The fact it is reading/writing so close to address 0 (often used for null) is a good reason for it to be a null pointer fault. The offset could easilly be the result of an array index or struct element address offset.

If WarCraft III was open source and run in debug mode you could get a line number in the source code where the error occured and begin tracing the source of the value. After this appropiate lines of code could be manipulated to fix or handle this error preventing a crash and causing a more greceful failure (such as an error message or thread crash). WarCraft III is not open source and Blizzard has no resources allocated to maintaining it at the moment so you will have to live with these errors.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
The error is received randomly in the game. It doesn't happen after any actions that I did myself, however I can't speak for what the other players did (4v4 game).

I have received this error twice in the past. I have also had one game where other players have received a fatal error and I didn't.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Well, if anybody reckons they can fix it, i'll give them a link privately. I don't want to publically provide my map.

However, if anybody wants to continue sharing anything they know about fatal errors in general, please go ahead. I have other maps that receive fatals too, so I'd like to learn more (if there is more to know).
 
Level 9
Joined
Apr 30, 2010
Messages
324
my map also receive fatal... i don't know why.. i did delete all trigger and remove all custom stuff in object editor, still error! may be the problem is from my pc.. my pc restarted when i'm open the map in WE@JNGP.. i still can open the map in WE.. but i can't load the game in War3... now i need to transfer back all my data into a new map T.T ~ idk.. ouh and btw, my pc crashed several times during i open my map in WE cause of failure system in my pc --' i think that's the answer for mine..

u should try to delete all custom thingy on the map... don't forget to make a backup..
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
my map also receive fatal... i don't know why.. i did delete all trigger and remove all custom stuff in object editor, still error! may be the problem is from my pc.. my pc restarted when i'm open the map in WE@JNGP.. i still can open the map in WE.. but i can't load the game in War3... now i need to transfer back all my data into a new map T.T ~ idk.. ouh and btw, my pc crashed several times during i open my map in WE cause of failure system in my pc --' i think that's the answer for mine..

u should try to delete all custom thingy on the map... don't forget to make a backup..

please make a new thread and not hijack this one. also include your error details and a test map in the new thread]

also, if your gonna steal someone else's signature, atleast fix the indenting and the variable names -_-

e/ didnt really read the post above. but if your looking for help than still please create your own thread.

@both of you, I'd reccommend disabling every trigger and seeing if it crashes. If the triggers caused it, than see which one. if not, keep them disabled than clear all object editor data with JNGP's object merger. agan, if no work, try wiping terrain. if that doesnt work, copy the terrain/objecteditor/triggereditor and pasting into a blank map

2e/ well i should read more. to specifically diagnose firebat's problem,

disable all spells and play for however long it usually takes to crash.
if no crash, than enable spells and than also enable nocooldown and spam the spells that were being used that you fataled in. if it did crash without spells, disable key triggers that might be causing it (e.g. spawn triggers, just run around the map killing prespawned creeps for an hour)

3e/ makai it shouldnt take but 15 minutes to copy your maps data into a slate
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
There are a lot of causes that can lead to a fatal error.

Most common using the function Player with an invalid index argument,
destroying invalid lightnings,
imported fonts,
the call of specific functions in the globals block,
creating cycles with spellbooks,
different aura abilities that use the same buff,
usage of optimizers if it does it faulty/bad configuration,
corrupt models,
unnecessarily high values

The game dying because of memory leaks is very scarce and you would notice the performance drop before. And yes, I think it has another error message. Infinite loops with no wait time instantly exit wc3 without error message.

The first thing you do is take a look into the created log file in Warcraft III\Logs of the crashed game. If the error is related to object editor data, the object in question's raw id (or in reverse) could appear multiple times in the memory dump.

Second, you just have to know how to reconstruct the problem. Then you can effectively insert debug messages to surround it.

GUI users cannot quite do it but dangerous spots in the code should actually be wrapped and secured beforehand by testing for faulty arguments.
 
There are a lot of causes that can lead to a fatal error.

Most common using the function Player with an invalid index argument,
destroying invalid lightnings,
imported fonts,
the call of specific functions in the globals block,
creating cycles with spellbooks,
different aura abilities that use the same buff,
usage of optimizers if it does it faulty/bad configuration,
corrupt models,
unnecessarily high values

The game dying because of memory leaks is very scarce and you would notice the performance drop before. And yes, I think it has another error message. Infinite loops with no wait time instantly exit wc3 without error message.

The first thing you do is take a look into the created log file in Warcraft III\Logs of the crashed game. If the error is related to object editor data, the object in question's raw id (or in reverse) could appear multiple times in the memory dump.

Second, you just have to know how to reconstruct the problem. Then you can effectively insert debug messages to surround it.

GUI users cannot quite do it but dangerous spots in the code should actually be wrapped and secured beforehand by testing for faulty arguments.

I belive he mentioned that the error occurse "During the process of loading screen", so I doubt half of the things you mentioned like created lightning can even start to happen. I think his map crushed from something that happens on loading screen, maybe even parhaps, a third party program which is why neither of us can actually tell what (Currupted Model bugged me before the loading screen ended, and since importing models is common, it might the it).
Funny fact: make "Forked Lightning" in distance and area of effect "stats: area of effect: 0" "stats: distance: 0" , when use the forked lightning the game will crush, this is because there is no WAVE that has no SIZE.
Its hard to tell what happen that bugged this map, most likely you will need to edit saved map from earlier version or keep tring to find what made it crush for the next few months.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
I belive he mentioned that the error occurse "During the process of loading screen", so I doubt half of the things you mentioned like created lightning can even start to happen. I think his map crushed from something that happens on loading screen, maybe even parhaps, a third party program which is why neither of us can actually tell what (Currupted Model bugged me before the loading screen ended, and since importing models is common, it might the it).
Funny fact: make "Forked Lightning" in distance and area of effect "stats: area of effect: 0" "stats: distance: 0" , when use the forked lightning the game will crush, this is because there is no WAVE that has no SIZE.
Its hard to tell what happen that bugged this map, most likely you will need to edit saved map from earlier version or keep tring to find what made it crush for the next few months.

Well, I found his response usful for my purpose which doesn't involve loading screen crashes (that is the purpose this thread was created for). So I think I'll rep him.
 
I'd check if any units are poorly setup in terms of morphing. I made morphing incorrectly and it crashed on loadtime. Where about does it crash? (first 5% of loading bar, last 10%, ect).

The morphing was handled by the spells Raven form and Nightelf form.

Also; adding items that mess with stats or experience to units that can use items will cause a fatal error.
 
I don't know why people rush to generalized conclusions here.

Let's face it: this fatal error could have THOUSANDS of reasons.

You can just order them by their probability.

90% of the time it's bad coding, like double-freeing a variable or incorrect input data on functions. Or (very likely) trying to access array variables outside of range.
The last 10% CAN (but very very unlikely) be corrupted models (assuming you made them yourself ... most models on hive have been checked out ingame to make sure they work before getting approved) and even corrupted tiles (I had this issue once... as soon as a unit stepped on that tile, the game crashed. Removing the tile fixed the problem).

However, it's almost always a code issue. Disable all triggers and run the map. If it still crashes, you can factor this out. If not, narrow it down by disabling groups of triggers one by one until you found the culprit.

Also, I had the same error appear when trying to morph a hero unit to a non-hero unit to have the hero quickbar icon on the left side of the screen for ordinary units. It works... until the icon gets shared via "full shared unit control" with other players. Boom!
Make sure you don't morph heroes to non-heroes and the opposite!
 
Status
Not open for further replies.
Top