• 🏆 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? O.o

Status
Not open for further replies.
Level 5
Joined
Jul 24, 2008
Messages
106
Hello there! I've been studying vJass systems and spells lately, implementing some of them into my map, until one time, I imported a spell. At first, everything went smoothly, I was able to save properly and my Jass Helper didn't detect any errors. After importing, I tested the map. While the map was loading, Warcraft III exited, and a prompt showed:

___________________________________________________
This application has encountered a critical error:
FATAL ERROR!

Program: C:\Documents and Settings\...
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F4C9290

The instruction at '0x6F4C9290' referenced memory at '0x00000024'.
The memory could not be 'read'.

Press OK to terminate the application.
___________________________________________________


Note: I tried other maps and they worked fine.
How do I fix this? :vw_wtf:
 
Those kinds of crashes often happen when:
a) You create something on declaration that shouldn't be created that way. (handles, i.e. multiboards especially)
b) You have object data that screws up your map.

Just a few questions:
1) Does the map run fine when you disable the spell's trigger?
2) Does it crash upon loading, and if so, at what part? (beginning, middle, or end)

If your answer to #1 is yes, then it is something to do with the trigger. Post the code here, often times it is from creating handles such as multiboards when declaring globals. For example:
JASS:
globals
    multiboard m = CreateMultiboard()
endglobals

Will cause that error. (I am pretty sure that is the problem) The resolve is to create it in an initialization function instead. For example:
JASS:
scope MultiboardNoCrash initializer Init
    globals
        multiboard m
    endglobals

    private function Init takes nothing returns nothing
        set m = CreateMultiboard() // this will work fine and won't crash
    endfunction
endscope

Otherwise, answer #2 or post the map.
 
Level 5
Joined
Jul 24, 2008
Messages
106
Otherwise, answer #2 or post the map.

I don't have any multiboards in Jass, or anything. All I have is spells. I've deleted the spell trigger from my map, and it still crashes. It crashes at the beginning of the loading.

Edit: I've also disabled all the other Jass stuff in my map, and same results are shown. :(
 
Level 2
Joined
Mar 5, 2010
Messages
34
Hi everyone. I've been holding and making a map for 3 years. My team and I have been playing it for almost 3 years (for fun). About 1 month ago, a problem popped:

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

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

I am clueless and requieres help.
I'll try to give as many clues:
1: The Fatal Error happens at random times. It can be 15 or 45 minutes into the game.
2: The more players into the game, the more likely it will ''fatal error'' crash
3: I thought it would be a leaking spell. But it happened so many times and never with the same heroes in the game. Moreover, those heroes (and the spells/triggers they use) were in the game before.
4: The only constant correlation I found was a player, one of my friend. 100% of the time it crashed, he was in the game.
5: The game crashes about 1 game out of 3. (so damn annoying)

If anyone knows anything about that code, any clues will be helpful. I could post the map for further investigation, if a brighter eye would agree to look it up. Only know that my map is kinda loaded and has alot of triggers, so going triggers by triggers would probably take a month without sleep.

Furthermore, I have been using Vexorian's map optimizer forever. Ask if I forgot anything helpful.

Thanks, i'll check your replies.
 
Level 2
Joined
Mar 5, 2010
Messages
34
I implemented a HandleCount trigger to look at what was going on inside the game...

function HandleCount takes nothing returns nothing
local location L = Location(0,0)
call BJDebugMsg(I2S(GetHandleId(L)-0x100000))
call RemoveLocation(L)
set L = null
endfunction

//===========================================================================
function InitTrig_HandleCounter takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,0.09,true)
call TriggerAddAction(t,function HandleCount)
endfunction

Doing so, I realised some old triggers I would not suspect were actually lacking either locations, sounds, spec effects or unit groups. I hope that solves it. An overload of leaks would indeed explain it.

All in all, my main worry is whether this crash results from outside of the script. If removing leaks solves it, I will advise you here.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Well... No No

As said, we played the game again. I reworked on my triggers; it still did crash. 2 times out of 3, it happened between ~20-30 minutes. Anyone knows anything about that crash :/.

Maker, I will send it to you. Thanks in advance for your time/help.

Aero
 
The instruction at '0x6F4D9FCA' referenced memory at '0x986D0158'.

If the second hexadecimal number was 0x00000024, then the cause is usually an infinite loop.
Here, the game is trying to read memory that has been allocated in the same thread that it's
being read. I guess you're creating some null unit or something like that. I'm sure it has nothing
to do with player handles since they're pretty much static and should have places in memory
closer to 0x6xxxxxxx than 0x9xxxxxxx.

