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

Most common reason a game crashes. (with no error message)

Status
Not open for further replies.
Level 3
Joined
Feb 3, 2005
Messages
36
I have a map that crashes at what seems like random times. The game just closes immediately and there is no error message. I assume there can be many reasons why this happens but i want to know what the most common reasons are.

EDIT:
Thanks for all your input. I've come to understand a bit more about mapping but here is where i am on my map. I'm pretty confident it isn't the triggers that are causing this no error message crash since i've checked for anything i could think of related to infinite loops in my triggers. I'm thinking now that it's the ai script. I use the AI Editor in WE and then i export the script. Then i open the script with notepad and change the hero settings so that i can have custom heroes with custom abilities that learn abilities over lvl 10. Here's where i think the problem is. When i make the Ai using a custom hero learn custom abilities over lvl 10 this problem seems to happen. However as i am testing right now with a normal hero with its normal abilities and the map seems very stable.

Another problem besides crashing without a error message is the short (i'm talking half a second or less) pauses during gameplay when i have the custom hero, abilities, etc edited in the script.

I can only guess it's not easy and i hope it doesn't involve learning a bunch of jass or scripting >< but what is going on?
 
Last edited:
Level 22
Joined
Jun 24, 2008
Messages
3,050
Well for triggers this is also an infinte loop, that crashes most games.

  • Infinte loop
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Region - Center Region <gen> at possition of ((random unit in (playable map area)
This causes fatal crashes cause of leaks.
"Possition of a unit" makes the game make a possition, and this is run 100 times a second.
If the game last 1 min there would be 6000 leaks. Same as if youve placed like 10000 units in a map. Fatal crash.
 
Level 5
Joined
Jan 13, 2008
Messages
173
For AIs, im guessin your goin to need to stop it, then start it again, instead of making it loop.
 
Level 12
Joined
Mar 26, 2005
Messages
790
well, but it is fast way how to get back to windows while testing a map and want to quit wc3 quickly, just type some message and some "loop-trigger) will start

Or if someone is chating cheats in singleplayer maps, run this triger also, it is cooler than game-lost action :)
 
Level 3
Joined
Feb 3, 2005
Messages
36
Thanks for all your input. I've come to understand a bit more about mapping but here is where i am on my map. I'm pretty confident it isn't the triggers that are causing this no error message crash since i've checked for anything i could think of related to infinite loops in my triggers. I'm thinking now that it's the ai script. I use the AI Editor in WE and then i export the script. Then i open the script with notepad and change the hero settings so that i can have custom heroes with custom abilities that learn abilities over lvl 10. Here's where i think the problem is. When i make the Ai using a custom hero learn custom abilities over lvl 10 this problem seems to happen. However as i am testing right now with a normal hero, and normal abilities it seems stable.

Another problem besides crashing without a error message is the short (i'm talking half a second or less) pauses during gameplay when i have the custom hero, abilities, etc edited in the script.

I can only guess it's not easy and i hope it doesn't involve learning a bunch of jass or scripting >< but what is going on?
 
Level 12
Joined
Mar 16, 2006
Messages
992
Way to figure things out:

Turn triggers off. If the map crashes, it's not the triggers. Etc.
 
Level 17
Joined
Aug 20, 2007
Messages
1,122
Interesting.. I have another question then. Infinite loops can happen anywhere and cause a fatal error? Like an Ai script for example.

Infinite loops don't give errors...

It just quits.

Oh and here are some more...

  • Inifinite Loops
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit - Order (Ordered unit) to Move To (Center of (Playable map area))
  • Inifinite Loops
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Selection - Select (Triggering unit)
  • Inifinite Loops
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Unit - Order (Attacking unit) to Attack (Attacked unit)
You'd pretty much know when it is infinite.
 
Level 3
Joined
Feb 3, 2005
Messages
36
Exactly. I think the problem is in the AI as i described above (now edited in the first post) but i don't really know how to spot it since all "loop" have a "endloop" in the ai script.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
If you are using WE-generated AI script, i am sure there would be no infinite loops.
If you still want to find the loop in jass, here is a tip: each loop has an endloop, it just says where the loop sequence ends. However, loop without "exitwhen" command will be definetely infinite. (or with a senseless condition, like "exitwhen false")
 
Status
Not open for further replies.
Top