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

Memory exhausted

Status
Not open for further replies.
Level 21
Joined
Mar 19, 2009
Messages
444
Hello,

I'm having a little probleme with my map Restricted Complex 601: after I added a few spells on the last version, I get an error message with Jasshelper: memory exausted (when I save the map)
Then it displays me the entire list of all my triggers.

I turned off some triggers etc.
It seems I reached the limit of 256 prototypes.
Is there a way to overgo this?

Thanks a lot.
 
Level 19
Joined
Apr 25, 2006
Messages
1,309
What do you mean with 256 prototypes? That is not GUI in your last comment or is it? Will the memory be saved the most if I put as many triggers in same trigger as possible or do I need to cut the actions??
 
Level 21
Joined
Mar 19, 2009
Messages
444
Prototypes are reviewed triggers made by a preprocessor (for me it's Jasshelper through the Jass new gen pack). (Libraries, scopes etc.)

When I get more than 256 triggers using a struct init with AutoIndex, it does reach the limit.

In Gui, I do not know what causes the reach of the limit.

if I put as many triggers in same trigger as possible or do I need to cut the actions??
In jass this would not change anything. Of course, for a readability question, it is better to get less different triggers.

By the way, why do you get "actions"? Conditions are better ;)
 
Level 19
Joined
Apr 25, 2006
Messages
1,309
I got a lot of both conditions and actions, mostly actions. I think there are a few triggers I can still optimize but I'm running out of space with this memory exhausted problem. If I knew what is the biggest thing causing this I would consider getting rid of it but as for now I can hardly make any new trigger without getting the memory exhausted error. I'm hoping the last optimizations will give some much needed space for me. I'm going to ask in wc3c why the editor gives memory exhausted error.
 
Level 19
Joined
Apr 25, 2006
Messages
1,309
Do you code in Gui or Jass?
Do you use JNPG?

May I ask you to get the open-source (ofc I will not send it to someone) so I check it when I go back from work? (in 10 hours).
I code only with GUI. I use jass newgen for some custom spells and so that I can ignore doodad limits. If I run into bigger problems with the memory exhausted error then I can send you the map sometime later.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
It's a problem with pjass. I just had this problem recently. A friend shew me another parser here. Unfortunately, the package of the CLI file seems to be corrupt. Said friend then sent me the file. Here, I uploaded it again.

You still have to tell jasshelper to use the new parser. Vexorian wrote this somewhere in a thread but I do not find it right now. There are two jasshelper.conf files, one in main directory of JNGP and one in jasshelper folder.

Replace the contents of both with

Code:
// tweaked jasshelper.conf for newgen pack, notice that in this setup grimoire's main folder is jasshelper's work folder (.)

[lookupfolders]
// Just type the folders where //! import would look for if relative paths where used, include the final \
// embed them in quotes
// example: "c:\"
// The order causes priority:
".\jass\"

[externaltools]
// this is for //! external NAME args the syntax is "NAME","executable path"
// example:
//"OBJMERGE","c:\kool.exe"

//* 
//* grimextension pack by pitzermike:
//*
"FileImporter","grimext\FileImporter.exe"
"ObjectMerger","grimext\ObjectMerger.exe"
"PathMapper","grimext\PathMapper.exe"
"TileSetter","gimext\TileSetter.exe"
"ConstantMerger","grimext\ConstantMerger.exe"
"TriggerMerger","grimext\TriggerMerger.exe"
"FileExporter","grimext\\FileExporter.exe"
"PatchGenerator","grimext\\PatchGenerator.exe"

[jasscompiler]
"JassParserCLI.exe"
"--pjass $COMMONJ $BLIZZARDJ $WAR3MAPJ"

then restart the editor. Make backups beforehand. When you save in the editor now, JassParserCLI.exe should appear sometime over the loading bar instead of pjass.exe.

Since this parser also has its customs/little flaws, you might switch back on occasion. For example, it did not see one time for me that I reset a constant variable, so I could save but not test the map. I switched back to pjass for this moment then to identify the problem.

edit: http://www.wc3c.net/showpost.php?p=1089844
 
Last edited:
Level 19
Joined
Apr 25, 2006
Messages
1,309
If I would go over the limit I don't think it is able to switch back anymore? Why does there have to be a limit in the first place, I don't think there is one in the normal editor?
Can you give me an example of what lines Jasshelper does highlight, then?
If the memory is exhausted it seemed to pick very random lines for me.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
This is why people should avoid abusing JNGP too much.

I advise checking WC3campaign for any updates to jasshelper. If none is present you will probably have to cut back on trigger coding.

Additionally it may be caused by a single script resulting in a recursion error so the program runs out of memory so try disabling some scripts to see if any single one is causing the problem.
 
Level 5
Joined
Oct 14, 2010
Messages
100
Disable script optimization, like the term suggests, disables optimizations.
Currently, the only optimization done by jasshelper is inlining methods. For example
JASS:
function Message takes string str returns nothing
call BJDebugMsg(str)
endfunction

// in another function
call Message("hello")
Will replace call Message("hello") with call BJDebugMsg("hello") which is an optimization and will speed up execution of your code.
Only functions with 1 statement are inlined (check the manual for more precise conditions)

disable vJass syntax, like the name suggests as well, disables vJass features.
vJass extends jass with features such as library, struct, interface. When disabled, only regular jass will be compiled. Using vjass features will cause compile errors.
 
Status
Not open for further replies.
Top