Only know that my map is kinda loaded and has alot of triggers, so going triggers by triggers would probably take a month without sleep.

Or just 5-10 minutes if you skim well ;)

4: The only constant correlation I found was a player, one of my friend. 100% of the time it crashed, he was in the game.

What was his name in-game? Maybe it's a 'string' problem ;o
I can't think of one though.

/bro/tip: Leaks only stop lag, they don't cause fatal errors (Unless you have WAY too many; I'm talking GBs)
 
Level 2
Joined
Mar 5, 2010
Messages
34
Thanks Magther. To be honnest, I understand nothing of those codes (0x6xxxxxx).

My concern is... Can I actually do something to stop that? If it ain't leaks, then what is it?

I have a loopback adapter on my PC, can it be an IP conflict?
Back to the ''String Problem'', be sure that my friend's name figures nowhere in my triggers, same goes for any player name including me :p

I will send the map to you too. You know better than me how to look it up :/
 
Level 2
Joined
Mar 5, 2010
Messages
34
HoW

Here's the map. Thanks for your time!
 

Attachments

  • Heroes of Wonder v1.72.w3x
    7 MB · Views: 83
Level 2
Joined
Mar 5, 2010
Messages
34
Exception: 0xC0000005(ACCESS_VIOLATION) at 001B:00000001

The instruction at '0x00000001' referenced memory at '0x00000001'
The memory could not be 'written'.

That happened again.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hello there! I've been studying vJass systems and spells lately, implementing some of them into my map, until one time, I imported a spell. At first, everything went smoothly, I was able to save properly and my Jass Helper didn't detect any errors. After importing, I tested the map. While the map was loading, Warcraft III exited, and a prompt showed:

___________________________________________________
This application has encountered a critical error:
FATAL ERROR!

Program: C:\Documents and Settings\...
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F4C9290

The instruction at '0x6F4C9290' referenced memory at '0x00000024'.
The memory could not be 'read'.

Press OK to terminate the application.
___________________________________________________


Note: I tried other maps and they worked fine.
How do I fix this? :vw_wtf:

u use ability preload system ?

or maybe coz of importing stuffs to map?
idk with me also happened when i imported attachment for test if attachment is good for villager or no, so i imported, deleted the attachment and imported again and when i used save as for save another name both maps dont worked but original yes but this was in regular WE and 100% sure was something import problem in my case coz it was test map without trigger (i checked and i dont got where i used deleted item model so i gived up and continued on original map). if this is the problem then i curios why happened that?
 
Level 2
Joined
Mar 5, 2010
Messages
34
I realised some of my triggers were still refering to ''dying unit'' to the event ''A unit dies''. Since I had a couple of triggers firing to that event, could it be that the ''dying unit'' conflict and causes the crash?

btw thanks for your help Magtheridon I sincerly appreciate it.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Giving feedbacks: We played three games tonight; none of which ended up crashing.

All I did meanwhile was:
I did fix some issues with the ''dying unit'' being to often refered to.
I also remade the triggering for the phial filling which was terrible.

If those were creating the crashes, may I be damned. If the peace persists, I shall advise you here.
 
Level 2
Joined
Mar 5, 2010
Messages
34
0xC0000005 at 001B:02629F46
0x02629F46 referenced memory at 0x97780088

