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

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

Status
Not open for further replies.
Level 14
Joined
Jan 16, 2009
Messages
716
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...) ?
 

Attachments

  • jasshelper bug 03.PNG
    jasshelper bug 03.PNG
    45 KB · Views: 76
Level 14
Joined
Jan 16, 2009
Messages
716
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.
 

Deleted member 219079

D

Deleted member 219079

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.
 
Level 14
Joined
Jan 16, 2009
Messages
716
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.
 

Attachments

  • test.w3m
    310.1 KB · Views: 53
Level 14
Joined
Jan 16, 2009
Messages
716
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.
 
Status
Not open for further replies.
Top