1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

A new TESH Syntax Highlighter for Warcraft 3

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

  1. MindWorX

    MindWorX

    Joined:
    Aug 3, 2004
    Messages:
    690
    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,962
    Resources:
    16
    Icons:
    1
    Skins:
    5
    Spells:
    9
    JASS:
    1
    Resources:
    16
    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:
    8,121
    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:
    964
    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,962
    Resources:
    16
    Icons:
    1
    Skins:
    5
    Spells:
    9
    JASS:
    1
    Resources:
    16
    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,505
    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,804
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    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:
    964
    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:
    63
    Resources:
    0
    Resources:
    0
    Out of curiosity, what was the cause?
     
  10. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    964
    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:
    964
    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,804
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    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:
    63
    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,962
    Resources:
    16
    Icons:
    1
    Skins:
    5
    Spells:
    9
    JASS:
    1
    Resources:
    16
    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:
    63
    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:
    964
    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:
    63
    Resources:
    0
    Resources:
    0
    Thanks for you time :)
     
  18. MindWorX

    MindWorX

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

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    964
    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:
    798
    Resources:
    7
    Maps:
    4
    Spells:
    2
    Tutorials:
    1
    Resources:
    7
    Tons of love for you :D