• 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.

Map crash

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hey, my map crashes it happens randomly somewhen at 5 mins of game or at 15 but not to every player only to some.Idk what is repsonsible for crash i was thinking long checking replays when game crashed and still nothing players were doing normal things like they usually do.is there any program to check whats resposnible for crash or anyone who could help? i got replay where people crashes my friend recently removed all leaks from map
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
As rough guess with the information available I would have to say trigger leaks.

or a trigger logic error.
or invalid object editor data.
or a unit being placed too close to the edge of the map.
or a corrupt BLP being loaded.
or handle stack corruption due to destroying scheduled trigger objects.
or invalid requirement dependencies for a unit in the object editor.
or a corrupt model being loaded.

Yeh WC3 is not the most stable of games...
 
Level 11
Joined
Jul 17, 2013
Messages
544
You alreday helpped me with that map in past. Super good. Map was freezing then. You told me to change all models so i did it helpped. Well idk What to do leak tester which is on the give doesnt show any leaks i can give u map if u want? So u can take look at tiggers
 
Level 24
Joined
Oct 18, 2008
Messages
942
I could take a look if you want. I have a bit of experience with crashes, mostly from causing them by breaking warcraft in weird ways.

As rough guess with the information available I would have to say trigger leaks.

I keep hearing this but it sounds like such a myth/boogeyman to blame any unexplained crashes on. does it REALLY work that way?

or handle stack corruption due to destroying scheduled trigger objects.

what does "scheduled" mean here?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
what does "scheduled" mean here?
Trigger threads are executed in a scheduled way. One can order a trigger to run and then immediately destroy its trigger object. When it does run it has an invalid trigger object which eventually is evaluated.

There seems to be a temporary handle object that is created in response to trigger thread creation. As the parent trigger object for that has been destroyed, along with it already, it can get destroyed again. When the handle IDs are garbage collected the result is that the same handle ID, used by the temporary object, is freed twice so added to the free handle ID stack twice for reuse. The next 2 objects allocated get assigned the same handle ID. If these two objects are the same type, nothing bad happens. If these two objects are different types, the handle ID will derference to only one of them meaning one can pass the wrong object into a native. The result is either heavy data corruption, or a crash.

In retrospect I believe this might have been the cause of the "Unknown Armor Type" bug the one TD I played had. Triggers were corrupting the unit's armor type field by treating it as a non-unit object type.
 
Level 11
Joined
Jul 17, 2013
Messages
544
Does it crash by itself after 5-15 minutes if tested from the editor and no user input is given?
when you asked about it i decided to check it i went single players mode made every other slot comp and started i left computer like this for 50 minuts after 20 minuts when i went to check if game is ok it was ok, so i went away then came after 30 min i saw that game crashed i didnt move anything so it crashes by itself.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Is this crash predictable? Try repeating it a few times. If it is this is good because it becomes a standard test one can perform to help find the cause. Any change to the time before crash will mean the change is related to the crash cause in some respect. Once the cause is identified, it should be fixable.
 
Level 11
Joined
Jul 17, 2013
Messages
544
ok i dont have time for more test today i removed a few tiggers well i didnt tell you all important thing after i added to my map a few tiggers game starting to crash way more game was crashing before those few tiggers but hardly ever now it crashes often i will send you tiggers which i removed can they be responsible for crash?
Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Factory (+100g)
    Actions
        Set TempPoint = (Position of (Triggering unit))
        Unit - Create 1 Rebuild Factory for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
        Unit - Remove (Triggering unit) from the game
        Custom script:   call RemoveLocation(udg_TempPoint)

Code:
Untitled Trigger 001 Copy
    Events
        Unit - A unit enters (Entire map)
    Conditions
        (Unit-type of (Triggering unit)) Equal to Medium Mine
    Actions
        Unit - Add a 270.00 second Water Elemental expiration timer to (Triggering unit)
