Closed Bug 1621258 Opened 4 years ago Closed 4 years ago

Too many warnings: Main Thread] WARNING: Missing GtkWidget 87 , file .../mozilla/widget/gtk/WidgetStyleCache.cpp, line 763

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: ishikawa, Assigned: stransky)

Details

Attachments

(2 files)

While running mochitest of C-C TB FULL DEBUG build locally , I noticed there are many warnings of the following form.

0:40.12 GECKO(146040) [146040, Main Thread] WARNING: Missing GtkWidget 87
0:40.12 GECKO(146040) : file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/widget/gtk/WidgetStyleCache.cpp, line 763

There were whopping 24565 lines (!).

You can see the warnings in tryserver jobs of other people as well.: e.g.
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&fromchange=6c81ea172348b677edd90753b6f5b5be3afbce6a&selectedJob=292189682
linux debug run:
https://firefoxci.taskcluster-artifacts.net/FZzfXi8FScuJpukxLvuuBA/0/public/logs/live_backing.log

Code in question: WidgetStyleCache.cpp

GtkWidget* GetWidget(WidgetNodeType aAppearance) {
  GtkWidget* widget = sWidgetStorage[aAppearance];
  if (!widget) {
    widget = CreateWidget(aAppearance);
    // Some widgets (MOZ_GTK_COMBOBOX_SEPARATOR for instance) may not be
    // available or implemented.
    if (!widget) {
      NS_WARNING(nsPrintfCString("Missing GtkWidget %d\n", aAppearance).get());  <== THIS
      return nullptr;
    }

I have no idea whether aAppearance == 87 is very important or not.
If it is NOT, we may special case the warning output and ignore it.
OTOH, if it is important, we may want to investigate more.

From https://searchfox.org/comm-central/source/mozilla/widget/gtk/gtkdrawing.h#142

it seems that 86 is for

86: MOZ_GTK_COMBOBOX_ARROW
87: MOZ_GTK_COMBOBOX_SEPARATOR <=== THIS
88: MOZ_GTK_COMBOBOX_ENTRY

Either we should special case the warning for MOZ_GTKCOMBOBOX_SEPARATOR and suppress it or look into this.

Wait. The comment of the code suggests the original author IS AWARE OF this
missing case of MOZ_GTK_COMBOBOX_SEPARATOR. I think we should special case this then.

Assignee: nobody → stransky
Status: NEW → ASSIGNED

Hi,
I noticed that the proposed patch removes the warning altogether.

OTOH, it may be prudent to print UNEXPECTED missing widgets just in case
future GTK installations are screwed up somehow across various linux distributions.

My patch here tries NOT to print warning for the special case, but
generally print it.

Just a thought. It is maintainer's call.

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ae735de5134
[Wayland] Don't print 'Missing GtkWidget' warning, r=jhorak
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: