1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[SOLVED][Jasshelper Crash] - reaching maximum number of lines

Discussion in 'Warcraft Editing Tools' started by Wareditor, Dec 27, 2017.

  1. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    I have encountered a very strange bug that seems to make my jasshelper crash when trying to compile my map.

    This is the error given :
    jasshelper bug.PNG

    I am using Cohadar's Jasshelper and I can't switch to Vexorian's because I am using a lot of the features of the Cohadar's one. My script is very long

    Trying to understand where came the issue, I found that I was able to compile the map when I removed parts of some code. At first I thought it was that specific code that was prompting this issue but as I have found the code was 100% clean. I must not see something, right ?

    So I started to rewrite this part of the code line by line and compiling each time I added a new line. All was fine until it crashed again. So then I thought I found the line that was causing the issue but it seemed fine. Then I erased the line but left it empty and compiled again. It crashed again ! Then I removed the empty line and compiled... It compiled fine ! Then I thought that maybe my code was so long that any new line made it crash.
    I verified this last theory by adding random empty lines anywhere in the code and trying to compile. Without the empty lines, the code would compile, when I added only one more empty line anywhere in the code it crashed with at all time the same error.

    I am not sure that I have reached the maximum numbers of lines because I have only (by checking the war3map.j with an MPQ editor) 93810 lines of code and I have heard of bigger projects. Though the war3map produced by JNGP and found in its folder is 133044 lines long (though with tones of empty lines).

    TL;DR : adding one more line of code anywhere in the script makes my map crash when previously it would compile fine.

    Can somebody help me with this issue ? Maybe find a fix ? Maybe find the real reason (because I don't think there is even a maximum number of lines, and if there is it must be much higher than that...) ?
     

    Attached Files:

  2. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,408
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    This is one of the issues you get when you're using a dead project as a base for your systems. I don't think anyone can exactly help you with this, but can you at least post the script so we can investigate?
     
  3. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Tried different things and I am definitively thinking it's not coming from reaching too many lines. I have tried to add tons of lines to an old back up of my map and the Jasshelper actually gave me an error relating to it. Will continue to investigate and report here.
     
  4. I tried to cope with the intricacies of Cohadar JassHelper at some point too. Not worth it. That thing shouldn't even be bundled with JNGP.
     
  5. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Well contrary to what I said last post I think I really reached the max number of lines Jasshelper can handle.
    I created a new map and just copy pasted empty GUI triggers (it still produce code) to an absurd amount. I got a "parse stack overflow" error (cohadar's and vexorian's both produce the same error).

    The irony is that disabling jasshelper will actually make this test map savable.
     

    Attached Files:

    • test.w3m
      File size:
      310.1 KB
      Views:
      27
  6. Gismo359

    Gismo359

    Joined:
    Jul 14, 2011
    Messages:
    780
    Resources:
    44
    Packs:
    4
    Maps:
    40
    Resources:
    44
    I remember that pjass had a smaller line limit in the past, so I suggest updating it from PJass updates

    There was also some kind of fix for cohadars jasshelper uploaded a few years ago Jasshelper 2014-03-10 - WC3 modding.info which had some version of pjass that increased the limit as well but I still suggest LeP's
     
  7. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    I am already using the latest Cohadar's Jasshelper so it won't change a thing.

    I am gonna try to see if the the PJass update will help.

    Thank you for the useful response :)
     
  8. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Okay I learned how to compile my own PJass and I fixed my issue (thank you @Gismo359, @Glowackos and @LeP)

    If anyone is interested in raising the limit. You have to get the pJass source file and increase YYMAXDEPTH in grammar.y. Then you have to compile the files.
    To compile, I would suggest getting cygwin (you need c, flex, bison and make packages) and then you just have to type make using the cygwin shell in the source directory.