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

Net splits, disconnects and crashes - What are the causes?

Status
Not open for further replies.
Level 9
Joined
Sep 8, 2004
Messages
633
I've been into Wc3 editing for quite a while already. I have finished quite some maps already. In all of those, I've been using GUI, simply because I never had the time nor discipline to learn JASS (I know basics and am learning now, but it will take a long time until I'm as good with JASS as I am with GUI).

For convenience's sake, you may assume that I use GUI the best way possible (except I don't use hashtables), I don't leave memory leaks (or just really few), I tie up all loose ends, optimize it through vexorian's map optimizer in the end etc.

Often though, when I've got a map full of GUI code, things start going wrong. Code that looks perfectly fine in the editor, just won't run at all ingame, do stuff completely wrong (again, although the code is perfectly fine), cause people to disconnect, cause the game to crash... etc.

What on earth could be the problem here? Is the GUI part coded so awfully that it causes problems like this? I know the JASS it becomes when compiling is pretty damn horrible - but this bad?

Who can tell me, what functions, combinations etc. cause the above problems on their own? Perhaps I accidentaly used something I shouldn't.

I'm getting pretty damn annoyed by the fact that good GUI code goes bad, and I'd like to find a way to fix it. Like I explained above, it'll take a huge amount of time until my JASS is on-par with my GUI, making it impossible to switch over easily.
 
Level 13
Joined
Mar 16, 2008
Messages
941
Well, desyncs shouldn't be that easy in GUI.
The most common desync reasons are GetLocationZ (height of a unit, dunno if it's available in GUI) on terrain deformations from shockwaves in fogs. Sounds stupid, but it happens when you try to get the height of a unit which is located over a shockwave. The deformation isn't "done" in the fog and causes a desync. Handle creation in a "GetLocalPlayer" block is another one (often used) but also requires a custom script.
Crashes can have a million of reasons. The most common are endless loops, division by zero (oh well, not a crash but a triggerstop) or invalid Player(x) usages. In GUI the allowed numbers are 1-16, in Jass 0-15. TriggerExecute in mapinitialization seem to cause problems too. The mapinitialization seems to be pretty bad at all, many things (I heard of multiboard creation there) can cause crashes.
These are the things that come to my mind atm.
 
Level 13
Joined
Mar 16, 2008
Messages
941
Mac users got "owned" by DamageArea, unholy aura with negativ reg and some other stuff, but I don't know what got fixed in the last (mac-including) patch. Several imports can cause such problems too, you could try to erase them one after the other and search for a baddy.

EDIT: Wait while lagging causes problems too.... sometimes :p
 
Level 9
Joined
Sep 8, 2004
Messages
633
Yeah, waits are bitches to use. I've tried them a few times, but they're very inaccurate and unreliable. They break things. Using timers is inconvenient in GUI though.

Perhaps I should have also noted that these crashes and disconnects occur randomly throughout the map. Previous two times, I noticed it was on an event, when something specific happened for the first time. Funny details is that it was two completely separate events...

It's as if too many triggers run at the same time and start causing trouble that way.
 
Level 9
Joined
May 30, 2008
Messages
430
As long as you don't try to turn off triggers one by one and check who of the is causing it we can't help a lot. But yes memory leaks, some of the JASS commands(duno which are i don't use JASS), Unit set as variable and when a trigger execute and the unit is dead it may cause desync, infinite loops as the others say and etc. In one of my 3 maps :wink: i was having an triger that was crashing the game it was very simple one (related to add/change ability level) it wasn't suppose to cause any problems but still 2 months till i rework the whole thing because nothing was fixing it.
 
I have been experiencing some very strange desyncss around GroupEnumUnitsInRange recently (in GUI that would be "Units In Range" unit group). You can start there. (anyone can confirm problems with that?)

If this is true, then it is most likely from the new patch (which fixed a group enum leak).

And to the OP, the code that isn't working is most likely just "bad" code.

If you have a single piece of code that isn't working, post a thread containing the trigger. This way we can help you debug it and find the issue. On the other hand it could also be a bug with the new patch, like I said above. Blizzard seems to love making crappy patches.

Anyways, I hope I helped even though I couldn't provide much information.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
I have been experiencing some very strange desyncss around GroupEnumUnitsInRange recently (in GUI that would be "Units In Range" unit group). You can start there. (anyone can confirm problems with that?)
If this is true, then it is most likely from the new patch (which fixed a group enum leak).
[...]
Oh please no :S I (and probably lots of other people as well) use that function a lot.
I'll search this problem in Wc3C to see if anyone is having the same issue.
 
Level 9
Joined
Sep 8, 2004
Messages
633
Hmm. I do use GroupEnumUnitsInRange. I don't use the "target of camera" part.

I would turn off the triggers one by one, but it doesn't work that way. Sometimes, the map doesn't crash at all, other times, it crashes after 20 minutes, another time after 7 minutes.

It's not related to a specific event. Only thing I noticed so far that each time it happened, someone did do something. Something being either using an ability, or triggering a trigger/function.

I know it's hard to help when I can't be specific, but it's a map full of code (all GUI), there's not one single trigger I can post, and I can't test through elimination.

That's why I want to know what others experienced so I can track down the "broken" functions/conditions/events and work around them.

Thanks so far!

[P.S. I noticed a mod set the topic to solved, though the problem I'm having personally isn't yet solved..]
 
Status
Not open for further replies.
Top