happened again :(

I noticed crashes are likely to happen when the game is having an intense team fight. When everyone drops his spells. I can't have people playing it like that, making their PC crash everytime. I hope you can see through this. To me, it could be anything...
 
Level 2
Joined
Mar 5, 2010
Messages
34
Sadly, i dont master Jass enough for that. Processing load causing the crashes definitly makes sense. It would expain the correlation with the number of players.

In these conditions, how do you propose I fix it? Have you ever heard of any case like that?
Although I have a ton of spells trigger, only some of them are used every game due to the fact that only one hero has a spell and a maximum of 10 heroes will be involved. I hope that did make sense :/

You said : ''For one system, you'd never ever need more than one
  • ''. does that refer to the fact that I use alot of loops?
 
Level 2
Joined
Mar 5, 2010
Messages
34
Hahahaha

Since it's christmas time, I'm on the go so I can't focus much time on solving the crash. BUT. Last night I had a dream and it said : go check your assist system, its all messed up.
To my humble and greenhorn eyes, it could be that. It could definitly be that.

I tried working on it by myself. The way it worked was : Units would be created outside the map (X of region offset by 10000000000) Can that crash?
 
Level 2
Joined
Mar 5, 2010
Messages
34
0xC0000005 (ACCESS_VIOLATION) at 001B:6F4D9FCA
The Instruction at '0x6F4D9FCA' referenced memory at '0x99F80158'
The memory could not be 'read'

Although I made units appear into the map, it still happened. :(
I really dunno... I think i'm gonna remove the Assistance system and see if it solves. Am I going to remove trigger by trigger until I find it? Those crashes are a nightmare.
 
Here:

JASS:
function BoundSentinel_Actions takes nothing returns boolean
    local unit u = GetTriggerUnit()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    
    if x > udg_maxX then
        set x = udg_maxX
    elseif x < udg_minX then
        set x = udg_minX
    endif
    
    if y > udg_maxY then
        set y = udg_maxY
    elseif y < udg_minY then
        set y = udg_minY
    endif
       
    call SetUnitX(u, x)
    call SetUnitY(u, y)
    
    set u = null
    return false
endfunction

function InitTrig_BoundSentinel takes nothing returns nothing
    local trigger t = CreateTrigger()
    local region r = CreateRegion()
    local rect rc
    
    set udg_minX = GetCameraBoundMinX() - 500
    set udg_minY = GetCameraBoundMinY() - 500
    set udg_maxX = GetCameraBoundMaxX() + 500
    set udg_maxY = GetCameraBoundMaxY() + 500
    
    set rc = Rect(udg_minX, udg_minY, udg_maxX, udg_maxY)
    call RegionAddRect(r, rc)
    call RemoveRect(rc)
    
    call TriggerRegisterLeaveRegion(t, r, null)
    call TriggerAddCondition(t, Condition(function BoundSentinel_Actions))
    
    set t = null
    set r = null
    set rc = null
endfunction

This is a Jass version of BoundSentinel by Vexorian. (It works in the normal World Editor)
Just create a trigger, convert to custom text, and paste this code.
Then, create 4 real variables: maxX, maxY, minX, minY.
That's all you have to do.

This will reduce the chances of crashing ^_^

What it does is detect when a unit leaves the map bounds.
When that happens, it just puts that unit back in :D
 
Level 2
Joined
Mar 5, 2010
Messages
34
Thanks, I'll paste the trigger in my map and provide some feedbacks. This can be useful in every way. Giving some Reputation point.
 
Level 2
Joined
Mar 5, 2010
Messages
34
3 days, several games, no fatal crash. Would it be to optimistic to cheer?
For now, not having units outside the map solves it.
 
That's great to hear :D
I'm glad I could help ^_^

The error is actually this:

Warcraft III runs at 60 FPS typically.
It tries to render everything on the map 60 times a second.
A unit is outside the map bounds.
Warcraft III needs to render the unit, but at the same time, it's restricted to render anything outside the map bounds.
Thus, the game will freeze due to some infinite loop (Tries to render, can't, still needs to render unit, tries to render again, can't, still needs to render unit, etc..)
And eventually, the game crashes. :p
 
Level 2
Joined
Mar 5, 2010
Messages
34
Nop! It crashed today. Right when the massive team fight happened. This leads me to thinking the map can't stand the rushing of many spells using Loops. Especially loops running every 0.02 - 0.05 seconds.

sigh.
I'll try to reduce the usage of very tight loops.
 
Level 2
Joined
Mar 5, 2010
Messages
34
Do you think it can make a difference if I change triggers using 0.02 periodic events to 0.05? By the way none of them is kept active longer than the spell duration.

The fact that crashes ALWAYS happen when team fights break out makes me think that the map cannot run all of the spells including their looping. The fact that crashes mostly happen when there are alot of players in the game kind of confirms that as well. Therefore, before I start replacing most of the heaviest spells, I'd like to know what you're feeling is about this. I really thought I got it solved when I fixed the -units outside map bounds thing-, but now I think it's some kind of overloading loops and heavy triggers stuff.

Can the game crash if it tries to read 4 or 5 triggers using 0.03 periodic events at the same time?
 
Last edited:
Level 2
Joined
Mar 5, 2010
Messages
34
My problem is not solved, still. Magtheridon, I have a question for you:

What are the possible cause for a Fatal Error to crash a wc3 game?

PLease, try to throw as many valuable reasons that pop to your mind and I shall try to go the other way around to put my finger on that crack.


P.S: I heard massing too many special effects coming can cause a crash. What do you think about that also?
 
Level 2
Joined
Mar 5, 2010
Messages
34
I don't use the damage area fonction. For the same effect, i usually create a dummy unit with a dummy AoE spell such a thunder clap. So I don't think that would be it :/

For the leaks, I am constantly working on removing them when I meet some. The version of the map I posted may contains leak that I have already caught.

From now on, we should use the other topic I created so it doesn't split the flow of things. You may close this one.
 
Status
Not open for further replies.
Top