• 🏆 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 4
Joined
Jan 18, 2019
Messages
71
When I am saving my map, I am now getting the error: Memory Exhausted. Disabling Jass Helper keeps the error from occurring, and allows me to save.

Is this an error of the World Editor or innficent hardware spec of my computer. Meaning: this wouldn’t happen if my computer had better memory or upgraded processor?

Thanks!
 
Level 4
Joined
Jan 18, 2019
Messages
71
I checked my memory usage during the saving stage with Jasshelper included and I have over 3k free memory, but my processor is running at 67-71% capacity.

I didn’t use too many Jass scripts aside from clearing points and stopping build-unit orders. I do, however, have around 1700 triggers.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
and I have over 3k free memory
Yeh you probably need more memory. 3 kilobytes of free memory was fine back in 1992 but it just does not cut it for running a 2003 game editor.

Unless you mean 3GB of free memory... In which case it almost certainly is an error with one of the triggers.
I do, however, have around 1700 triggers.
Start by backing up your map (keep a copy of it somewhere that can be restored to later). Then delete all triggers and save and see if the same error occurs. If it does not then it is one of the triggers causing the problem. One can restore the map from the copy and keep deleting different sections of triggers until one finds the one that is the cause.

1700 triggers is a lot. It might be worth trying to optimize down that number in the future.
 
Level 4
Joined
Jan 18, 2019
Messages
71
Yes, I mean over 3 gig of memory. The error highlights one trigger, and I’m going to investigate it. I have also begun to optimize my triggers too. I’ll report back after I delete the trigger. I’ll also post a picture of the error code for others references.

Thank you for your suggestions. I am following them one by one to narrow this problem down. :).
 
Level 4
Joined
Jan 18, 2019
Messages
71
Here is the image of the error and the highlighted trigger.
hbPZuZM
hbPZuZM.png


Does this mean the error is in the trigger?
 
Level 4
Joined
Jan 18, 2019
Messages
71
Okay, I deleted the trigger. Ran the save option with Jasshelper selected and I received the same error, only this time, it was at a different location. I then checked that trigger, but the trigger doesn't have any issues that I can see:
OAtUecp.png


What do you think is the issue?
 
Level 4
Joined
Jan 18, 2019
Messages
71
Also, I found a syntax error here, but it looks like it is part of the startup initialization of the map or something. I've included two screenshots.
A1F9lea.png



utTVzyj.png
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
It looks to me like you're being extremely inefficient with your triggers. How are all 7 of these triggers different?
ApplyEntanglerEffectsWest1
ApplyEntanglerEffectsWest2
ApplyEntanglerEffectsWest3
ApplyEntanglerEffectsWest4
ApplyEntanglerEffectsWest5
ApplyEntanglerEffectsWest6
ApplyEntanglerEffectsWest7

That's not a real syntax error, its jasshelper not having a better error to give you that says "something went wrong parsing all of this stuff and now I think this endfunction doesn't belong here because reasons".
 
Level 4
Joined
Jan 18, 2019
Messages
71
They apply effects to a group of units. I separated them because the same spell could be casted several times by different units. I could put them under one trigger header, but it would become a giant single trigger.

Is it better to have one giant trigger than several smaller triggers?
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
A series of If statements (they do not have to be nested) is generally superior, yes. In some cases a separate trigger can be warranted but there's really no need to do it your way for all triggers; it could even be the cause of the problem here.
 
Level 4
Joined
Jan 18, 2019
Messages
71
A series of If statements (they do not have to be nested) is generally superior, yes. In some cases a separate trigger can be warranted but there's really no need to do it your way for all triggers; it could even be the cause of the problem here.
Thanks for the information. I am starting to optimize all my triggers, and I’ll see if this fixes the problems. First time I’ve made such a project so big, and I didn’t know that I would run into this kind of an issue, so I was being liberal and neat with my layout.
 
Level 3
Joined
Dec 2, 2013
Messages
25
I get the same issue a few months ago and yes deleting unused triggers, and optimize the other is a good option at first.
But now, after months of added content, I got the issue once again and I can't barely optimize my triggers. So I tried something : adding a trigger at the bottom of the list that create a message after 5s of gametime.

Even with the "memory exhausted" error, this trigger still run and works, so my question is : can I safely continue to improve my map EVEN with the "memory exhausted" error ?
I mean, if the error occurs but there is no incidence on my work and all triggers works fine, I could simply ignore it ?

I think yes, but maybe someone may have an answer, or part of it...

Anyway thanks for reading this.

Shrrignien
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Even with the "memory exhausted" error, this trigger still run and works, so my question is : can I safely continue to improve my map EVEN with the "memory exhausted" error ?
I mean, if the error occurs but there is no incidence on my work and all triggers works fine, I could simply ignore it ?
You need to check that vJASS is outputting the entire map script correctly. GUI compile is still handled by WorldEditor with vJASS compiling the resulting script and any vJASS it contains.
 
Level 3
Joined
Dec 2, 2013
Messages
25
Is there a custom script that I can put at the bottom of my triggers to test the vJASS compiling ? I rarely use script because I don't master it, I only use DestroyGroup and RemoveLocation....
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Put this in some custom script block outside a function.
Code:
globals
    integer checkingglobalmerger = 0
endglobals
Save and then open resulting map script file in notepad. Search for "checkingglobalmerger". If that global variable has been merged into the globals block at the top of the map script then vJASS is likely working correctly. If not and it remains its own separate globals block where ever you left it, or it does not exist at all, then vJASS is not working correctly. At least the globals block merging part of it...
 
Level 3
Joined
Dec 2, 2013
Messages
25
Thank you.

At the moment I improved my triggers so i no longerhave the memory issue, but I know it will hapen soon, so I will try this in time.
 
Level 3
Joined
Dec 2, 2013
Messages
25
Ok so, I spent like 10hours improving my project, but after adding some new stuff, I ended another time with that memory exhausted problem.

So I tried your solution : add the custom script at the end of my triggers, I saved it, get the memory exhausted message (so the custom script is actually "out" of memory). Then I export the script to check if the global was merged with others but sadly, it is not... So I guess vjass is not working past the memory exhaust limit.

So I am wondering, what kind of stuff can I add into my map despite the mem issue ? As I said earlier, puting a trigger that say "hello" at the bottom of the triggers list will works in game despite the issue, so they may are some things that can still be added...

In fact I don't really know what is vJASS and what does it allow me to do, I know jass is the wc3 language but...

I started my project 7years ago, using 99,9% of the time GUI, and rarely jass (to destroy groups and point variable). I am far from a good coder but I ended up mastering GUI a bit, and did everything on my own. Maybe it is the end of this project but I really wish I could add some stuff.

Thank to everyone that read this to those that could give me some clues to continue my work.

Shrrignien
 
Status
Not open for further replies.
Top