• 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 to desktop

Status
Not open for further replies.
Level 4
Joined
Jul 20, 2012
Messages
83
Hi there, it's been awhile since I posted here something, but here we go:
The problem happened only once while testing my map.
Everything worked normally until I implemented Mercenaries into the game, as the style of a map is 5v5 Hero fight, you can buy Mercenaries at local Barracks. I bought Grunt unit which is a custom unit based on Grunt unit :D it has custom abilities, changed stats etc (it uses Unit Classification - Sapper/Suicidal for distinguishing it in future).
Mercenary such as this levels up with Hero, increasing its Damage, Armor and its main aura Ability. They can also carry and use items but drop them upon death.
Now, when it occured? My Grunt Mercenary having Boots of Speed increasing his Movement Speed was going, with my Hero, to kill a creep. But the creep with some other minions killed my Grunt, he dropped the items and that was the last image... then it froze and crashed to desktop with Fatal Error (access violation at war3.exe blah blah blah...).
I tried to simulate this situation again, but it didn't crash, Mercenary dropped items upon death etc and it went normally.
Fatal errors as CTDs never occured in my map until trying out this new feature, there shouldn't be any problem with triggers too, causing Unit - Dies to do something which is out of WE's capacity, I don't even have a trigger which is triggered when units such as Mercenary die...

While this problem can be complicated I'm just asking if there isn't any list of things causing errors or something (but not obvious ones of course) to check it out, or if anybody has an idea, post it right here please... Thank you!
 
Level 4
Joined
Jul 20, 2012
Messages
83
Although I have created my Secondary Inventory system, which is applied to Heroes only I have no triggers causing infinite loops, I do not even think I have any Loop trigger in the map. Yeah, I have one, but it is used only for stacking items like potions, the Grunt unit had only Boots of Speed...
I am asking this because I am going to test my map publically and do not want to get this kind of trouble again, that would be most unpleasant...
 
Level 4
Joined
Jul 20, 2012
Messages
83
Ok, been testing it one more time, it didn't crash for like an hour, then it crashed on event when Level 1 Creep - Skeleton died... as there are triggers causing neutral units to have a chance to drop random items, I was working on Boss Creeps that spawn with certain chance like in Diablo game... they have an extra chance of dropping special items that don't drop from regular Creeps. This new separate trigger had additional conditions "Is a building = FALSE" and "Is A sapper = FALSE"... after deleting condition "Is A building = FALSE" because no unit in map is classified as Building and Sapper at the same time the next test wasn't getting any crash...
I don't know what the real issue was and, having my fingers crossed, I hope that this was causing the awful crash...
Just letting you know ;)
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,993
A loop trigger to stack items? :goblin_wtf: , you don't need a loop, you need a trigger when a unit acquires an item (with charges), check if the unit has the same item type on the other slots and add the number of charges of the acquired item to the item which was already in the inventory, not really hard.
You should attach your map here, so we could see which problem it is.
And watch out double post.
 
Although I have created my Secondary Inventory system, which is applied to Heroes only I have no triggers causing infinite loops, I do not even think I have any Loop trigger in the map. Yeah, I have one, but it is used only for stacking items like potions, the Grunt unit had only Boots of Speed...
I am asking this because I am going to test my map publically and do not want to get this kind of trouble again, that would be most unpleasant...
I'm not talking about loops like in "For each integer A". I'm talking about implicit loops caused by infinite event queuing.

For example:
event A:
do something that triggers B.

event B:
do something that triggers A.

And please don't tell me you know you don't have something like this happening without checking for it, because sometimes we don't even realize this mistake.

Most common situations for event loops:
A trigger that kills a unit when a unit dies.
A trigger that drops/removes an item as soon as it is acquired in combination with a trigger that gives an item to a hero when an item is dropped. Most likely used when making stackable items like potions.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,993
its not needed a loop trigger to stack items, that's the most inefficient way. some common script mistakes are also these kind: unit acquires an itemX, create itemX and give it to hero manipulating item, trigger will repeat constantly without stoping, causing a fatal error.
 
its not needed a loop trigger to stack items, that's the most inefficient way. some common script mistakes are also these kind: unit acquires an itemX, create itemX and give it to hero manipulating item, trigger will repeat constantly without stoping, causing a fatal error.
You didn't even understand what I meant, bro.
 
Status
Not open for further replies.
Top