[Crash] Often game crash for at least 1 player each time

Level 4
Joined
Jul 13, 2012
Messages
84
My map frequently crashes upon loading for at least 1 player (most of the time it's just 1 player who crashes). The error is {294} ERR: path component index out of bounds. Any idea what causes this problem?
 
Level 11
Joined
Feb 27, 2019
Messages
277
I had a similar problem when using a custom ui. If the player had alt-tabbed during the loading of the game they would desync.
 
Level 39
Joined
Jun 23, 2007
Messages
4,058
My map frequently crashes upon loading for at least 1 player (most of the time it's just 1 player who crashes). The error is {294} ERR: path component index out of bounds. Any idea what causes this problem?

Is the person actually crashing or are they being booted back to the score screen?

I had a similar problem when using a custom ui. If the player had alt-tabbed during the loading of the game they would desync.

Make sure to check your calls of BlzGetClientScreenWidth/Height. When alt-tabbed they return zero which will cause a thread crash if you divide them, resulting in a desync for the tabbed player.
 
Level 39
Joined
Jun 23, 2007
Messages
4,058
If you get kicked to the score screen it's likely a desync. You can check your Documents\Warcraft III\Errors folder to see if a desync log was generated. It should generate one for other players as well. In the log it should state what turn the player desynced on, if it's on turn 001 then you either have some async code that runs on map initialization that causes the desync, or the person desyncing played a map before yours and something in their cache is leftover causing a mismatch on your map. I know CreepCampPathingCellDistance and some other gameplay constants can desync when playing different maps.

Crashes are another issue entirely.

If your map is in Lua you also need to make sure all objects are created from within the main function.
 
Level 4
Joined
Jul 13, 2012
Messages
84
Most of the time it works, but it's just unfortunate to remake when 1 player gets desynced. Any desyncs related to Set Unit Skin function?

Also, isn't this a culprit?
1647374200283.png
 
Level 7
Joined
Apr 1, 2019
Messages
153
If your map is in Lua you also need to make sure all objects are created from within the main function.
Hey can you explain exactly what you mean by this, cause my map crashes and uses Lua.

Also if your map crashes/kicks 1 player during loading, try running your map initialization trigger at game time 1.00 instead. I know if you do things like checking if player slots are filled/empty while loading it can descyn.
 
Top