Code:
Turn Advance
    Events
        Time - Turn expires
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Set Reg_Group = (Units owned by (Picked player) of type City (+20g))
                Custom script:   set bj_wantDestroyGroup = true
                Player - Add ((Number of units in Reg_Group) x 20) to (Picked player) Current gold
                Set Reg_Group = (Units owned by (Picked player) of type Town (+10g))
                Custom script:   set bj_wantDestroyGroup = true
                Player - Add ((Number of units in Reg_Group) x 10) to (Picked player) Current gold
                Set Reg_Group = (Units owned by (Picked player) of type Oil Field (+100g))
                Custom script:   set bj_wantDestroyGroup = true
                Player - Add ((Number of units in Reg_Group) x 100) to (Picked player) Current gold
              
REMOVED ONLY THIS TIGGERS UNDER IT
Set Reg_Group = (Units owned by (Picked player) of type Factory (+100g))
                Custom script:   set bj_wantDestroyGroup = true
                Player - Add ((Number of units in Reg_Group) x 100) to (Picked player) Current gold
Code:
Wyzwalacz bez nazwy 001 Copy 2
    Events
        Unit - A unit Is attacked
    Conditions
        (Life of (Attacked unit)) Less than or equal to 39000.00
        (Unit-type of (Attacked unit)) Equal to Destroyed Factory
    Actions
        Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
        Unit - Set life of (Attacked unit) to (Max life of (Attacked unit))
Code:
Wyzwalacz bez nazwy 001 Copy 2 Copy
    Events
        Unit - A unit Is attacked
    Conditions
        (Life of (Attacked unit)) Less than or equal to 39000.00
        (Unit-type of (Attacked unit)) Equal to Rebuild Factory
    Actions
        Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
        Unit - Set life of (Attacked unit) to (Max life of (Attacked unit))
Code:
Wyzwalacz bez nazwy 001 Copy
    Events
        Unit - A unit Is attacked
    Conditions
        (Life of (Attacked unit)) Less than or equal to 200.00
        (Unit-type of (Attacked unit)) Equal to Factory (+100g)
    Actions
        Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
        Unit - Set life of (Attacked unit) to (Max life of (Attacked unit))

Oh well xd i dont really know if its those tiggers fault because game just crashed xdddddd at like 1 hour
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Untitled Trigger 001 Copy is a potential source of problems. "A unit enters (Entire map)" events must be used very sparingly, preferably only 1 trigger in the total map. Too many cause path finder to bug out and all manner of buggy behaviour.

There is a lot of "A unit Is attacked" events. Possibly try combining similar ones into a single trigger.

Set Reg_Group = (Units owned by (Picked player) of type City (+20g))
This leaks due to local declared local handle variable reference counter leak on return bug. There is no solution but using actions that do not leak or JASS directly.
JASS:
function GetUnitsOfPlayerAndTypeId takes player whichPlayer,integer unitid returns group
    local group g = CreateGroup()
    set bj_groupEnumTypeId = unitid
    call GroupEnumUnitsOfPlayer(g, whichPlayer, filterGetUnitsOfPlayerAndTypeId)
    return g // LEAK!!! g not null!
endfunction
 
Level 11
Joined
Jul 17, 2013
Messages
544
Untitled Trigger 001 Copy is a potential source of problems. "A unit enters (Entire map)" events must be used very sparingly, preferably only 1 trigger in the total map. Too many cause path finder to bug out and all manner of buggy behaviour.

There is a lot of "A unit Is attacked" events. Possibly try combining similar ones into a single trigger.


This leaks due to local declared local handle variable reference counter leak on return bug. There is no solution but using actions that do not leak or JASS directly.
JASS:
function GetUnitsOfPlayerAndTypeId takes player whichPlayer,integer unitid returns group
    local group g = CreateGroup()
    set bj_groupEnumTypeId = unitid
    call GroupEnumUnitsOfPlayer(g, whichPlayer, filterGetUnitsOfPlayerAndTypeId)
    return g // LEAK!!! g not null!
