Closed Bug 1591839 Opened 4 years ago Closed 4 years ago

Touchbar labels/icons missing some of the time


(Core :: Widget: Cocoa, defect, P1)




72.2 - Nov 4 - 17
Tracking Status
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- verified
firefox72 --- verified


(Reporter: Gijs, Assigned: bugzilla)


(Depends on 1 open bug, Regression)


(Keywords: regression)


(1 file)

The icon is visible for some windows but not others. The button is there, it just doesn't have an icon. Pressing it still works (ie offers sharing options), but it obviously looks sloppy.

I haven't worked out why this is happening. Seeing this on 71 beta. I'll keep it open for a bit in case there's debugging I can do from JS land. Harry or :ntim, what should I be looking for?

Flags: needinfo?(ntim.bugs)

If that's helpful, I've been able to reproduce this reliably using this STR:

  1. Click on the "Customize touch bar..." menu item inside the "Firefox" menubar button
  2. Drag the share button out of the set
  3. Restart Firefox
  4. Re-do step 1.

-> See the share button missing the icon

I'll see if I can get a regression range.

I haven't worked out why this is happening. Seeing this on 71 beta. I'll keep it open for a bit in case there's debugging I can do from JS land. Harry or :ntim, what should I be looking for?

FWIW, the share button is a special touch bar item, since it uses the "scrubber" type:

I guess trying to spot the difference between the implementation of "scrubber" and other touchbar types could help, but Harry would be the better person to ask here since he's done pretty much all the work on the touchbar.

Flags: needinfo?(ntim.bugs)

My guess is that bug 1521893 regressed this, but I'll wait for mozregression to confirm.

Flags: needinfo?(htwyford)

I'm also seeing this happen to the "Search in" options in the location bar. Confusingly, I'm currently typing this in a window that has the share icon present and correct, but when I focus the location bar all the "buttons"/items that appear in the touch bar are blank.

Summary: Share button on touchbar misses icon some of the time → Touchbar labels/icons missing some of the time

The Share scrubber is an Apple-made component that we put our own share icon on, so it behaves quite differently from the other Touch Bar inputs. It's NSSharingServicePickerTouchBarItem.

The strings missing on the "Search in" items might be an unrelated issue, since the icons and strings are set in different places/ways. I'll look into both these issues and file a separate bug for missing strings in "Search in" if necessary. Leaving needinfo so this is on my radar.

Assignee: nobody → htwyford
Iteration: --- → 72.2 - Nov 4 - 17
Points: --- → 5
Flags: needinfo?(htwyford)

There are two issues here.

The first is a race condition. There is an incoming patch for this and I'll include a more detailed description of what the race is on the Phabricator page. This patch should solve the missing strings in the "Search in..." item, among other intermittent Touch Bar issues. In my own testing it also fixes the missing search icon although that might be a false positive. There are more icon-related issues:

The second issue is that inputs not currently in the user's Touch Bar will be missing their icon in the Customization screen. STR:

  1. Open Firefox.
  2. Open the customization window (Firefox > Customize Touch Bar... in the menu bar). All icons should be present.
  3. Close the customization window and close the Firefox window.
  4. Open a new Firefox window.
  5. Open the customization window again. Some icons and strings will be missing.
    (NB: If you open the customization window again in the same Firefox window, the icons will now be showing).

The patch for the race condition fixes the missing strings, but the missing icons seem to be an unrelated issue. I suspect the icon-issue is related to how we pass the document principal to imgLoader. Looks like the Touch Bar icon loader code gets all the way to loading the image with imgLoader->LoadImage and then it dies somewhere in there. Presumably one of the parameters is wrong; maybe the document is outdated?

Since these are two separate issues I'm going to post the patch for the race and file a follow-up.

Points: 5 → 3
Blocks: 1595082
Pushed by
Close Touch Bar race condition. r=spohl

The priority flag is not set for this bug.
:spohl, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P1
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Comment on attachment 9107514 [details]
Bug 1591839 - Close Touch Bar race condition. r?spohl!

Beta/Release Uplift Approval Request

  • User impact if declined: Inconsistent and annoying behaviour in the Touch Bar:
  • Labels sometimes missing in the "Search in" feature new to 71
  • Buttons in the "Search in" feature sometimes do nothing
  • Icon sometimes missing on Share button
  • Labels missing in the Touch Bar customization view
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Unfortunately, most of the issues solved by this patch were intermittent with no clear STR. One issue is always reproducible, though: labels missing in the Touch Bar customization view. STR:
  1. Open Firefox on a MacBook with Touch Bar.
  2. Close the Firefox window.
  3. Open a new Firefox window.
  4. Open the Touch Bar customization window (Firefox > Customize Touch Bar... in the menu bar). If all strings are present, then the patch is working. NB: Some icons may be missing. This is tracked in bug 1595082 and is considered a separate issue.

Please report if you encounter any of the other issues listed above during your testing (missing labels/unresponsive buttons in the "Search in" Touch Bar shown when the address bar is focused; missing icon on the Share button).

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Low-medium. This patch has baked on Nightly for 3 days and no issues have been reported. The nature of the changes in this patch are very Touch Bar-specific, so any potential issues would only cause more unwanted behaviour in the Touch Bar (again, no such new unwanted behaviour has been reported).
    I labelled this as low-medium rather than low simply because the changes are in platform code and are thus a little more sensitive than front-end-only changes.
  • String changes made/needed:
Attachment #9107514 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
Depends on: 1596723

Comment on attachment 9107514 [details]
Bug 1591839 - Close Touch Bar race condition. r?spohl!

That's not entirely risk-free but since this is a P1 and we have STR for QA, let's uplift into 71 beta 11 and verify the fix in beta, thanks.

Attachment #9107514 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I’ve managed to reproduce this issue on Firefox 71.0b10 following the str from Comment 6, this is verified fixed using Firefox 72.0a1 (2019-11-18) on macOS 10.15.

This is also verified fixed using Firefox 71.0b11 on macOS 10.15.

Flags: qe-verify+

(In reply to Maria Berlinger [:maria_berlinger], Release Desktop QA from comment #15)

This is also verified fixed using Firefox 71.0b11 on macOS 10.15.

I've just updated to b11 on 10.14 and I'm still seeing the share item having no icon after the restart (as a result of the update), for the first window that opened. Harry, what can I do to help debug?

Flags: needinfo?(htwyford)

A share-button-specific issue was fixed in bug 1595082 and I expect any remaining missing-icon issues will be fixed when that patch is uplifted to beta 12. Nonetheless, I'll take a look today to see if there's anything you can do to debug. Thanks.

Flags: needinfo?(htwyford)

Gijs, have you experienced this problem since beta 12 landed?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Harry Twyford [:harry] from comment #18)

Gijs, have you experienced this problem since beta 12 landed?

No, the share icon is OK now (though I can see it loading when I restart Firefox, ie first the button appears without an icon), though I now see the main urlbar control sometimes only have the magnifying glass (centered) without any text, and when focusing the location bar in that window, the labels for bookmarks/history/open tabs etc. are also missing. So this still seems somewhat broken.

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(htwyford)

Thanks. The labels missing in "Search in" is tracked in Bug 1596723. I'll note your observation of the label in the location bar missing there.

Flags: needinfo?(htwyford)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.