Local Handle Vars (Kattana's system)

Discussion in 'World Editor Help' started by Luth, May 20, 2006.

  1. Luth

    Luth Lex Luthor!

    I've recently been converting my map us being 100% MUI using Kattana's Local Handle Vars system, but recently we've been getting games where WC3 just shuts down. No crash message, no stack overflow... it just silently shuts down mid-game.

    What might cause this? Also, what should I look out for when using Kattana's system? (I'm usually pretty good about flushing local vars, and setting them to null)
  2. Jazradel

    Jazradel Helping people do more by doing less.

  3. emjlr3

    emjlr3 Change can be a good thing Staff Member

    don't set any timers you use with hadnle vars to null, and see how that helps, I know with my arena 75% of teh custom spells use it, and I have yet to have a problem with just not setting the timers to null, gl
  4. Luth

    Luth Lex Luthor!

    Well, I gave that a go. Still does the "no error" crash.

    Is there a way to see the "jasslocals.w3v" game cache file to see if something is making too many handle vars or something? Its not on my HD where I would expect it to be, so is it deleted, or a virtual file, or something?

    *edit*

    I am not setting ANY of my Timers to null until after they are Flushed, Paused, and Destroyed. (I always pause timers before destroying them... just in case) I even stopped setting units to NULL if they were part of a Handle variable. But this last game just ended with a "no error" shutdown.

    Any other ideas? Things I might have overlooked? ... any way to debug this?
  5. Luth

    Luth Lex Luthor!

    I hate to bump threads, but I really hate the game closing down for "no" reason. At least I waited a couple days before bumping, huh? ;)
  6. emjlr3

    emjlr3 Change can be a good thing Staff Member

    never set the timers to null, ever, plain and simple
  7. Luth

    Luth Lex Luthor!

    Even if you:
    local TIMER = GetExpiredTimer()
    DestroyTimer(TIMER)

    its still not safe to set TIMER = null ?

    Whats the reason behind that? Bad coding on behalf of the JASS Manager? The variable stays active, as if DestroyTimer were a delayed function call?
  8. emjlr3

    emjlr3 Change can be a good thing Staff Member

    not sure, like i said, never set timers to null, ever
  9. Luth

    Luth Lex Luthor!

    Okay, well... no timers are set to null, ever, for any reason at all. I used DestroyTimer(GetExpiredTimer()) whenever possible.

    It still no-error crashed after an hour and a half of play. :-/ So, what else could it be? I've gone over every trigger, and made sure nothing (except timers) leak, so chances of it being due to a memory leak is slim. Plus, I'm pretty sure those throw errors when they crash.
  10. deathtomato

    deathtomato Guest

    Well, i really have no idea since id ont use MUI, but since ur getting no help... Have you tried turning off triggers and deleting large parts (the complex bits) and seeing if it still causes shutdown. it may be a secific trigger or combination of triggers that cause it, if you can find out wchich one... GL
  11. emjlr3

    emjlr3 Change can be a good thing Staff Member

    well...it is said that this can happen when u set and sotred handle to null, so try taking those out too, if it still happens, convert to tables

    personally, 75% of the spells on my mp use local handle vars, and on like 20+ 45 minute games ive had 1 crash, so...., but yes the more u use the spells the more chance for the bug to happen
  12. Luth

    Luth Lex Luthor!

    Death: If it happened more frequently, I would. But it doesnt happen every game, and sometimes it'll happen after 30 mins, sometimes 90.

    What I am going to start doing, though, is listing which 10 heroes are in play every game, and mark whether or not it crashes, and at what point in time. It seems that this is the only debugging info I'll get. :-/

    Elm.. Emr... (damn, I can never remember your sn)... HULK: Units too, huh? I'll give that a once-over too, see if that helps.
  13. emjlr3

    emjlr3 Change can be a good thing Staff Member

    anything u set into handles, try not setting anything to null
  14. Luth

    Luth Lex Luthor!

    Well, so far so good. Played two long games today, over an hour each, and no crashes. Could be I fixed it, could be the broken hero wasnt selected.

Share This Page