Closed Bug 1753603 Opened 2 years ago Closed 2 years ago

Background Update task creates Volume Mixer sliders but does not remove them

Categories

(Toolkit :: Application Update, defect, P3)

Firefox 96
defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: junkbox64738, Assigned: nalexander)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

Firefox is still spamming the Windows Volume Mixer with sliders it never deletes.

It's been getting better recently but it still happens. Unfortunately they only get added when I'm not using my computer. So after a bit of inspiration I went looking for possible background activities...

There are two scheduled tasks for Firefox in Windows: Default Browser Agent, and Background Update. If I right-click Background Update in Task Scheduler and click Run, a new mixer slider is created. The status changes from Ready to Running. If I then End the task from the same menu the mixer slider is not removed.

For me this happens every time I run the task. It is 100% reproducible.

The Default Browser Agent doesn't have the same problem.

Actual results:

Running the Background Update creates a new volume mixer slider. It probably doesn't need to do this anyway, but if it does then it should definitely clean up when it exits.

Expected results:

The mixer slider should either disappear when the task ends, or not appear at all in the first place.

The Bugbug bot thinks this bug should belong to the 'Toolkit::Application Update' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Application Update
Product: Firefox → Toolkit

Thank you for digging into the issue and for the report!

P3 papercut that should be addressed, S4 cosmetic in nature.

Severity: -- → S4
Priority: -- → P3
Whiteboard: [fidedi-ope]

What a world we live in. I've done some digging, and it's possible that the changes over in Bug 1617283 will address this. Let's wait for that to reland and retest. If that's not enough, we'll have to disable this audio session stuff in background task mode separately.

Depends on: 1617283

(In reply to Nick Alexander :nalexander [he/him] from comment #3)

What a world we live in. I've done some digging, and it's possible that the changes over in Bug 1617283 will address this. Let's wait for that to reland and retest. If that's not enough, we'll have to disable this audio session stuff in background task mode separately.

Actually, we still need to disable this, I think. That would be making this call to StartAudioSession conditional.

(In reply to Nick Alexander :nalexander [he/him] from comment #4)

(In reply to Nick Alexander :nalexander [he/him] from comment #3)

What a world we live in. I've done some digging, and it's possible that the changes over in Bug 1617283 will address this. Let's wait for that to reland and retest. If that's not enough, we'll have to disable this audio session stuff in background task mode separately.

Actually, we still need to disable this, I think. That would be making this call to StartAudioSession conditional.

Hi there. You're right, the patch for bug 1617283 doesn't fix this issue. I would like to work on this. Could you kindly give me some pointers as where to start? Specifically could you kindly elaborate on your last comment?

Flags: needinfo?(nalexander)

(In reply to Shazib Summar [:ssummar] from comment #5)

(In reply to Nick Alexander :nalexander [he/him] from comment #4)

(In reply to Nick Alexander :nalexander [he/him] from comment #3)

What a world we live in. I've done some digging, and it's possible that the changes over in Bug 1617283 will address this. Let's wait for that to reland and retest. If that's not enough, we'll have to disable this audio session stuff in background task mode separately.

Actually, we still need to disable this, I think. That would be making this call to StartAudioSession conditional.

Hi there. You're right, the patch for bug 1617283 doesn't fix this issue. I would like to work on this. Could you kindly give me some pointers as where to start? Specifically could you kindly elaborate on your last comment?

Sure. The first step will be to repro (which I can do locally, FYI).

This was easiest to witness by enabling the old Volume Mixer control (which I did following these instructions). Then, build a full (compiled) Firefox. Run mach run --backgroundtask success --attach-console. If you do that a few times, you should see new volume controls being added, just like the reporter says.

To address this, don't StartAudioSession when we're in a background task, using a check like this one. In addition, don't StopAudioSession, either.

Then verify that you don't get volume controls with your new changes.

Thanks!

Flags: needinfo?(nalexander)
See Also: → 1758296

The presenting issue is that each background task's audio session is
user-visible via various Windows UIs that display "volume controls" or
"volume mixers"; this avoids that.

Assignee: nobody → nalexander
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Removing dependency on Bug 1617283, since I don't think that work would actually address this (and it seems to have stalled).

No longer depends on: 1617283
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2fca1eebcfa
Don't `{Start,Stop}AudioSession` in background tasks. r=mossop
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
See Also: 1758296
Regressions: 1783087
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: