1. The poll for our 11th Music Contest is up! Help us choose the most awesome cinematic tracks by casting a vote!
    Dismiss Notice
  2. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice

A new TESH Syntax Highlighter for Warcraft 3

Discussion in 'Warcraft Editing Tools' started by looking_for_help, Dec 28, 2013.

  1. MindWorX

    MindWorX

    Blizzard Developer

    Joined:
    Aug 3, 2004
    Messages:
    689
    Resources:
    5
    Tools:
    1
    Tutorials:
    4
    Resources:
    5
    That's the report I've been getting as well, it happens randomly when switching between triggers, more often for some than others.
     
  2. Spellbound

    Spellbound

    Joined:
    Jan 9, 2005
    Messages:
    1,892
    Resources:
    14
    Skins:
    4
    Spells:
    9
    JASS:
    1
    Resources:
    14
    Specifically, for me, the crash happens when selecting a trigger with vJASS in it. I doesn't happen all the time - sometimes selecting trigger A will crash the editor, but other times I can select it and modify it without any problems. It seems really random.

    EDIT: MindWorX beat me to it lol
     
  3. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,736
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    maybe you have some infinite loop on your code if the highlighting hits a weird syntax situation. You can try limiting the number of draws to a finite number and display an error when it's reached.
     
  4. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Hm I doubt that this is the reason because then it would happen every time you select such a trigger, which apparently isn't the case here...

    Could you (or anyone else who experienced this problem) please upload a map with the exact trigger in it that was selected when this crash happened? Best would be an empty map with just the trigger in it (not posting the trigger here), because the forum software makes some minor changes to the trigger text.

    Also, can you remember if this happened when you selected the trigger for the first time after opening the map? Or did you already select it before? Which OS are you using btw?

    Also, can you explain what exactly happens when the crash appears? Does the editor freeze or do you get some error message (like: "Warcraft 3 has stopped working")?
     
  5. Spellbound

    Spellbound

    Joined:
    Jan 9, 2005
    Messages:
    1,892
    Resources:
    14
    Skins:
    4
    Spells:
    9
    JASS:
    1
    Resources:
    14
    It's not any specific trigger. Sometimes I can select a trigger and it's fine, and the next time I select it after have selected another one, it can crash. Another time I can select a trigger multiple times and it's also fine, and then select another one that was fine before, and then it crashes. Sometimes it crashes on the very first vJASS trigger I select. It seems to be completely random and has a risk of crashing whenever I select any trigger with vJASS in it.

    The crash is a runtime error iirc. I get an error message after which my editor is forced to close.

    My OS in Window 10 64bit

    EDIT: If I have some time tomorrow I'll try recreating the error.
     
    Last edited: Jun 25, 2017
  6. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,440
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I used to have this issue, but after the recent update on tesh, I havent encountered it.
     
  7. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,776
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    I managed to somewhat reliably reproduce the error in a test map and even made a video of it:

    SharpCraft World Editor Extended Bundle

    PS: I used the current WEX default installation. No manual update on TESH yet.
     
  8. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    You saved me a lot of trouble, with that map I was able to track down the error. Thanks a lot.

    Crash will be fixed soon.
     
  9. psxlover

    psxlover

    Joined:
    Dec 30, 2010
    Messages:
    62
    Resources:
    0
    Resources:
    0
    Out of curiosity, what was the cause?
     
  10. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    For some reason the lexer is iterating beyond the text string... since that causes undefined behavior, it sometimes works, sometimes not (= crashes).

    I'm not yet sure why this happens on this specific trigger (and not on other triggers I have tested so far), but there seems to be some code combination that is treated wrong by the lexer (so actually Bribe was more or less on the right track).

    However, since I have now a way to reproduce the error, finding the actual cause will be pretty easy.
     
  11. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    That worked actually faster than expected... some boundary check managed to slip through and caused the crash. Should be fixed now.

    Update to version 0.9.2
    • Fixed a lexer bug that could crash the editor
    • Fixed width of whitespace with fonts and font sizes
    • Fixed error on loading files from path with non-ASCII characters
    • Removed external interface (was unused anyway)
     
  12. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,776
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    Good thing I could help with that map. Now @MindWorX only needs to update WEX to the newest TESH. :)
     
  13. psxlover

    psxlover

    Joined:
    Dec 30, 2010
    Messages:
    62
    Resources:
    0
    Resources:
    0
    You can just replace tesh, no need to wait for a new WEX version.
     
  14. Spellbound

    Spellbound

    Joined:
    Jan 9, 2005
    Messages:
    1,892
    Resources:
    14
    Skins:
    4
    Spells:
    9
    JASS:
    1
    Resources:
    14
    The TESH folder in WEX is found in:

    profiles > Warcraft III - World Editor (WEX) > plugins [tesh is in here]

    Information courtesy of MindWorX.
     
  15. psxlover

    psxlover

    Joined:
    Dec 30, 2010
    Messages:
    62
    Resources:
    0
    Resources:
    0
    It doesn't throw errors any more, but it is as if tesh does not load at all when running from inside a folder with greek characters.
     
  16. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Hm ok, I only tried loading files (like style.txt) from paths containing greek characters. I didn't try putting the whole tesh into a folder with greek characters.

    I will take a look soon at this, thanks for the report.
     
  17. psxlover

    psxlover

    Joined:
    Dec 30, 2010
    Messages:
    62
    Resources:
    0
    Resources:
    0
    Thanks for you time :)
     
  18. MindWorX

    MindWorX

    Blizzard Developer

    Joined:
    Aug 3, 2004
    Messages:
    689
    Resources:
    5
    Tools:
    1
    Tutorials:
    4
    Resources:
    5
    Is this open again?
     
  19. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    957
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    New version available that accounts for the new patches and WEX versions.


    Update to version 0.9.3
    • Added all new natives of patch 1.29 to the keywords database.
    • Trigger editor name no longer restricted to "Trigger Editor" but all international names are supported now automatically.
    • Now opens correctly when placed in paths containing non-ASCII characters (took a bit).
     
  20. moyackx

    moyackx

    Joined:
    Feb 15, 2006
    Messages:
    782
    Resources:
    7
    Maps:
    4
    Spells:
    2
    Tutorials:
    1
    Resources:
    7
    Tons of love for you :D