Page 1 of 1

Timer Troubles

Posted: 05 Feb 2008, 14:06
by Mather
Hi, Ive been using the SetTimeout function to run a few events in our system, the function is running from an actionscript extension called WowCommands, every now and then however the timer seems to go a bit haywire and seems to miss a command and start spamming the output window with messages similar to this:

Code: Select all

Exception in thread "Timer-56510" org.mozilla.javascript.WrappedException: Wrapp
ed java.lang.NullPointerException (WowCommands.as#255)
        at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:17
57)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:170)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:24
3)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)

        at org.mozilla.javascript.gen.c11._c12(WowCommands.as:255)
        at org.mozilla.javascript.gen.c11.call(WowCommands.as)
        at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java
:119)
does anyone know what could be causing this or alternatively a sort of onEnterFrame equivalent function that could be run on the extension where i can constantly update values manually and give me a bit better control?

Cheers

Scott.

Posted: 05 Feb 2008, 15:18
by Lapo
The null pointer exception seems to be caused at line 225 of your WowCommands.as
What is happening at that line? Probably you're manipulating an object that is null

Btw, what version of SFS do you use?