Processed: Re: Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-04-24 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + moreinfo
Bug #984953 [gparted] libgtkmm-3.0-1v5: GParted crashes on 
Gdk::Pixbuf::get_width() const ()
Added tag(s) moreinfo.

-- 
984953: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984953
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-04-24 Thread Chris Hofstaedtler
Control: tags -1 + moreinfo

Hi,

* Simon McVittie  [210424 16:00]:
> This might have been triggered by not having librsvg2-common installed?
> GTK has a Recommends on librsvg2-common, but it is not a hard dependency,
> because not all GTK applications strictly need the ability to draw SVG
> icons.

Seems credible.

> The drive-harddisk icon in the Breeze icon theme is a SVG, so it won't
> load successfully into GTK unless librsvg2-common is installed.

I tried reproducing this, but gparted always fell back to Adwaita
icons. Removing adwaita-icon-theme leaves one without xorg.

Does someone have a reproduction step list for this bug?

Chris



Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-04-22 Thread Simon McVittie
On Thu, 25 Mar 2021 at 23:22:48 +, Simon McVittie wrote:
> On Thu, 25 Mar 2021 at 22:22:33 +0100, Bernhard Übelacker wrote:
> > In the end it looks like in refresh_combo_devices [2] it
> > is attempted to load a harddisk icon.
> > 
> > This failed for some reason in [3], therefore a local variable
> > "theme_icon" contains a null pointer, which gets unconditionally
> > called member function get_width on and therefore
> > crashes a few lines later.
> 
> This looks like a gparted bug, rather than a libgtkmm-3.0-1v5 bug.
> GParted::Utils::mk_pixbuf calls Gtk::Widget::render_icon_pixbuf,
> presumably a wrapper around gtk_widget_render_icon_pixbuf(), which
> is documented to return NULL if the "stock ID" is not known (as it
> presumably is in this case); but then it calls theme_icon->get_width()
> and theme_icon->get_height() without first checking whether theme_icon is
> a null pointer.

This might have been triggered by not having librsvg2-common installed?
GTK has a Recommends on librsvg2-common, but it is not a hard dependency,
because not all GTK applications strictly need the ability to draw SVG
icons.

The drive-harddisk icon in the Breeze icon theme is a SVG, so it won't
load successfully into GTK unless librsvg2-common is installed.

Adding Depends: librsvg2-common to gparted might resolve this, at the
cost of making gparted not installable on the non-release architectures
that don't have a Rust compiler available.

The other possible solution is to improve gparted's error handling so that
it does not assume that loading an icon will always succeed.

smcv



Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-03-25 Thread Bernhard Übelacker

Dear Maintainer,
I tried to have a look at the core file and a backtrace
with all needed symbols looks like in [1].

In the end it looks like in refresh_combo_devices [2] it
is attempted to load a harddisk icon.

This failed for some reason in [3], therefore a local variable
"theme_icon" contains a null pointer, which gets unconditionally
called member function get_width on and therefore
crashes a few lines later.

A wild guess would be that the harddisk icon file
is missing or is not accessible.
Possibly there is some hint written to stdout before the crash.

Kind regards,
Bernhard


[1]
(gdb) bt
#0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
#1  Gdk::Pixbuf::get_width (this=0x0) at pixbuf.cc:517
#2  0xaab89ca4 in GParted::Utils::mk_pixbuf (widget=..., 
stock_id=..., icon_size=..., icon_size@entry=...) at 
/usr/include/glibmm-2.4/glibmm/refptr.h:259
#3  0xaab92020 in GParted::Win_GParted::refresh_combo_devices 
(this=0xe960) at /usr/include/gtkmm-3.0/gtkmm/enums.h:2870
#4  0xaab95980 in GParted::Win_GParted::menu_gparted_refresh_devices 
(this=) at Win_GParted.cc:1674
#5  0xaab95e2c in GParted::Win_GParted::initial_device_refresh 
(data=) at Win_GParted.cc:1605
#6  0xf6b8dab4 in g_main_dispatch (context=0xaaca6f10) at 
../../../glib/gmain.c:3325
#7  g_main_context_dispatch (context=0xaaca6f10) at 
../../../glib/gmain.c:4043
#8  0xf6b8de5c in g_main_context_iterate (context=0xaaca6f10, 
block=block@entry=1, dispatch=dispatch@entry=1, self=) at 
../../../glib/gmain.c:4119
#9  0xf6b8e1b0 in g_main_loop_run (loop=loop@entry=0xabb23860) 
at ../../../glib/gmain.c:4317
#10 0xf70b98f0 in gtk_main () at ../../../../gtk/gtkmain.c:1328
#11 0xaab2138c in main (argc=, argv=) 
at main.cc:62

