On Jun 24, 6:15 am, James Newell <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I have successfully set up threading in my application based on
> skrul's thread demo extension. However with more complex code in the
> threads, I get a very unexpected error. I am wondering if anyone has
> come across this.
>
> In my thread I try to instance a number of custom made JS components
> in the run method of nsIRunnable.  All is well until I run my
> application a second time (after changing the build id) and when I
> attempt to instance my components, I get 3 errors for one component
> but not the other components:
>
> Error: too much recursion

sorry, I should have offered the simpler solution. consider this:
js> function a() {a()}
js> function b() {try { a() } catch (e) { f=e } }
js> b()
js> f
InternalError: too much recursion
js> f.stack.split("\n").length
1002

If you have some way of logging to a file (<http://www.webwizardry.net/
~timeless/console-logger.js> has some), then you can dump f.stack into
a file and figure out what's going wrong.

So, all you really have to do is stick trys around the contents of
your main function bodies and have your catches dump to files (I'd
suggest each catch use a distinct file name, probably named by the
function it's in, the date, and nsIFile.createUnique or whatever it's
called).

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to