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

Custom AI crashes Wc3 – I have a problem

Status
Not open for further replies.
Level 2
Joined
Oct 19, 2012
Messages
12
Hello guys, i have been making an RTS style map. With lots of units.
Now everything went smoothly, until one moment i imported a new custom AI into the map. A FATAL ERROR happened.

It only happens when i click on my unit, right at the start of my map.
Now if i don;t click on my units, everything goes well. Other AI's build bases and beat the crap out of eachother. But i cannot do a thing with my units, for if i click on the worker. BOOM fatal error.

I tried to solve this problem by exporting all of the object data and models and scripts out of the map, and importing them into the other map.
It fixed the problem, but temporaly. It happened again, as soon as i imported new custom AI, i click on my worker and again, FATAL ERROR.

Her's the error i get.
==============================================================================
Warcraft III (build 6401)

Exe: d:\warcraft 3\warcraft iii\war3.exe
Time: Feb 20, 2014 10:48:36.937 PM
User: ******
Computer: *******
------------------------------------------------------------------------------

This application has encountered a critical error:

FATAL ERROR!

Program: d:\warcraft 3\warcraft iii\war3.exe
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:00D43874

The instruction at '0x00D43874' referenced memory at '0x00000050'.
The memory could not be 'read'.


War3Build: 1.26.0.6401
Played Maps\Test\ICEWARS.w3x
Player 0 Squire Captain Race Human StartLoc 0
Player 1 Squire Captain Race Undead StartLoc 2
Player 2 Squire Race Human StartLoc 1
Player 3 TulMorga Race Undead StartLoc 6
Player 4 KharGal Race Human StartLoc 7
Player 5 WorldEdit Race Orc StartLoc 8
Player 6 Krul Race Orc StartLoc 4
Player 7 Krul Race Undead StartLoc 5
Player 8 GhoulMaster Race Undead StartLoc 3
Player 9 <Unused> Race Human StartLoc -1
Player 10 <Unused> Race Orc StartLoc -1
Player 11 <Unused> Race Human StartLoc -1
--------------------------------------------------------------

Please help, thanks in advance.:goblin_cry:
 
Level 6
Joined
Apr 23, 2011
Messages
182
This has to do with the triggers not the AI itself.

Yoy probably have some trigger loop that causes the error.... Is really easy to make one like that.
 
Level 2
Joined
Oct 19, 2012
Messages
12
This has to do with the triggers not the AI itself.

Yoy probably have some trigger loop that causes the error.... Is really easy to make one like that.

Yep, it's the AI trigger. Initializing AI script for player 4, that was the problem.
But that limits me with only few AI scripts in my map.
 
Level 2
Joined
Oct 19, 2012
Messages
12
try to disable the AI triggers. if the error persist so the trouble is not on the AI system.. I think it's possibly not becaused by the AI system..

Yep, it was AI. I disabled the newest AI script, and the map works.
Now i am not sure should i add other AI scripts i made into the map. I'm afraid if i do, that it will cause the error again. I have a feeling that i am limited to only 5 AI scripts so far.

Have any advice on how i will be able to add more scripts without the error?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
The instruction at '0x00D43874' referenced memory at '0x00000050'.
The memory could not be 'read'.
To translate this out of computer for you guys. It means that part of WC3 tried to dereference a null pointer struct element and update it. I am certain null is 0 in WC3 and the struct elements result in the offset of 0x50 (80 bytes). As this address range is read only (reserved for program code) it results in a fatal error when an instruction tries to write to it. luckily it does or it might corrupt the game in very dangerous and potentially insecure ways, or even cause a BSoD.

It could very well be possible there is some limit with the AI. However it is strange it occurs when you select your unit. However maybe it is no so strange as the AI might run out of a finite memory resource and overwrite data that just happens to be for you to select that unit.

Very strange indeed. Try importing the same working AI 5 or more times under different aliases. It would be a good idea to check if it is some limit to AI or just that a buggy AI script was somehow produced.
 
Level 2
Joined
Oct 19, 2012
Messages
12
what genre is your map? why not just use 1 ?

It is an RTS style map, with lot more units than Warcraft 3.

To translate this out of computer for you guys. It means that part of WC3 tried to dereference a null pointer struct element and update it. I am certain null is 0 in WC3 and the struct elements result in the offset of 0x50 (80 bytes). As this address range is read only (reserved for program code) it results in a fatal error when an instruction tries to write to it. luckily it does or it might corrupt the game in very dangerous and potentially insecure ways, or even cause a BSoD.

It could very well be possible there is some limit with the AI. However it is strange it occurs when you select your unit. However maybe it is no so strange as the AI might run out of a finite memory resource and overwrite data that just happens to be for you to select that unit.

Very strange indeed. Try importing the same working AI 5 or more times under different aliases. It would be a good idea to check if it is some limit to AI or just that a buggy AI script was somehow produced.

I read somewhere, that the game itself has a memory for AI scripts, when this memory is drained, a FATAL ERROR occurs. Now every AI drains certain amount of memory, depending of how complex it's script is. A simple AI with few build orders, will take less memory. Whilst ultimate smart AI with larger build order and conditions will devour more game memory. But that's just what i read on some other site. Maybe it is true.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Whilst ultimate smart AI with larger build order and conditions will devour more game memory. But that's just what i read on some other site. Maybe it is true.
It still does not explain why it crashes when he selects a unit. The AI works fine as long as he does nothing. The unit works fine without the AI and the AI works fine but it crashes if he selected the unit and the AI is active.
 
Status
Not open for further replies.
Top