[Solved] WARNING: Timer <OOJSTimer

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

[Solved] WARNING: Timer <OOJSTimer

Post by Ironfist »

Getting a lot of these messages appearing in the log.

22:14:01.968 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0xa3b9468>{nextTime: 333.25, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:19:05.843 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0x913c9a8>{nextTime: 608.599, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:19:05.843 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0xa771968>{nextTime: 608.445, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:19:05.843 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0xa81d518>{nextTime: 608.602, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:20:07.718 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0xa756c28>{nextTime: 644.549, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:30:12.936 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0xa4bc968>{nextTime: 1139.01, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
22:30:53.186 [script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0x143bd550>{nextTime: 1174.46, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!

Is there any way to debug which piece of code is causing them?
Last edited by Getafix on Wed Jul 13, 2011 9:51 pm, edited 1 time in total.
Reason: Marked as [Solved].
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: WARNING: Timer <OOJSTimer

Post by Commander McLane »

Hi, Ironfist, and first of all welcome to the boards, and of course to this great game! :D

Unfortunately the log itself doesn't reveal anything more, except that it's all different timers.

The usual way of proceeding would be to remove half of your OXPs, see if the errors persist (if not re-install this half and remove the other half), and continue to do so until you've narrowed it down to just one OXP. From then on we can help.
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: WARNING: Timer <OOJSTimer

Post by Ironfist »

Hi,
Thanks for the quick reply. I had the nasty suspicion that it was going to involve that sort of operation.
I will do that and keep the board posted.

Cheers
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: WARNING: Timer <OOJSTimer

Post by Eric Walch »

Ironfist wrote:
Hi,
Thanks for the quick reply. I had the nasty suspicion that it was going to involve that sort of operation.
I will do that and keep the board posted.

Cheers
The fact that the timer lost its reference already indicates that the code has no clue what script generated it. I am sure that it would have been logged if it was known.
This is typically an error log that was mend for the author of the code, not for the user. Most likely its created by a ship-script were the ship has been removed.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: WARNING: Timer <OOJSTimer

Post by Capt. Murphy »

Before you go running through all your OXP's check if you've got version 1.0 of my Police IFF Scanner Upgrade installed. If so upgrade it to version 1.2 - link via my signature. I made an incorrect assumption about timers in the first version. :oops:
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: WARNING: Timer <OOJSTimer

Post by Ironfist »

Capt Murphy,

Thanks for spotting that. I have downloaded the update and that does seemed to have fixed the problem.

Cheers
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
greenseng
Dangerous
Dangerous
Posts: 125
Joined: Thu May 19, 2011 3:27 am

Re: WARNING: Timer <OOJSTimer

Post by greenseng »

Capt. Murphy wrote:
Before you go running through all your OXP's check if you've got version 1.0 of my Police IFF Scanner Upgrade installed. If so upgrade it to version 1.2 - link via my signature. I made an incorrect assumption about timers in the first version. :oops:



Thanks!

I don't often check the log, but today was an exception. And I was a little surprized about this timer-error.
But then I found this thread and updated your oxp. And the "problem" disappeared.

This oxp has made me a bounty-hunter. :)
A consequence is that my score has dramatically increased. 8)



Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Duggan »

Not Solved, Warning still appears in my Logs. If it is MFD related the issue is most certainly not resolved at all.

Still getting many examples like ;
[script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0x2cc73d50>{nextTime: 3408.86, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
And still producing CTDs in game which is more than just a passing irritant in what is , a wonderful game..

So tech heads, please to sort it out once and for all . gracias. :)
Flying Python Class Cruiser, Chapter & Verse IV
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Neelix »

Duggan wrote:
Not Solved, Warning still appears in my Logs. If it is MFD related the issue is most certainly not resolved at all.

Still getting many examples like ;
[script.javaScript.unrootedTimer]: ----- WARNING: Timer <OOJSTimer 0x2cc73d50>{nextTime: 3408.86, interval: 0.25, running, function: anonymous} is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!
And still producing CTDs in game which is more than just a passing irritant in what is , a wonderful game..

So tech heads, please to sort it out once and for all . gracias. :)
While it's certainly possible, I'd be somewhat surprised if the garbage collected timers were actually a causal factor in the crashes.

Where it says function: anonymous I'm assuming it's referring to the function that created it... How about making it report the function it calls? It has to know the name of the function it's calling even if the function itself is no longer valid...

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [Solved] WARNING: Timer <OOJSTimer

Post by cim »

Duggan wrote:
Not Solved, Warning still appears in my Logs
Can you use the "take out half the OXPs" trick to narrow it down to a particular one?
Neelix wrote:
While it's certainly possible, I'd be somewhat surprised if the garbage collected timers were actually a causal factor in the crashes.
I would be very surprised indeed: the warning is mostly to the OXP writer who might otherwise be confused about why their timer stopped working (or continued working after they thought it should have stopped, since garbage collection is a relatively rare event). The game then does the clean up the writer should have done.

It's very rare that the last entry in the log in the case of a full crash has anything to do with the crash at all: usually it just puts the blame on the most talkative OXP. Unless the timestamp on the message was within a few hundreths of a second of the crash at most, it's almost certainly entirely unrelated. Generally when the game's going to crash it doesn't have time to say why. (Which isn't to say the Latest.log is useless, just that it's not that useful).
Neelix wrote:
Where it says function: anonymous I'm assuming it's referring to the function that created it... How about making it report the function it calls? It has to know the name of the function it's calling even if the function itself is no longer valid...
It's the function it calls. But not all functions have names.

Code: Select all

var t = new Timer(this, function() { this.ship.commsMessage("Help!"); }.bind(this), 0.5, 5);
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Neelix »

cim wrote:
Neelix wrote:
Where it says function: anonymous I'm assuming it's referring to the function that created it... How about making it report the function it calls? It has to know the name of the function it's calling even if the function itself is no longer valid...
It's the function it calls. But not all functions have names.

Code: Select all

var t = new Timer(this, function() { this.ship.commsMessage("Help!"); }.bind(this), 0.5, 5);
Ahh... I'm showing my inexperience with coding javascript. It never occurred to me that you could inline the function definition like that.
Thanks for the clarification.

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Duggan »

Thank you for the feedback, While I appreciate that it may seem unlikely that the timer dumping is causing the Black Screen of system reboot. The only time my Computer crashes is while I am playing Oolite 1.80 and the latest log , Once my sytem has restarted is always two or more instances of the above error warning. My conclusion then has to be that Oolite 1.80 crashes my computer. there really is no other possibility as it only ever crashes while playing Oolite 1.80.

With this in mind, I have now rolled back my game to Oolite 177.1 where no such timer error or issue occurs. Thank you for your help. I do hope that this bug is sorted at some point in the future :)
Flying Python Class Cruiser, Chapter & Verse IV
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: [Solved] WARNING: Timer <OOJSTimer

Post by another_commander »

Do the crashes happen with 1.80 if you remove all OXPs? It does seem strange that it crashes only on one system; if there was really such a serious problem with the game, we should have heard more about it, shouldn't have we?

Also, are you running 32 or 64 bit Oolite? If running the 32-bit flavor, how many OXPs do you normally run?
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Duggan »

It is the 64 bit version I have .
Briefly speaking I have AMD Quad core A4-5000 1GHz and AMD Radeon HD83330 with 512MB of Graphics Memory. The machine itself has 6GB of Memory and a 1TB hard drive.

Interestingly, with a clean install of 1.80 no timer errors occur. However when I add OXP's the error regarding timers occurs, So I take out all Add ons and the Error remains , as if left there by previous Add ons. In effect a virgin install is error free.

I do have a lot of OXPs. That is to say , what is within the OXP's

AI Trading Assistant 2.6.2
AI Trading Ethical Trader 2.4
AI, My Trading Advisor 2.2.6
Bounty Scannerv2.0
CRR_HUD_1_0_2012-01-08
Deep_Horizon_Nav_Bouy
Font Dangerous-1.1
Fuel Recovery1.0.3
offender_traders
Ore_processor1.59(an older version I know but it saves having to prime to convert scooped splinters)
Povray Planets 1.0 and textures for all 8 galaxies
All Griff Models 1.04.1 and up.

Post script..I do love the game and am quiet content to play 177.1 :)
Flying Python Class Cruiser, Chapter & Verse IV
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [Solved] WARNING: Timer <OOJSTimer

Post by Wildeblood »

Duggan wrote:
I do have a lot of OXPs. That is to say , what is within the OXP's

Bounty Scannerv2.0
Fuel Recovery1.0.3
Fuel Recovery or Bounty Scanner are the likely source of the unrooted timer errors. But as cim says above, are unlikely to be related to the crashes.
Duggan wrote:
AI Trading Assistant 2.6.2
AI Trading Ethical Trader 2.4
I don't even remember version 2.6.2, I think it was a test version. The current version of AI Trading Assistant is 2.12.4!
Post Reply