endfunction
[/QUOTE Hmm im wondering because units medium mines are hardly ever spawned for that tigger, so even if they are hardly ever spawned is this tigger able to crash map? Also do i copy that jass tigger to my map? I dont get it

Hmm im wondering because units medium mines are hardly ever spawned for that tigger, so even if they are hardly ever spawned is this tigger able to crash map? Also do i copy that jass tigger to my map? I dont get it
Removing this tigger doesnt help me map still crash

can this tigger be repsonsible for crash? if yes then how can i fix it
Code:
Begining Alliances
    Events
        Map initialization
    Conditions
    Actions
        Game - Set the time of day to 12.00
        Game - Set time of day speed to 0.00% of the default speed
        Unit - Pause Town (+10g) 2290 <gen>
        Trigger - Turn off minus pinka v2 <gen>
        Trigger - Turn off FinSovTreaty <gen>
        Trigger - Turn off lel <gen>
        Player Group - Add Player 3 (Teal) to Kathilich
        Player Group - Add Player 2 (Blue) to Kathilich
        Player Group - Add Player 8 (Pink) to Kathilich
        Player Group - Add Player 9 (Gray) to Musulm
        Player Group - Add Player 4 (Purple) to Musulm
        Player Group - Add Player 6 (Orange) to Musulm
        Player Group - Add Player 1 (Red) to moscow
        Player Group - Add Player 7 (Green) to moscow
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 2 (Blue) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 3 (Teal) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 4 (Purple) as an Ally)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 5 (Yellow) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 7 (Green) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 8 (Pink) as an Ally with shared vision)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 9 (Gray) as an Ally)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 6 (Orange) as an Ally)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally)
        Player Group - Pick every player in Kathilich and do (Player - Make (Picked player) treat Player 12 (Brown) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 2 (Blue) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 3 (Teal) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 4 (Purple) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 5 (Yellow) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 6 (Orange) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 7 (Green) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 8 (Pink) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 9 (Gray) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 10 (Light Blue) as an Ally with shared vision)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally)
        Player Group - Pick every player in byzanntuim and do (Player - Make (Picked player) treat Player 12 (Brown) as an Ally)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 2 (Blue) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 3 (Teal) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 4 (Purple) as an Ally)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 5 (Yellow) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 6 (Orange) as an Ally)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 7 (Green) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 8 (Pink) as an Ally with shared vision)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 9 (Gray) as an Ally)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally)
        Player Group - Pick every player in moscow and do (Player - Make (Picked player) treat Player 12 (Brown) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 1 (Red) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 2 (Blue) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 3 (Teal) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 4 (Purple) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 5 (Yellow) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 6 (Orange) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 7 (Green) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 8 (Pink) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 9 (Gray) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 12 (Brown) as an Ally)
        Player Group - Pick every player in Musulm and do (Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally)
        Game - Display to (All players) for 15.00 seconds the text: Axis will declare w...
        Game - Display to Player Group - Player 7 (Green) for 15.00 seconds the text: You are United Stat...



Well but i realised that my map started to crash often because of new version now its not possible to play till 20 minuts.in old version game crashed hardly ever. after many test i realised that if u go afk in single and u do nothing game lasts for 1h then it crashes. if u test at multiplayer and u play normal it lasts for about 20 min
 
Last edited by a moderator:
Level 11
Joined
Jul 17, 2013
Messages
544
i dont know what to do :( i removed that tigger but it still doesnt help. in new version of map i added some units, and tiggers which i posted here alreday.at this moment i removed ALL tiggers and im trying to test if game will last 2 hours
 
Level 11
Joined
Jul 17, 2013
Messages
544
Well i solved my problem, i remint myself that i recently added units close to border of map i removed them then tested twice i dont crash but at second test of my map my screen freezed . . . i couldnot do anything type or move all game stopped all ic ould do is hear music what can be responsible of it??? should i remove this tigger a unit enters whole map area? which i posted up here
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
i couldnot do anything type or move all game stopped all ic ould do is hear music what can be responsible of it???
Infinite loop. The game is trying to perform some task which is computationally impossible to solve. For example a trigger moving a unit to a region which as a result fires the trigger again in a loop.

should i remove this tigger a unit enters whole map area? which i posted up here
You should merge all of those triggers with the same event into one as the regions the event creates cause the WC3 some problems. However the event alone is not enough to cause an infinite loops. But one can make an infinite loop by creating a unit in response to map entry as that fires the trigger again for it.
 
Status
Not open for further replies.
Top