Return of the "shoot yourself" bug in a new guise?

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

Moderators: another_commander, winston, Getafix

User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1565
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Return of the "shoot yourself" bug in a new guise?

Post by Cmdr Wyvern »

Oolite 1.74.1 on Win XP
Target Autolock 1.10

Problem:
Sometimes the Autolock will target my own ship when I'm shot at, as opposed to it's normal function of targeting the attacker. It tends to happen when in a really hot furball, and persists until I save, quit, and restart the game.

By doing that, it looks similar to the old 1.73.x "shoot yourself" bug, except for actually lasering myself to death which fortunately doesn't happen.

It could be a bug in either Oolite or Target Autolock. Either way, the log is giving no clues.
:?
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

This was reported a few weeks ago (here). I think it's just TAP showing up the old underlying bug and making it more common due to the increase in lock-ons.

I can easily code TAP to throw out self lock-ons (I've got v1.11 on my USB key that does so), but I'm loathed to release it as I'd much prefer that the underlying bug was fixed rather than partially hidden by TAP.

But if it does become an annoyance and you want v1.11, send me a PM and I'll sort out a separate download for it.

User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1565
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

Trying TAP 1.11, it mostly nullifies the effects of the "shoot yourself" trumble.
However, even TAP 1.11 can be overwhelmed in certain situations, such as this one:

I did a deliberate misjump, and wound up in an epic battle between the Thargs and the Navy. The immediate space was crawling with Bug combat craft, and their drones. Frak! Tibecia all over again! And the Bugs were NOT happy to see my Caddy Omega arrive; they suddenly got hellbent on trying to kill this defiant Lizard.

Soon enough, the TAP was locking onto my ship instead of the Bugs. :(

I really hope this annoying pain in the tail gets BBQ'd soon. It's putting a damper on my Bughunting expeditions.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Hmm, very weird as TAP 1.11 explicitly checks if player.ship.target == player.ship, and if it is then the lock is broken.

Needs some investigation on a Mac with the better monitoring tools I would say, as something is very odd here...

User avatar
docwild
Dangerous
Dangerous
Posts: 64
Joined: Thu Mar 29, 2007 1:36 pm

Post by docwild »

I haven't looked at the script but I do know that occasionally a timer is garbage collected after a few minutes in the system. That might well be by design though.

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

docwild wrote:I haven't looked at the script but I do know that occasionally a timer is garbage collected after a few minutes in the system. That might well be by design though.
The documentation wrote:Note: in order for a timer to work consistently, you must keep a reference to it as long as it is in use. The easiest way is to make it a property of your script: this.timer = new Timer(this, this.doSomething, 5, 5). If this is not done, the JavaScript runtime may delete the timer at any time to free up memory.

User avatar
docwild
Dangerous
Dangerous
Posts: 64
Joined: Thu Mar 29, 2007 1:36 pm

Post by docwild »

But having now looked at the script there doesn't seem to be any reason for the timer object being collected while in flight. this.targetTimer is valid from it's instantiation through to leaving the system. It's only a hunch, but if it is the garbage collector being too hasty moving the:
this.targetTimer = new Timer(this, this.lockOn, 0, 0.25);
to this.startUp and leaving the this.targetTimer.start(); condition in this.shipTargetAcquired may reveal something if the Timer starts disappearing for no reason as it wont be continually reinstantiated. I have no idea why it might target the player ship though. The only reason I've noticed it is because I've been staying in the same system for upward of 10 minutes recently, it happens on random hits too.

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Cmdr Wyvern wrote:And the Bugs were NOT happy to see my Caddy Omega arrive;.....Soon enough, the TAP was locking onto my ship instead of the Bugs.
Could it be that it is turret fire hitting yourself that initiates the lock on your self?

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13832
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Post by Cody »

Eric Walch wrote:Could it be that it is turret fire hitting yourself that initiates the lock on your self?
No turrets in my Ooniverse, and I've been having the same problem with TAP.

User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Question: this hitting/targeting yourself bit, is it affected by the number of ships in-system?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13832
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Post by Cody »

Kaks wrote:is it affected by the number of ships in-system?
That’s hard to say… it’s very occasional and when it happens, it’s always during an intense firefight, with five or more bandits, and I’m taking multiple hits. At that stage I’m usually zoomed right in, so I can’t say how many other ships are in-system. The last time, the bandits were the only ships on scan.

User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Next time it happens, can you press pause, then 0. That should create a list of all in-system objects inside latest.log.

If you then show us that list (or a couple of them) we might just be able to finally track this bug down! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13832
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Post by Cody »

Will do... that's an excuse to go out and look for trouble.

User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Zero! :)

Good question, though! Do use the one on the main keyboard: I don't think you'd get anything if you press zero on the keypad...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13832
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Post by Cody »

Sorry Kaks... daft question of mine, of course it's 'zero'.

Post Reply