Memory leak?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
IanShaw
Posts: 13
Joined: Sat Aug 23, 2008 9:20 am

Memory leak?

Post by IanShaw » Fri Sep 26, 2008 2:44 pm

I am frequently experiencing what seems to be a large memory leak. Often, when I close Firefox down it will not restart because Windows reports that Firefox is still running. I have to kill the process in Task Manager before Firefox will run again. Task manager reports Firefox still running with a memory usage of usually about 330,000, where a single instance of Firefox is about 70,000.

Another symptom I see is that sometimes my javascript will run straight through without executing any imacros, and even drops out of my infinite DO...WHILE loop. IF this happens, I always have to go through the procedure above.

This may be associated with 802 errors with SET !ERRORIGNORE YES, but I don't know for certain.

I'm using version 6.0.7.5 on XP Pro Version 5.1 SP2, Windows 2000 SP 4 and Vista Home Premium (no details to hand).
IanShaw
Posts: 13
Joined: Sat Aug 23, 2008 9:20 am

Re: iMacros for Firefox V6.0.7.5 released (Sep 18, 2008)

Post by IanShaw » Fri Oct 03, 2008 7:44 am

I've also noticed that the application sometimes still hangs while loading a page. When I come to inspect it, the firefox taskbar reads Waiting for url, but nothing happens in imacros. The imacros timeout is not running, and the macro is stuck at the URL step.
When I manually refresh the page, the macro continues.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Memory leak?

Post by Tech Support » Fri Oct 03, 2008 11:19 am

We have difficulties recreating this issue:

- Does it happen with every macro, e. g. also with a simple macro like Demo-Fillform?
- How long do you run the macro before you see something (how many loops)?
IanShaw
Posts: 13
Joined: Sat Aug 23, 2008 9:20 am

Re: Memory leak?

Post by IanShaw » Fri Oct 03, 2008 4:03 pm

I don't think the freeze happens very quickly. I run several macros from javascript within an infinite do...while loop. I usually notice the lock-up once I have left it running for a while, so there are probably hundreds or thousands of loops.
Sometimes it has frozen within an hour; sometimes it runs all night without a problem. Right now, for example, I can see that firefox is using 380-390 Mb with a single tab open; the script has been running about 6 hours. I'm able to stop and re-start it successfully - which surprises me; I'd expected to have to close firefox and kill the process in task manager before the js would run correctly again.

I'm not sure of the best way forward to help you identify the problem. I'll try a simple macro from either a js do...while loop or from your own loop, and see what happens over the weekend.
IanShaw
Posts: 13
Joined: Sat Aug 23, 2008 9:20 am

Re: Memory leak?

Post by IanShaw » Fri Oct 03, 2008 5:48 pm

As a short test, I've run the following javascript for the last 2.5 hours.

var TRUE = 1
var ret
do {
ret = iimPlay("Demo-FillForm")
}
while (TRUE)

Memory usage has increased from 80 Mb at the start to 180 Mb at present.

The macro is still running successfully. I suspect the freezes are separate from the memory leak, and are to do with failing to load pages from websites.
additional001
Posts: 175
Joined: Sun Jul 06, 2008 3:24 am

Re: Memory leak?

Post by additional001 » Mon Oct 06, 2008 1:08 am

I don't think this is limited to just the running of Javascript iMacro scripts. I don't often leave Firefox running overnight but I left it running a couple macros... after trying to use FF some after the scripts finished the next morning it was extremely sluggish. As an XP user I CTRL+ALT+DEL to find that Firefox was using an insane about of memory. When I first saw it it was at about 120,000K... and though all I was doing was wacthing the CTRL+ALT=DEL screen firefox.exe mem usage kept climbing. Before I killed the exe it was up around 270,000K. The only plugins I have installed are Adblock Plus and iMacros. This is FF 3.0.3.
vangknight

Re: Memory leak?

Post by vangknight » Mon Oct 06, 2008 3:18 am

time for ram upgrade dude
DemonkinEsther
Posts: 5
Joined: Sun Oct 05, 2008 11:08 am

Re: Memory leak?

Post by DemonkinEsther » Mon Oct 06, 2008 4:04 am

You are as helpful as ever, vangknight :P

I think this problem is more of a Windows/Firefox problem than it is an iMacros problem. My Firefox is doing nothing right now, and it's using 147MB of RAM. When my computer gets sluggish and can't do things as quickly as I can, I normally open up Task Manager to see wmpnscfg.exe and MDM.exe running. When I shut them down, my sluggishness goes away.

