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

Problemo: Map causes WC3 to crash

Status
Not open for further replies.
Level 6
Joined
Mar 29, 2004
Messages
109
A map I'm working on currently causes the client to crash anytime after 10 minutes of game play. It does it on 3 of the 3 comps I have tested it on and it only apears to happen when copious amounts of undead units are involved. I have been wrestling with the problem for several days now, tried many different solutions and none have helped.

If you want to se what's what run the map, choose the "Undead" game type and choose "n00b" difficulty otherwise you won't last long enough (needs much balancing). The error should occur within 20 minutes.

The map and the error log are included.

plz halp mee...
 

Attachments

  • (8) HQ's Hero Defence vB00.w3x
    713 KB · Views: 53
  • 2010-11-25 18.07.48 Crash.txt
    10 KB · Views: 111
Level 33
Joined
Mar 27, 2008
Messages
8,035
Maybe the cause can be focused on Leaks
I've downloaded it and checked, some of the Special Effect leaked
Example:
  • Special Effect - Create a special effect at (Center of HeroBlademaster <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
You should use this to clean it:
  • Special Effect - Destroy (Last created special effect)
Put that action right after the usage of Special Effect, example of full trigger:
  • Special Effect - Create a special effect at (Center of HeroBlademaster <gen>) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
  • Special Effect - Destroy (Last created special effect)
This is an example of leaks, you have done
Other than that, I haven't checked it yet

EDIT:
Point-type leaks found here:
  • spawn town
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
      • (Number of units in (Units owned by Player 11 (Dark Green))) Less than 100
    • Actions
      • Wait 10.00 seconds
      • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at (Center of CastleSouth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[2] Rifleman for Player 11 (Dark Green) at (Center of CastleSouth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[3] Knight for Player 11 (Dark Green) at (Center of CastleSouth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[4] Priest for Player 11 (Dark Green) at (Center of CastleSouth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[8] Militia for Player 11 (Dark Green) at (Center of CastleSouth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at (Center of CasteEast <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[2] Rifleman for Player 11 (Dark Green) at (Center of CasteEast <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[3] Knight for Player 11 (Dark Green) at (Center of CasteEast <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[4] Priest for Player 11 (Dark Green) at (Center of CasteEast <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[8] Militia for Player 11 (Dark Green) at (Center of CasteEast <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at (Center of CastleNorth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[2] Rifleman for Player 11 (Dark Green) at (Center of CastleNorth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[3] Knight for Player 11 (Dark Green) at (Center of CastleNorth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[4] Priest for Player 11 (Dark Green) at (Center of CastleNorth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[8] Militia for Player 11 (Dark Green) at (Center of CastleNorth <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at (Center of CastleWest <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[2] Rifleman for Player 11 (Dark Green) at (Center of CastleWest <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[3] Knight for Player 11 (Dark Green) at (Center of CastleWest <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[4] Priest for Player 11 (Dark Green) at (Center of CastleWest <gen>) facing (Random angle) degrees
      • Unit - Create SpawnTown[8] Militia for Player 11 (Dark Green) at (Center of CastleWest <gen>) facing (Random angle) degrees
      • Unit Group - Order (Units in CastleSouth <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideSouth1 <gen>)
      • Unit Group - Order (Units in CasteEast <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideEast1 <gen>)
      • Unit Group - Order (Units in CastleNorth <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideNorth1 <gen>)
      • Unit Group - Order (Units in CastleWest <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideWest1 <gen>)
      • Wait 10.00 seconds
      • Unit Group - Order (Units in CastleSouth <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideSouth1 <gen>)
      • Unit Group - Order (Units in CasteEast <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideEast1 <gen>)
      • Unit Group - Order (Units in CastleNorth <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideNorth1 <gen>)
      • Unit Group - Order (Units in CastleWest <gen> owned by Player 11 (Dark Green)) to Attack-Move To (Center of SideWest1 <gen>)
You should save the "Center of CastleSouth <gen>" as variables to be saved and cleaned its leak
You MUST learn how to clean leaks in warcraft triggering as leaks can really ruin the game
Learn it at Things That Leak Thread

EDIT 2:
Avoid the use of this:
  • Do nothing
Because a Do nothing trigger basically, does NOTHING
You can leave it BLANK on the trigger
A trigger will fire the Do nothing action and it will create a less-efficient trigger
 
Level 6
Joined
Mar 29, 2004
Messages
109
Interesting. I will test your hypothesis and get back to you. Now, to be clear, do all things need to be destroyed after use? If I use a disgusting amount of units over the coarse of a game should I delete the unit after they have been killed or is this an effect specific anomaly?

Thanks a bunch!
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There are CERTAIN things that should NOT be destroyed, if you're using that Region for several times (like you did in your map, once every 30 seconds summons)
The one that SHOULD be destroyed is Point/Location leak, not the Region itself, because you will use the Region until the end of the game (I presume)
So, you can do at Map Initialization, like this:
  • INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CastleSouth = (Center of CastleSouth <gen>)
The CastleSouth is Point-type variable
And to clean it, like this:
  • Actions
    • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at CastleSouth facing (Random angle) degrees
    • Custom script: call RemoveLocation(udg_CastleSouth)
After you cleaned it, the Point has missing, so you MUST create it again
Just add that Set CastleSouth action to the top of it before using it like this:
  • Actions
    • Set CastleSouth = (Center of CastleSouth <gen>)
    • Unit - Create SpawnTown[1] Footman for Player 11 (Dark Green) at CastleSouth facing (Random angle) degrees
    • Custom script: call RemoveLocation(udg_CastleSouth)
You MUST clean its Location/Point but you must NOT clean the Region (because once cleaned, you have no reference anymore, thus, you can't create anymore units
Btw, to destroy Region leak:
  • Custom script: call RemoveRect(udg_*YourVariableName*)
But this trigger has nothing to do with your map, maybe it has with cinematics or Boss Fight

Units that are DEAD/KILLED are removed/cleaned automatically
If they're still alive, it may called as "leak" until they died, and it will be cleaned automatically
But, unit living in map does not referred as leak, well, if you use Dummy Unit, that is a leak and you must clean it by using this:
  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
This action is famous in Spell Making as it removes excess units
 
Level 6
Joined
Mar 29, 2004
Messages
109
Okay, you have blown my mind. Every time I create a unit at the center of a region that point leaks (I presume you mean it hangs around and eats RAM) and the only way to stop that is to predefine the point, use it and then delete it rather than letting the engine automatically create it and then leave it hanging about?

Am I reading you right?

Holy crap, the implications are staggering. So this is why the Galaxy Editor for Starcraft 2 has a built in trash collector?

[Edit]
All those abandoned projects...I never knew...I am ashamed. /cry
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You got that right ! (I presume you have read that link, right?)
I didn't play (or even buy) Starcraft games so I don't know what you're talking about @.@
So, are you telling me that this is your first time encountering this kind of problem ?
I mean, you did many projects before but you never cleaned the leaks ?
OMG !
Anyway, keep improving !
 
Level 6
Joined
Mar 29, 2004
Messages
109
Yeah, I haven't actually finished a project because I get to a point where stuff just starts falling apart. As you can tell by looking in my triggers, I crave complexity and epicness in all my projects. I have about ten projects that were abandoned and only a few of those are still on disc somewhere. The rest have vanished into the ether. The last time I actually visited this forum (or any other) before yesterday was in 2006. I've been going it alone since then. The advances being made by the community as a whole are impressive to say the least an I am pleased that I have chosen to renew my membership. :p

I have skimmed the link you sent me. When I wake in the morning I will examine it more thoroughly and will be making a LONG list of leaks that need plugged.

{EDIT}
I thought I was about half way through plugging all the leaks but then I noticed that I was either creating more or only solving half the problem. i'm getting to the point where I can just look at the triggers and see the leaks...it's kind of fulfilling, in a way.

My next question, or rather clarification, is: Can I predefine a point and use the point over and over again without cleaning it or do I have to clean the point and redefine it every single time a trigger accesses it?

Also, I have some OLD jass script inserted in the map. Can jass leak too, or is it safe from that sort of thing?
 
Last edited by a moderator:
Level 12
Joined
Jan 30, 2009
Messages
1,067
First of all, at the top of the spawn town trigger, stick these variables here. They're all point vars.
  • Actions
    • Set CastleSouth = (Center of CastleSouth <gen>)
    • Set CastleEast = (Center of CastleEast <gen>)
    • Set CastleNorth = (Center of CastleNorth <gen>)
    • Set CastleWest = (Center of CastleWest <gen>)
    • Set SideSouth1 = (Center of SideSouth1 <gen>)
    • Set SideEast1 = (Center of SideEast1 <gen>)
    • Set SideNorth1 = (Center of SideNorth1 <gen>)
    • Set SideWest1 = (Center of SideWest1 <gen>)
BTW, you have a typo, you named a region "CasteEast" instead of "CastleEast" I used "CastleEast" because I didn't notice it till after.

Now, then the best way to go about cleaning the Unit Groups would be to make a Unit Group variable since you use the group twice. Set these right before you call the unit groups.

  • Actions
    • Set GroupSouth = (Units in CastleSouth <gen> owned by Player 11 (Dark Green))
    • Set GroupEast = (Units in CastleEast <gen> owned by Player 11 (Dark Green))
    • Set GroupNorth = (Units in CastleNorth <gen> owned by Player 11 (Dark Green))
    • Set GroupWest = (Units in CastleWest <gen> owned by Player 11 (Dark Green))
Then simply replace everything in the triggers that is taken care of by the variables. Then remove them all. Like so:

  • [...]
    • Unit Group - Order GroupSouth to Attack-Move To SideSouth1
    • Unit Group - Order GroupEast to Attack-Move To SideEast1
    • Unit Group - Order GroupNorth to Attack-Move To SideNorth1
    • Unit Group - Order GroupWest to Attack-Move To SideWest1
    • Wait 10.00 seconds
    • Unit Group - Order GroupSouth to Attack-Move To SideSouth1
    • Unit Group - Order GroupEast to Attack-Move To SideEast1
    • Unit Group - Order GroupNorth to Attack-Move To SideNorth1
    • Unit Group - Order GroupWest to Attack-Move To SideWest1
    • Custom script: call DestroyGroup(udg_GroupSouth)
    • Custom script: call DestroyGroup(udg_GroupEast)
    • Custom script: call DestroyGroup(udg_GroupNorth)
    • Custom script: call DestroyGroup(udg_GroupEast)
    • Custom script: call RemoveLocation(udg_CastleSouth)
    • Custom script: call RemoveLocation(udg_CastleEast)
    • Custom script: call RemoveLocation(udg_CastleNorth)
    • Custom script: call RemoveLocation(udg_CastleWest)
    • Custom script: call RemoveLocation(udg_SideSouth1)
    • Custom script: call RemoveLocation(udg_SideEast1)
    • Custom script: call RemoveLocation(udg_SideNorth1)
    • Custom script: call RemoveLocation(udg_SideWest1)
So as you can see, yes, you can use it over and over and clean it at the end. works fine.

JASS leaks as well, there's other ways of handling JASS leaks. The link provided in this thread was the OLD Leak thread. Here's the new one, that explains cleaning them in JASS as well: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/complete-list-things-leak-126761/

Hope that answered your questions. Took quite a while to type all that out correctly, and format it, ><
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Yes, Vizel, you can recycle the usage of POINT-type variable and CLEAN it, but you MUST NOT, clean the REGION
This is good:
  • Custom script: call RemoveLocation(udg_variable)
This is bad:
  • Custom script: call RemoveRect(udg_variable)
 
Level 6
Joined
Mar 29, 2004
Messages
109
Zomg!

My groups too? I'm only half way through the point fixes. Sigh. Oh well, off I go.

Thanks to both of you. I'll get back to you with my findings.

How in the heck are you putting triggers in the forum posts?
 
Last edited:
Level 13
Joined
Mar 24, 2010
Messages
950
going off Vizel's demo there make sure you dont have timed waits between making the var and removing it or it probably wont happen correctly. Gives a good chance another instance could occur before that ones removed.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
when you go to reply, click go advanced then in there, click the clog icon to wrap
  • tags around text. Now to get the text of the trigger, in the trigger window (the big one, not the one listing all the diff. triggers), right click the name of the trigger, choose "Save as Text" then paste it within the trigger tags. [trigger]Like this!
 
Okay, reviewing the map.


  • TRIGGERS
    • Leaderboard
      • Setup: Use Loop to make the trigger more efficient and clear.
      • Refresh: You could use my Death System to handle dead units.
      • Player Leaves: At the start of the trigger do Clear Group.
    • Dialogs
      • Nothing to do at them, atleast nothing easy.
    • Doors
      • They seem to be missing regions.
    • Commands
      • I would redo them completely.
    • Rest of Content
      • So much to fix, I'd rather do it personally than list everything on a post.

  • HOW TO
    • Clear Group
      • First, add this to the beginning of the trigger:
        JASS:
        set bj_wantDestorGroup = true
      • Secondly, Scroll all the way down on your trigger, and add:
        JASS:
        set bj_wantDestroyGroup = false
    • Looping
      • 1. Create a integer variable named: x0_index.
      • 2. CreateLoop
        • For each (Integer Index) from here to there, do (Actions)
          • Loop - Actions
      • 3. Add the actions inside, and use Index instead of numbering them by yourself.
 
Last edited:
Level 6
Joined
Mar 29, 2004
Messages
109
Leaderboard has not yet been optimized but i was thinking about using a loop. Dialogs will be removed in favor of a voting system I am still working out. Doors are left overs, should have been deleted, my bad. Commands are for in game beta testing and will be deleted when the game is done.

as for the rest....it's taking some time.

I don't know where this "clog" icon you speak of is. Hopefully if I get this tag thing you're laying down I can do it manually.

  • Spawn P12 1 Human North
    • Events
      • Time - Every 32.00 seconds of game time
    • Conditions
    • Actions
      • Wait 4.00 game-time seconds
      • -------- PART ONE --------
      • Custom script: bj_wantDestoyGroup = true
      • -------- Make the Units --------
      • Set PointSpawnNorth[0] = (Center of SideNorth0 <gen>)
      • Set PointSpawnNorth[1] = (Center of SideNorth1 <gen>)
      • Set PointSpawnNorth[2] = (Center of SideNorth2 <gen>)
      • Unit - Create SpawnHuman[10] Footman for Player 12 (Brown) at PointSpawnNorth[1] facing (Random angle) degrees
      • Unit - Create SpawnHuman[11] Rifleman for Player 12 (Brown) at PointSpawnNorth[2] facing (Random angle) degrees
      • Unit - Create SpawnHuman[12] Knight for Player 12 (Brown) at PointSpawnNorth[0] facing (Random angle) degrees
      • Unit - Create SpawnHuman[13] Siege Engine for Player 12 (Brown) at PointSpawnNorth[0] facing (Random angle) degrees
      • Unit - Create SpawnHuman[14] Mortar Team for Player 12 (Brown) at PointSpawnNorth[0] facing (Random angle) degrees
      • Unit - Create SpawnHuman[15] Priest for Player 12 (Brown) at PointSpawnNorth[0] facing (Random angle) degrees
      • Unit - Create SpawnHuman[16] Sorceress for Player 12 (Brown) at PointSpawnNorth[1] facing (Random angle) degrees
      • Unit - Create SpawnHuman[16] Spell Breaker for Player 12 (Brown) at PointSpawnNorth[2] facing (Random angle) degrees
      • Unit - Create SpawnHuman[17] Flying Machine for Player 12 (Brown) at PointSpawnNorth[1] facing (Random angle) degrees
      • Unit - Create SpawnHuman[17] Dragonhawk Rider for Player 12 (Brown) at PointSpawnNorth[2] facing (Random angle) degrees
      • Unit - Create SpawnHuman[18] Gryphon Rider for Player 12 (Brown) at PointSpawnNorth[0] facing (Random angle) degrees
      • Custom script: call RemoveLocation(udg_PointSpawnNorth[0])
      • Custom script: call RemoveLocation(udg_PointSpawnNorth[1])
      • Custom script: call RemoveLocation(udg_PointSpawnNorth[2])
      • -------- Send them Off --------
      • Set PointCastle = (Center of Castle <gen>)
      • Unit Group - Order (Units in SideNorth0 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Unit Group - Order (Units in SideNorth1 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Unit Group - Order (Units in SideNorth2 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Custom script: call RemoveLocation(udg_PointCastle)
      • Custom script: bj_wantDestroyGroup = false
      • -------- INTERMISSION --------
      • Wait 16.00 game-time seconds
      • -------- PART TWO --------
      • Custom script: bj_wantDestoyGroup = true
      • -------- Send the stragglers --------
      • Set PointCastle = (Center of Castle <gen>)
      • Unit Group - Order (Units in SideNorth0 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Unit Group - Order (Units in SideNorth1 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Unit Group - Order (Units in SideNorth2 <gen> owned by Player 12 (Brown)) to Attack-Move To PointCastle
      • Custom script: call RemoveLocation(udg_PointCastle)
      • Custom script: bj_wantDestroyGroup = false
Ahh, well jeeze, just tell me to use the tags. I had my wife over here looking for a clog icon for like half an hour with me.

anyways,

How is that? If I did anything wrong can you tell me what it is and why it is that way?

When exactly does the leak occur, is it immediate or does the information get lost on trigger close. I'm having a hard time intuiting where the leaks are when I don't know what's going on at the elemental level.

[Edit]

OMG, you mean a cog, right? Haha.

[Edit]

Okay, I still can't find it.
 
Last edited:
Level 12
Joined
Jan 30, 2009
Messages
1,067
Don't double post. You're doing it a lot. Use the Edit button instead.

The Leak is actually just a piece of memory that is infinitely stored, as far as I understand it. These add up and clog the system. So as long as you clean them eventually, it'll work out. The quicker you do so, the better, though.

Think of it like an AC Filter. The leaks are the dust particles on the filter. The sooner you get to cleaning it (When it needs doing), the better off you are, and the better your system will run. Speaking of which, I should clean my unit's intake screen, since I don't have a filter for it, >.>
 
Level 6
Joined
Mar 29, 2004
Messages
109
sorry about the double post. I keep catching myself doing it. My bad. I fix them when I see them. Bad habit, i suppose.

So I was testing the map and it came up with an error in the triggers which states that "Custom script: bj_wantDestoyGroup = true" is not a valid...thing. Is there another way that actually works for cleaning groups?....uh, I'll check the link I was given earlier, actually, so never mind, but maybe OffGraphic's syntax was off? It looked like a simple way to fix the problem, if it works.

Anyways, I digress, so back to the question I was going to ask: is that trigger I posted clean otherwise? If not, can anyone tell me (I don't mean that to sound passive aggressive) or suggest an alternate effective way to do it?

[Edit]

Whoops, looks like MY syntax was wrong, lulz. My bad.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
The syntax was off, in every instance of "bj_wantDestroyGroup = true" it should instead be:
  • Custom script: set bj_wantDestroyGroup=true
Set it like this, and it should work fine.

As for it being clean, it should be, but I'm not certain, it's being cleaned at multiple points, so I'm not entirely certain anymore, but I must also admit I'm not checking TOO thoroughly. >.>
 
Status
Not open for further replies.
Top