[2]
https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Win_GParted.cc#L727

[3]
https://gitlab.gnome.org/GNOME/gparted/-/blob/master/src/Utils.cc#L109

# Bullseye/testing arm64 qemu VM 2021-03-25

echo "set enable-bracketed-paste off" >> /etc/inputrc; bash
apt update

# to speedup testing
mv /etc/manpath.config /etc/manpath.config.renamed
apt install libeatmydata1
export LD_PRELOAD=/usr/lib/$(uname -m)-linux-gnu/libeatmydata.so

apt dist-upgrade
apt install gdb zstd mc gparted \
gparted-dbgsym libgtk-3-0-dbgsym libgtkmm-3.0-1v5-dbgsym 
libglib2.0-0-dbgsym
apt build-dep gparted





mkdir /home/benutzer/source/gparted/orig -p
cd/home/benutzer/source/gparted/orig
apt source gparted
cd





wget 
"https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=984953;filename=gpartedbin.core.tar.zstd;msg=10";
 -O gpartedbin.core.tar.zstd
tar axf gpartedbin.core.tar.zstd

gdb -q --core gpartedbin.core
gdb -q /usr/sbin/gpartedbin --core gpartedbin.core

set width 0
set pagination off


Core was generated by `/usr/sbin/gpartedbin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf794d760 in Gdk::Pixbuf::get_width() const () from 
/usr/lib/aarch64-linux-gnu/libgdkmm-3.0.so.1
[Current thread is 1 (Thread 0xf51947a0 (LWP 9937))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0xf794d760 in Gdk::Pixbuf::get_width() const () from 
/usr/lib/aarch64-linux-gnu/libgdkmm-3.0.so.1
#1  0xaab89ca4 in ?? ()
#2  0xaab92020 in ?? ()
#3  0xaab95e2c in ?? ()
#4  0xf6b8dab4 in g_main_context_dispatch () from 
/usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#5  0xf6b8de5c in ?? () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#6  0xf6b8e1b0 in g_main_loop_run () from 
/usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#7  0xf70b98f0 in gtk_main () from 
/usr/lib/aarch64-linux-gnu/libgtk-3.so.0
#8  0xaab2138c in ?? ()
#9  0xf6707218 in __libc_start_main (main=0xaab21290, argc=1, 
argv=0xf4e8, init=, fini=, 
rtld_fini=, stack_end=) at ../csu/libc-start.c:308
#10 0xaab219ec in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further


Core was generated by `/usr/sbin/gpartedbin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
389 ../gdkmm/pixbuf.h: No such file or directory.
[Current thread is 1 (Thread 0xf51947a0 (LWP 9937))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  Gdk::Pixbuf::gobj (this=0x0) at ../gdkmm/pixbuf.h:389
#1  Gdk::Pixbuf::get_width (this=0x0) at pixbuf.cc:517
#2  0xaab89ca4 in GParted::Utils::mk_pixbuf (widget=..., stock_id=..., 
icon_size=..., icon_size@entry=...) at 
/usr/include/glibmm-2.4/glibmm/refptr.h:259
#3  0xaab92020 in GParted::Win_GParted::refresh_combo_devices 
(this=0xe960) at /usr/include/gtkmm-3.0/gtkmm/enums.h:2870
#4  0xaab95980 in GParted::Win_GParted::menu_gparted_refresh_devices 
(this=) at Win_GParted.cc:1674
#5  0xaab95e2c in GParted::Win_GParted::initial_device_

Processed: Re: Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-03-25 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 gparted 1.2.0-1
Bug #984953 [libgtkmm-3.0-1v5] libgtkmm-3.0-1v5: GParted crashes on 
Gdk::Pixbuf::get_width() const ()
Bug reassigned from package 'libgtkmm-3.0-1v5' to 'gparted'.
No longer marked as found in versions gtkmm3.0/3.24.2-2.
Ignoring request to alter fixed versions of bug #984953 to the same values 
previously set
Bug #984953 [gparted] libgtkmm-3.0-1v5: GParted crashes on 
Gdk::Pixbuf::get_width() const ()
Marked as found in versions gparted/1.2.0-1.

-- 
984953: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984953
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-03-25 Thread Simon McVittie
Control: reassign -1 gparted 1.2.0-1

On Thu, 25 Mar 2021 at 22:22:33 +0100, Bernhard Übelacker wrote:
> In the end it looks like in refresh_combo_devices [2] it
> is attempted to load a harddisk icon.
> 
> This failed for some reason in [3], therefore a local variable
> "theme_icon" contains a null pointer, which gets unconditionally
> called member function get_width on and therefore
> crashes a few lines later.

This looks like a gparted bug, rather than a libgtkmm-3.0-1v5 bug.
GParted::Utils::mk_pixbuf calls Gtk::Widget::render_icon_pixbuf,
presumably a wrapper around gtk_widget_render_icon_pixbuf(), which
is documented to return NULL if the "stock ID" is not known (as it
presumably is in this case); but then it calls theme_icon->get_width()
and theme_icon->get_height() without first checking whether theme_icon is
a null pointer.

gtk_widget_render_icon_pixbuf() is documented as having been deprecated
since GTK 3.10, released in 2013. The recommended replacement is
gtk_icon_theme_load_icon().

smcv



Bug#984953: libgtkmm-3.0-1v5: GParted crashes on Gdk::Pixbuf::get_width() const ()

2021-03-10 Thread Alexey A Nikitin
Package: libgtkmm-3.0-1v5
Version: 3.24.2-2
Severity: grave
Justification: renders package unusable
X-Debbugs-Cc: moonwal...@syrius.us

Dear Maintainer,

I attempted to launch GParted and saw it crash immediately after initially 
showing its window
I attempted to delete all /root/.gtkrc*, /root/.config/gtkrc*, and 
/root/.config/gtk-3.0/settings.ini
files, as I had configured Breeze as GTK theme and I thought maybe that has 
something to do with the crash
since console does spam theme-related warning messages. That did visibly reset 
the GTK theme for GParted,
but the crash was still there.

I'm also attaching the core dump from the run before my attempt to reset GTK 
theme.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: arm64 (aarch64)
Foreign Architectures: i386

Kernel: Linux 5.8.5-0.40-1-pinebookpro-hwaccel (SMP w/6 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US.UTF-8
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libgtkmm-3.0-1v5 depends on:
ii  libatkmm-1.6-1v5 2.28.0-3
ii  libc62.31-9
ii  libcairomm-1.0-1v5   1.12.2-4
ii  libgcc-s110.2.1-6
ii  libgdk-pixbuf-2.0-0  2.42.2+dfsg-1
ii  libglib2.0-0 2.66.7-1
ii  libglibmm-2.4-1v52.64.2-2
ii  libgtk-3-0   3.24.24-3
ii  libpangomm-1.4-1v5   2.42.1-1
ii  libsigc++-2.0-0v52.10.4-2
ii  libstdc++6   10.2.1-6

libgtkmm-3.0-1v5 recommends no packages.

libgtkmm-3.0-1v5 suggests no packages.

-- no debconf information