World Button Bar

Posted by Carrie on Mon 16 Feb 2009 11:52 PM — 14 posts, 51,402 views.

USA #0
Would it be possible to have this expandable past ten, with more worlds open? Right now I have 20 windows that I might need to connect to at once, and I'm forced to run two processes and keep other programs pulled in at both sides, so I can see the activity listings on both far left and far right of my screen. :p

Thanks ;)
USA #1
i have wanted a better activity toolbar for a while myself... but have you looked at this?

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=8090&page=1

it shows the tabbed feature as well as the activity list.
the problem with tabbed is in my opinion 1) it lists how many lines you have missed. Some people like it I'm sure, but i would rather it be a option not forced. i don't need to know if there are 50k new lines or 1 new line. I like the color change in the activity toolbar as a simple way of telling me... and it makes the size of the tab vary a lot and 2) it shows all the notepad files as well. so when my chat channels get redirected to notepad it gives me a new tab called "Trigger: *" having 5 or more of those kind of sucks. much less when you cant drag/drop the tabs into the order you want. strictly as opened/created.

on a side note, i await a miniwindow chat plugin with bated breath, so i can do away with the notepad windows that way. :P
Amended on Tue 17 Feb 2009 04:25 PM by Chyort
Australia Forum Administrator #2
Yes, the activity window can sort-of do it.

However I just wrote an activity bar plugin, that uses a miniwindow to do the job. See this thread:

http://www.gammon.com.au/forum/?id=9247
USA #3
Thanks Nick! :)

That saves an entire process quite nicely. :)

*adds the other 10 to her startup list*
USA #4
Utoh...

I've been running this plugin until this morning, now I'm getting an 'out of memory' error from MUSHclient when I try to do anything. It won't respond to 'ok' long enough for me to even close it.

It also believes itself to have high enough priority to shove the warning box up over anything else I'm working in trying to free up memory.

Update:

I held down enter long enough and it finally went away and let me log on somewhere, but then it crashed when I went to open global prefs to try and reinitialize the plugin if I could.
Amended on Wed 18 Feb 2009 04:25 PM by Carrie
Netherlands #5
Funny. Sounds like a memory leak somewhere - either that or an infinite loop that keeps allocating without releasing.

It may or may not be related, but I managed to completely lock up MUSHclient while working on my Previewer plugin too. Strangest part is that I changed nothing of importance or with an infinite loop nature in my own code, but merely some parameters in calls to WindowDrawImage I think it was. Or maybe writing text - I can't recall. Anyhow, since I haven't had it in the past with 4.36 while devving most of this plugin, and my recent diving into it with 4.38 installed, I suspect a bug might have snuck in now that I see Carries post. (Although it is very well possible my own code caused it.. although restart and reload of the plugin caused no more issues.)
USA #6
I'm on 4.38 as well, just updated on Monday.,,

I've never had an out of memory issue before. Anyway, its restarted now, I'll keep the thread updated if it happens again.

At the time it said 'out of memory', it was using 164,000 or so K of memory. Firefox routinely uses four and five times that much if I keep too many tabs open. Which is another cause of my concern.
Australia Forum Administrator #7
Carrie, can you please try with version 4.37?

Version 4.38 introduced something that may possibly cause a memory leak - which is a plugin callback that is called 25 times a second. Whilst you are no doubt not using the callback, maybe even looking for it is leaking memory.

Failing that, I will immediately try to find your problem. If it isn't version 4.38, then the plugin I wrote will certainly tend to expose memory leaks in scripting or miniwindows. For one thing, a timer is called once a second, and for another you have 20+ copies running. So a small memory leak which might go undetected in a timer which is called once a minute, in a single world, will seem more noticeable to you.
Australia Forum Administrator #8
My preliminary investigations indicate that there is a memory leak in any Lua functions that return an array. In this case GetWorldIdList was responsible, as it was returning a table of open worlds.

I set up a test with 13 open worlds, and increased the rate at which the timer was called from 1 per second to 10 times a second.

With the original MUSHclient (4.38), after 2 minutes, it had jumped from 13,800K memory usage at startup to 28,936K. That is, a rate of 126 Kb per second.

With the fixed version, after 2 minutes, it still seemed to use memory slowly, but at a rate of about 0.5 Kb per second. After 2 minutes the new version was only using 13,984 Kb.

I am a little uncomfortable that the memory usage goes up at all, I will keep looking at it, although finding memory leaks in a complex application is a devil of a job.

At least the improved version reduces the leak to a much more acceptable level.
Australia Forum Administrator #9
Carrie, a few calculations show that this leak is probably responsible for your memory usage.

If my test which had 13 worlds open used 126 Kb / second, then with 20 worlds it would be: 20 / 30 * 126 = 194 Kb / second.

However my timer was firing 10 times a second rather than once, so your usage would be more like: 194 / 10 = 19.4 Kb / second.

Multiply that by 12 hours: 19.4 * 60 * 60 * 12 = 838,080 Kb.

So yes, 12 hours of usage would gobble up quite a bit of memory. The fixed version would use memory at a much lower rate.
USA #10
Sounds like a definite culprit then. I'd bet it just wasn't showing the whole figure on taskmanager. I'm wondering if it was trying to use all the pagefile and all the memory on top of it. Yikes.

Hope to see the fixed one soon :)
Australia Forum Administrator #11
New version now available, see:

http://www.gammon.com.au/forum/?id=9249
Australia Forum Administrator #12
I think my small memory usage after fixing the leak is probably due to the fact that I had localization on. That meant every time it needed to display a string (even internally) it called a Lua script function. These would gradually use memory, however the Lua garbage-collector would eventually clean that up, so the memory usage there should not get out of hand.
USA #13
Downloaded and installed. Thank you :)