Keep in mind that I have 4GB of RAM, so no amount of memory usage affects me. It's only those two programs that do so, and they're Windows problems, not iMacros. My suggestion, if you know what you're doing, is to msconfig them, regedit them, or set your AV software to pretend they're viruses (if your program does that). Windows is annoying sometimes.
patriiiiiiiiiick
Posts: 3
Joined: Fri Jul 24, 2009 11:56 am

Re: Memory leak?

Post by patriiiiiiiiiick » Sun Jul 26, 2009 8:25 pm

Using FF3.5 on Linux with a macro doing 3-4 extracts in a loop (with a pause of 0.3s between iterations), waiting for some value to appear, I see the RAM usage rising very fast: 10 MB in 36 s, just now. I realised this because some time ago, the browser just crashed, vanished. At the time of writing those lines, the firefox process uses more than 630MB.
rthrasher
Posts: 1
Joined: Tue Nov 01, 2011 10:59 pm

Re: Memory leak?

Post by rthrasher » Tue Nov 01, 2011 11:09 pm

I have seen the memory leak and it is only when running iMacros on my Vaio running Windows Vista and Firefox 7.0.1. I will watch to verify it does not happen with other programs. Maybe I only looked closely because I was more determined to figure out why everything just stopped with no reason.
MasterDebugger
Posts: 2
Joined: Mon Mar 13, 2017 5:12 pm

Re: Memory leak?

Post by MasterDebugger » Mon Mar 13, 2017 7:48 pm

I discovered a partial fix for the Memory leak issue from JavaScript EVAL statements.
It appeared that it was never releasing memory correctly with the Garbage Collection function.

In FireFox 49.0.1 I changed a few settings to improve this process:
FireFox 49.0.1 > In the about:config

browser.cache.memory.enable false
javascript.options.mem.gc_allocation_threshold_mb 15
javascript.options.mem.gc_decommit_threshold_mb 15
javascript.options.mem.gc_high_frequency_high_limit_mb 15
javascript.options.mem.gc_high_frequency_heap_growth_max 15
javascript.options.mem.max 50000
javascript.options.compact_on_user_inactive_delay 10000
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Memory leak?

Post by chivracq » Mon Mar 13, 2017 9:39 pm

MasterDebugger wrote:I discovered a partial fix for the Memory leak issue from JavaScript EVAL statements.
It appeared that it was never releasing memory correctly with the Garbage Collection function.

In FireFox 49.0.1 I changed a few settings to improve this process:
FireFox 49.0.1 > In the about:config

Code: Select all

browser.cache.memory.enable false
javascript.options.mem.gc_allocation_threshold_mb 15
javascript.options.mem.gc_decommit_threshold_mb 15
javascript.options.mem.gc_high_frequency_high_limit_mb 15
javascript.options.mem.gc_high_frequency_heap_growth_max 15
javascript.options.mem.max 50000
javascript.options.compact_on_user_inactive_delay 10000
Hum..., interesting Settings indeed, Thanks for sharing...
The Original Thread is from 2008, from more than 8 years ago, but FF still suffers (well "still" or maybe even more than 8 years ago...!) from Memory Leaks, that's why I switched about 3 years ago from FF to Pale Moon (which supports FF Add-ons).

You should mention on which iMacros for FF Version(s) you've tested, if you are using FF49, then I reckon it will be v9.0.3 or v8.9.7.

Memory Leaks on FF with iMacros usually don't happen with 'EVAL()' Statements in '.iim' Scripts but rather when using/looping '.js' Scripts...
Even if I see some Memory Leak as well with '.iim' Scripts as I don't use any '.js' Scripts but I am not completely convinced the 'EVAL()' Statements (even if I use them quite "heavily") are responsible for the Memory Leaks... (But..., pfff..., not easy-easy to benchmark...!)

I had a Look at my (Default as I never changed those specific) Settings both on FF (FF v51.0.1 currently (+ v8.9.7 for FF)) and PM (PM v26.3.3 (+ v8.8.2 for FF)) and for both FCI's, "my" Default Values were indeed much higher for all Thresholds than the "tuned" Values you post...
But I would think that some other Setting(s) as well must be playing a Role, because I had for all Settings each time the same (Default) Value both on FF and PM, while no Memory Leak happens on PM but on FF yep. Unless all Settings depend/get enabled on 'browser.cache.memory.enable' that I have set to 'TRUE' for both.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply