Eclipse running out of memory?

Monday, August 25, 2008

At home, where I do most of my experimental development, I have a fairly substantial machine. It's windows, but don't hold it against me. It performs like a mofo. 64-bit, 4GB memory, Core2. At work, I have 32-bit, 2GB memory, Core2. I run Eclipse 3.3 with tons of plugins. I generally run eclipse from the command line with 512M heap, using the jdk1.6 JVM So imagine my surprise when I start getting OutOfMemory errors from eclipse at home. I traced it to the JBoss plugin, but couldn't figure out for the life of me why it was causing this behavior. I wasn't actively using any of the functionality in the plugin at the time I'd get the errors. I turned off auto-activation at startup for the jboss and a handful of other plugins, but to no avail. And this was getting in the way of me getting stuff done. Eclipse "manage configuration" is a flaky piece of shit, so disabling suspect plugins didn't work. Thus, I did what any red-blooded American would do: wipe out any folders in the plugins/features directories that referenced jboss. It was time for a fresh start. That fixed the memory problems and let me get back to work. But honestly.... could you live with that answer? I couldn't. So off I went. I asked the interwebs, and after nice traipse through various newsgroups and wikis and bugtrackers, I stumbled on a fix. Ooooooh, what a maddening f*cking fix. Here's the bottom line: my memory troubles went away when I added this to my startup file: -XX:MaxPermSize=256m That's all. By the way, here's where I ended up: https://bugs.eclipse.org/bugs/show_bug.cgi?id=92250. If you're interested, that bug explains pretty well why I was hitting the memory issues I had. It doesn't explain why it was JBoss plugin causing it... but right now, I don't care. I also installed the memory monitor plugin attached to that bug. It's no better than what you get from jconsole, but marginally more convenient than attaching eclipse to a jmx session and typing "jconsole". So, if you're getting OutOfMemory errors while running eclipse, and increasing the heap isn't cutting it (-vmargs -Xmx512M), it's possibly not a heap problem but a permgen problem. --marc

MXUnit 1.0.2 Now Available

Thursday, August 21, 2008

MXUnit 1.0.2 is now available for download. This release adds new functionality for mocking/injecting properties into objects at time of test, which arose from this discussion. It's similar to the injectMethod functionality introduced in 1.0.1, but for properties instead of methods. Details are here. In addition, a few more bugs have been fixed for Railo and openBD compatibility. Finally, I want to point out again the eclipse dictionary and snippets that are available in the download. See the "cfeclipse" directory. In particular, check out the copysnippets.xml ANT file. It makes keeping your set of mxunit cfeclipse snippets much easier. It will not tramp on your existing shortcuts, as it only adds/overrides shortcuts whose snippets are in the mxunit package. The eclipse dictionary is not the entire mxunit api.... just the public stuff that you care about (assertions, etc). There are instructions in each directory for how to "install" the dictionary and snippets. Enjoy. marc

Securing a RemoteFacade.cfc

Thursday, August 14, 2008

Nathan Mische has a nice article on how to let the mxunit see a RemoteFacade.cfc file sitting behind a basic authentication scheme. Check it out here http://www.mischefamily.com/nathan/index.cfm/2008/8/13/Basic-Authentication-With-ColdFusion

MXUnit eclipse plugin update. This one's for Barney

Tuesday, August 5, 2008

A new version of the MXUnit plugin for Eclipse is now available. I know... you're so excited you can hardly contain yourself! Before you hit the update button, here's what's new:
  • A new "Show Failures Only" button to filter out the passing tests and show you just the bad stuff. This is a persistent toggle, meaning that once you turn it on, subsequent test suites will continue to filter out passing tests until you toggle off. However, if ALL tests pass, the filter is ignored.
  • A new feature just for Barney Boisvert (read here for the inspiration). This is a small helper for people who use the project-level facade URL feature. This new feature is also documented in the integrated help within the plugin. Thanks for the suggestion, Barney!
  • A bug fix. Have you ever seen it where you run a bunch of tests, and maybe the console view is open on the bottom of the workbench, and the scrollbars in the test run view get hidden? If you have suffered through this tragic, disgraceful behavior, you can sleep a little easier now. It is gone.
Enjoy.