Closed Bug 1728532 Opened 4 years ago Closed 2 years ago

GLib-GObject-CRITICAL assertion failure when opening the Print dialog

Categories

(Core :: Widget: Gtk, defect)

All
Linux
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: valentin, Unassigned, NeedInfo)

Details

(Keywords: assertion)

Attachments

(1 file)

When opening the Print dialog in any message or compose window,
I’m getting the following warning:

Critical(thunderbird:2243): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

When launched with --g-fatal-warnings, this causes the program
to crash and to open the Crash Reporter.

This has been happening ever since the new Print dialog was added, AFAICS.

Attached is a gdb backtrace.

Component: Untriaged → General
Flags: needinfo?(mkmelin+mozilla)
Keywords: assertion

Thunderbird just uses the platform code now. The warning is of not (to my knowledge) causing any problem.

Component: General → Widget: Gtk
Flags: needinfo?(mkmelin+mozilla)
Product: Thunderbird → Core
Summary: Critical assertion failure when opening the Print dialog → GLib-GObject-CRITICAL assertion failure when opening the Print dialog

Can it be here?
https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/widget/gtk/nsPrintSettingsGTK.cpp#110

Is it possible that rhs.mGTKPrinter is nullptr?

It may mean there isn't any printer connected. Valentin, do you see any issues with the printing or just this message?

Flags: needinfo?(valentin)

Can it be here? https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/widget/gtk/nsPrintSettingsGTK.cpp#110

Is it possible that rhs.mGTKPrinter is nullptr?

Sounds reasonable with the backtrace, and given how mGTKPrinter is being used all over this file (e.g. GTK_IS_PRINTER, and the fact it's only initialized to nullptr in the constructor) it does sounds like it could be.

Even if this wouldn't "seem" to cause much problem in normal usage (if you found the spot, it merely returns NULL from the assertion error), such a warning means an invalid object is being used which is a problem by itself. Also, although it's uncommon to see such builds, known that GObject, GTK & co can be built disabling those checks (e.g. for performance reasons), and in such builds it would merely crash (or worse) as the check would not happen and the invalid object would actually be used.

Printing does works fine; I do have a major stumbling block with this
dialog as it doesn’t always correctly take the focus and therefore
isn’t correctly exposed to screen readers, but I’m not sure whether
that accessibility problem is related to the aforementioned GLib
assertion failure.

Flags: needinfo?(valentin)

Does it still fail for you?

Flags: needinfo?(valentin)
Flags: needinfo?(helpdesk)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:stransky, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(valentin) → needinfo?(stransky)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(stransky)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: