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

[Crash] Can't find the error.

Status
Not open for further replies.
Level 9
Joined
May 21, 2014
Messages
580
Okay. First of all, greetings Hive!

I am in deep trouble. I have a Survival Custom Map. The map is already near completion, but while I was testing it, Warcraft 3 closes with no error message at all; meaning it might have been an error in triggers (possible an infinite loop or whatsoever.)

I can't seem to find the error, and this already happened twice on me.
I already have a lot of triggers, and I don't know where to even look for it.

The crash happens when I complete the final upgrade of the Main Hall, in which completing the final upgrade would replace the Main Builder into a Technician. It works fine, but always after a few seconds, the crash will take place.

Please, Hive, help me in this problem. Thanks...
If you need the triggers, I can post them, but there are too many of them already.

  • Upgrade Main Builder
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Imbued Town Hall
    • Actions
      • Unit Group - Pick every unit in StartingUnits and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Owner of (Picked unit))
            • Then - Actions
              • Unit Group - Remove (Picked unit) from StartingUnits
              • Unit Group - Remove (Picked unit) from PlayerUnits
              • Unit - Replace (Picked unit) with a Technician using The new unit's max life and mana
              • Unit Group - Add (Last replaced unit) to StartingUnits
              • Unit Group - Add (Last replaced unit) to PlayerUnits
              • Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))
            • Else - Actions
This is the trigger that updates the Main Builder into a Technician.
StartingUnits is a Unit Group that stores all the Main Builder Units from all players.
PlayerUnits is a Unit Group that stores all the Units of all Players (Including Main Builders)

EDIT AND UPDATE:
The crash exactly happens when I click the Build button of Techinician. This doesn't have problem with clicking the button of Build in Main Builder. But Technician's Build button triggers the crash.
 
Ok without all upgrades and stuff... if you place a Technician on your map, run it and hit the build button, does it also crash? If not:
It can be that the build ability isn't updated when you replace a unit builder with another builder. Try to store the units life percentage, remove it and create the new unit.
else...
check if the unit is a builder and have valid buildable stuff Let me know if you still couldn't find it
 
Level 9
Joined
May 21, 2014
Messages
580
Ok without all upgrades and stuff... if you place a Technician on your map, run it and hit the build button, does it also crash? If not:
It can be that the build ability isn't updated when you replace a unit builder with another builder. Try to store the units life percentage, remove it and create the new unit.
else...
check if the unit is a builder and have valid buildable stuff Let me know if you still couldn't find it

:vw_death: Thanks for trying to help me out. I appreciate it.

I placed a Technician in the map;
Clicking the Build Button crashes the game.
I removed all the Buildable Units in Techtree - Structures Built of Technician;
It stopped crashing.

When I put back all the structures built, it started crashing again. It must really be the data over there that must be something wrong. Or a data in some building must have something wrong as well.

I wonder what I'm doing wrong... All the units in the Techtree Structures Built are valid buildable stuff...
 
Level 9
Joined
May 21, 2014
Messages
580
Solved.

After tinkering with so much possibilities, I have found the cause why it crashes. I posted another post to gain the attention of other map makers there to warn them.

Techtree - Dependency Equivalence is what renders clicking the build button crash the game.

I have a building called Charger. It can be upgraded to Upgraded Charger, then to Power Plant. In the Object Editor, I have 2 Chargers; one built by the Technician and the other built by another unit called the Manager (Upgraded Assistant Builder.) I put, in the Techinician's Charger Dependence Equivalence, the Manager's Charger, and then I put in the Manager's Charger Equivalence the Techinician's Charger.

Apparently, this causes the game to crash. The solution here is that you should only put one equivalence from any unit you want to be equated with.
 
Status
Not open for further replies.
Top