How to Fix Ubuntu Wireshark Error Causing UI Freeze with Overlay Scrollbars

Problem

: When I try to open a pre-recorded packet dump in Wireshark on Ubuntu, its interface suddenly freezes, and the following errors and warnings appear in the terminal where I run Wireshark. How can I solve this issue?

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GObject’

(wireshark:3480):GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion ‘G_IS_OBJECT (object)’ failed

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GtkRange’

(wireshark:3480):Gtk-CRITICAL **: gtk_range_get_adjustment: assertion ‘GTK_IS_RANGE (range)’ failed

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GtkOrientable’

(wireshark:3480):Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion ‘GTK_IS_ORIENTABLE (orientable)’ failed

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GtkScrollbar’

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GtkWidget’

(wireshark:3480):GLib-GObject-WARNING **: invalid unclassed pointer in cast to ‘GObject’

(wireshark:3480):GLib-GObject-CRITICAL **: g_object_get_qdata: assertion ‘G_IS_OBJECT (object)’ failed

(wireshark:3480):Gtk-CRITICAL **: gtk_widget_set_name: assertion ‘GTK_IS_WIDGET (widget)’ failed

Wireshark is a GUI-based packet capture and sniffing tool. It is widely used by network administrators, network security engineers, and developers for packet-level network analysis across various tasks, such as troubleshooting network issues, vulnerability testing, application debugging, or reverse engineering protocols. Wireshark allows real-time packet logging and provides a convenient graphical interface to navigate through their protocol headers and payloads.

This is Wireshark’s UI, which sometimes hangs or freezes, especially when operating under the Ubuntu desktop, as you scroll up or down the packet list view or start loading a pre-recorded packet dump file, producing the following errors.

Apparently, this problem is caused by some incompatibility between Wireshark and overlay scrollbars, which hasn’t been resolved in the latest Ubuntu desktop (e.g., Ubuntu 15.04 desktop).

One way to avoid Wireshark’s UI freezing is to temporarily disable overlay scrollbars.

There are two ways to disable overlay scrollbars in Wireshark, depending on how you launch Wireshark on your desktop.

Command-line solution

Overlay scrollbars can be disabled by setting the

LIBOVERLAY_SCROLLBAR

environment variable to “0”.

So, if you start Wireshark via the command line in a terminal, you can disable overlay scrollbars in Wireshark as follows.

Open your .bashrc file and define the following alias.

alias wireshark=”LIBOVERLAY_SCROLLBAR=0 /usr/bin/wireshark”

Desktop launcher solution

If you start Wireshark using the desktop launcher, you can edit its desktop launcher file.

$ sudo vi /usr/share/applications/wireshark.desktop

Look for the line beginning with “Exec” and modify it as follows.

Exec=env LIBOVERLAY_SCROLLBAR=0 wireshark %f

Although this solution can help all desktop users at the system level, it becomes useless after upgrading Wireshark. If you wish to retain the modified .desktop file, copy it to your home directory as follows.

$ cp /usr/share/applications/wireshark.desktop ~/.local/share/applications/

“`