• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Crash] Insolent Crashes

Status
Not open for further replies.
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 64
Joined
Jan 18, 2005
Messages
27,258
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