ActiveX Browser Memory Leak

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: ActiveX Browser Memory Leak

Re: ActiveX Browser Memory Leak

by ZvezdanD » Wed Nov 17, 2010 5:20 pm

I am late for this discussion, but I think I could tell you some observations. I am working on the next version of Tree Report for Child Nodes add-on. The current public implementation is using Web Browser ActiveX with some freeware treeview JavaScript which is called from HTML page. That script is not optimal for large number of nodes, so I want to replace it. I am currently in benchmark phase with several another free treeview Javascripts. One of them has terrible memory leak which raises with number of nodes. I tried with my Location node and its sub-nodes, approx. 20,000 nodes, and I am getting next values for free RAM after closing the dialog box with the ActiveX control: 303 -> 252 -> 227 -> 199 MB. With another two Javascripts that I am trying I don't have such leaks. Testing within Windows XP SP2.

So, maybe you could try your script example with another Web site. Maybe Google which you tried has some Javascript that has leaks. You could take a look at Microsoft article about IE leaks caused by Javascripts: Understanding and Solving Internet Explorer Leak Patterns, also this: JavaScript and memory leaks.

By the way, MM versions older then 3.1.0.1205 had memory leaks after closing dialog boxes, especially with ActiveX controls, even without any Javascripts (I already reported that). To resolve that I am using Script.UnRegisterHandler "wbCtrl_OnChange" and for even older versions which don't have UnRegisterHandler I am using Script.UnRegisterAllEvents, but with it in some cases I need to re-register all needed events again. Unfortunately, UnRegisterHandler and UnRegisterAllEvents cannot resolve problem with the mentioned Javascript that I tried.

Re: ActiveX Browser Memory Leak

by Ludek » Thu Jan 14, 2010 8:22 am

GIL wrote:wait, 3?
You mean open and close the window 3 times?

Because that's too little, just leave it there literally a couple o minutes
Yes, open and close the window 3 times => 3 MB leak on Win 7.

Left it for 5 minutes => further 4 MB leak
i.e. 26 KB per attempt in avarage.
It always oscilates between 41MB and 44MB on each attempt and sometimes there is X KB leak, sometimes there isn't.

It is strange that it is indeed Windows 7 related. So it seems to be a leak in Win 7 IE. We use memory manager (for leak detection) in IDE when developing and it doesn't detect the leak.

Re: ActiveX Browser Memory Leak

by CarlitoGil » Thu Jan 14, 2010 7:39 am

wait, 3?
You mean open and close the window 3 times?

Because that's too little, just leave it there literally a couple o minutes

Re: ActiveX Browser Memory Leak

by CarlitoGil » Thu Jan 14, 2010 7:36 am

In my case it will fill my memory up,
goes on and on

Re: ActiveX Browser Memory Leak

by Ludek » Thu Jan 14, 2010 7:29 am

Rebooted to Windows 7 and true is that there is 3 MB leak and it seems to be a leak in Win 7 IE.
Maybe it isn't a leak, just Win 7 caches a data for next use of IE, because after several attempts (say 3) the memory usage stays at the same level and doesn't grow anymore.

Probably nothing we could fix.

Re: ActiveX Browser Memory Leak

by CarlitoGil » Thu Jan 14, 2010 7:14 am

I just fired it up in VMware, Windows XP Pro x86, MM 1294
It doesn't built up either, so it has something to do with Windows 7 or IE8.

Re: ActiveX Browser Memory Leak

by Ludek » Thu Jan 14, 2010 7:04 am

Sorry, I meant 3.2.0.1294, of course.

I also thought it could be something related to IE.

I have tested it on Win XP SP2. I am rebooting to Windows 7.

Re: ActiveX Browser Memory Leak

by CarlitoGil » Thu Jan 14, 2010 6:56 am

The ActiveX browser is pretty much the same as the installed IE, so could it be something ticked there?
I don't have many extras on my IE, I don't use it much, no bars or anything but are you using Windows 7 x64?

Re: ActiveX Browser Memory Leak

by CarlitoGil » Thu Jan 14, 2010 6:53 am

Ludek wrote:3.2.1.1294
No,
I've got 3.2.0.1294

Re: ActiveX Browser Memory Leak

by Ludek » Thu Jan 14, 2010 6:43 am

GIL,
I tested by using your script and I cannot reproduce.

Everytime the timer hits memory usage grows up, but then (as expected) tails off.

So I don't see a leak there, are you sure you have tested 3.2.1.1294 ?

Re: ActiveX Browser Memory Leak

by Ludek » Thu Jan 14, 2010 5:24 am

Re: ActiveX Browser Memory Leak

by trixmoto » Tue Jan 12, 2010 1:40 pm

I noticed that you posted this in the bug section as well...

http://www.mediamonkey.com/forum/viewto ... =7&t=45911

Caramba!

by CarlitoGil » Tue Jan 12, 2010 6:17 am

Was afraid of that

Let's hope it's not a really a bug

Thanks anyway, you and this forum are always helpful.
Should I repost somewhere else?

Re: ActiveX Browser Memory Leak

by trixmoto » Tue Jan 12, 2010 6:03 am

I've not actually used it before, but yes that's certainly how I would have thought it should be implemented. I think this is going to have to be one for the devs to answer.

Tried DestroyControl, doesn't seem to work

by CarlitoGil » Mon Jan 11, 2010 8:28 pm

MMWiki says DestroyControl is only for browsers and references a search script, so maybe it only works on that type of script

This script demonstrates that it does destroy the control, but the memory keeps climbing up.

Did I implement this right?

(Edit: added DestroyControl to the script and fixed bracket)

Top