I got a problem with my first firefox extension - based on code of
screengrab extension I
tried to make an extension for making screenshots of flash games.
Let's say, user has a button which can start and pause making of
screenshots. Everything works fine, until java throws exception:
"java.lang.reflect.InvocationTargetException" - after that, no matter
what I do, I can't get my extension to work again. I have to restart
firefox to make screenshots again.
From what I discovered, java memory usage goes up while extension
beign used, until java uses around 256 MB or ram - and then extension
"flips" with exception mentioned above.
What am I doing wrong - is there some "magic" function to "reset" java
memory usage, or at least "restart" java process from within my
extension ?

Here's simplified example of my code (use firefox error console to see
the output - on my computer counter reaches 429 before java