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

[Crash] Insolent Crashes

Status
Not open for further replies.
Level 17
Joined
Oct 10, 2011
Messages
459
Hi

I've made a map called The Last Blade
See the link below:
http://www.hiveworkshop.com/forums/maps-564/last-blade-v3-0-a-237298/

And I've some big problems

Some players told me that the map crashes every time when an event is finished

this is the message :

_________________________________________________________
|This application had encountered a critical error:
|
|FATAL ERROR!
|
|Program g:\warcraft iii\ war3.exe
|Exception 0xC0000005 (ACCESS_VIOLATION) at 0023:6F3F6944
|
|The instruction at '0x6F3F6944' referenced memory at '0X00000024'.
|The memory could not be 'read'.
|
|Press OK to terminate the application
|__________________________________________________________

I've checked on the interenet I couldn't see what causes that crash

Trigger summary :

turn off this trigger

pause event timer
destroy event timer window

start timer 1 if the timer was running
start timer 2 if the timer was running
start timer 3 if the timer was running

turning off a trigger
turning off an other trigger

display a message

Comparing 2 reals HP team 1 and HP team2
(this is a big condition with 10 condition in in maybe 50 lines)
and giving some bounty to players

wait 3 seconds

running an other trigger that moves back the heroes to the location before the event wit the ancient
amount of HP and Mana


in this trigger summary I don't see something that could crashes the game only the timers
so I've created a boolean to know if a timer is running or if it is not created

The problem is when I test my map alone or when I play it alone but with computers I don't have that
crashes
I've played the map 18 times this week and nothing

Trigger Link
http://www.hiveworkshop.com/forums/triggers-scripts-269/crashing-trigger-254886/#post2558191
I've read that sometimes warcraft 3 can crashes because there is not enought RAM
I checked I don't have memory leaks

So if some body have some ideas
to detect this
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Null pointer dereference. The game is trying to do some operation on an object that does not exist.

Most likely cause from looking at your trigger is that you are performing operations on null units. An example...

For each (Integer A) from 1 to 12, do (Actions)
Boucle - Actions
Héros - Activer experience gain for Hero[(Integer A)]
You see, you are turning on experience gain for all units in the array from index 1 to 12. Unless all those indices actually have a unit assigned to them you will be turning experience gain on for "null". Sure some natives allow null as a valid operand but not all do. Maybe this is causing the crash, maybe it is not, but chances are one such action is.

An example for what I mean is if you ever try and attach an event to "Player(16)" (in JASS, this is player 17 in GUI, a nonsense player that does not exist). The game will instantly crash as it either does not like 16 as an operand for the Player native or the event does not like the invalid player generated.

How to solve? Simply add a test to check if the index actually contains a unit before doing anything to that unit! This is obviously a test against null ("No Unit" in GUI). If the array slot contains no unit then do nothing, otherwise do your operations on the unit.

Such tests should be done to all variables that you are not certain have a valid object before using that object.
 
Status
Not open for further replies.
Top