Bug 20678 - gnome-calculator segfaults at startup on i586
Summary: gnome-calculator segfaults at startup on i586
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: i586 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory MGA6-32-OK
Keywords: IN_ERRATA6, validated_update
Depends on:
Blocks:
 
Reported: 2017-04-15 17:16 CEST by Luis Menina
Modified: 2017-07-26 00:24 CEST (History)
6 users (show)

See Also:
Source RPM: gnome-calculator-3.24.0-1.mga6.src.rpm
CVE:
Status comment:


Attachments
gdb backtrace (10.24 KB, text/plain)
2017-04-27 23:23 CEST, Luis Menina
Details
More useful backtrace (16.06 KB, text/plain)
2017-04-27 23:37 CEST, Luis Menina
Details

Description Luis Menina 2017-04-15 17:16:19 CEST
Description of problem:
gnome-calculator segfaults when I try to run it

Version-Release number of selected component (if applicable):
gnome-calculator-3.24.0-1.mga6.src.rpm

How reproducible:
Always

Steps to Reproduce:
1. Run gnome-calculator
2. It crashes with a segfault
Comment 1 Jani Välimaa 2017-04-15 19:58:21 CEST
What's the output if you run gnome-calculator from a terminal?
Marja Van Waes 2017-04-16 11:47:43 CEST

Assignee: bugsquad => gnome
CC: (none) => marja11

Comment 2 Olav Vitters 2017-04-17 19:55:15 CEST
Cannot reproduce. Please provide terminal output. Ideally run it under gdb and get a stracktrace.

CC: (none) => olav
Keywords: (none) => NEEDINFO

Comment 3 Luis Menina 2017-04-18 14:05:53 CEST
I have no terminal output except for the segfault message. I'll try to install the debug packages and get a stack trace.
Comment 4 Luis Menina 2017-04-27 23:20:29 CEST
I have fully updated my system tonight, I can still reproduce the bug. However I can't have a valuable backtrace, even if I installed all the required debug-info packages. I even uninstalled and reinstalled gnome-calculator. Still the same backtrace.

Keywords: NEEDINFO => (none)

Comment 5 Luis Menina 2017-04-27 23:23:05 CEST
Created attachment 9231 [details]
gdb backtrace

We can see the line where the problem happens, but barely anything else.
Comment 6 Luis Menina 2017-04-27 23:37:57 CEST
Created attachment 9232 [details]
More useful backtrace

The backtrace command didn't seem to work, had to go down the call stack manually to get the real call path.

Seems in history_view_scroll_bottom at math-history.c:132, self->priv is a NULL pointer. This leads to failure here: 

> 131		_tmp0_ = self->priv->listbox;
> 132		_tmp1_ = gtk_list_box_get_adjustment (_tmp0_);
Comment 7 katnatek 2017-04-28 02:58:04 CEST
Same here

CC: (none) => j.alberto.vc

Comment 8 katnatek 2017-05-06 01:33:40 CEST
FYI: gnome-calculator-3.22.3-1 works well
Comment 9 katnatek 2017-06-05 20:59:01 CEST
For my luck i backup the 3.22.3-1 and add this application to skip.list because 
still crashing the actual version

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'variable-added' is invalid for instance '0x877ac30' of type 'MathVariables'

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'variable-edited' is invalid for instance '0x877ac30' of type 'MathVariables'

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'variable-deleted' is invalid for instance '0x877ac30' of type 'MathVariables'

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'function-added' is invalid for instance '0x88049b0' of type 'FunctionManager'

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'function-edited' is invalid for instance '0x88049b0' of type 'FunctionManager'

(gnome-calculator:8645): GLib-GObject-WARNING **: gsignal.c:2423: signal 'function-deleted' is invalid for instance '0x88049b0' of type 'FunctionManager'

(gnome-calculator:8645): GLib-GIO-ERROR **: Settings schema 'org.gnome.calculator' does not contain a key named 'window-position'
`trap' para punto de parada/seguimiento (`core' generado)
Comment 10 Martin Whitaker 2017-06-13 22:08:47 CEST
From my tests, this only affects the 32-bit (i586) version. It occurs even if the 32-bit version is used on a 64-bit system.

CC: (none) => mageia

Luis Menina 2017-06-17 16:16:35 CEST

Summary: gnome-calculator segfaults at startup => gnome-calculator segfaults at startup on i586

Luis Menina 2017-06-17 16:16:50 CEST

Hardware: All => i586

Comment 11 katnatek 2017-07-21 20:48:36 CEST
Still valid.

Keywords: (none) => IN_ERRATA6
Version: Cauldron => 6

Comment 12 katnatek 2017-07-22 22:34:36 CEST
I found that file /usr/share/glib-2.0/schemas/org.gnome.calculator.gschema
Don't have this lines:

<key type="(ii)" name="window-position">
<default>(-1, -1)</default>
<summary>Window position</summary>
<description>Window position (x and y) of the last closed window.</description>
</key>

That lines are present in the same file of fedora 26 package for i686, but adding that lines don't fix the error for the Mageia i586 package.
Comment 13 katnatek 2017-07-24 22:51:05 CEST
(In reply to katnatek from comment #12)
> I found that file /usr/share/glib-2.0/schemas/org.gnome.calculator.gschema
> Don't have this lines:
> 
> <key type="(ii)" name="window-position">
> <default>(-1, -1)</default>
> <summary>Window position</summary>
> <description>Window position (x and y) of the last closed
> window.</description>
> </key>
> 
> That lines are present in the same file of fedora 26 package for i686, but
> adding that lines don't fix the error for the Mageia i586 package.

Sorry for the noise, i recheck the rpm and found that lines, was the version that i keep (3.22) the one that don't have the lines.
Comment 14 Pascal Terjan 2017-07-25 15:08:03 CEST
My guess would be on https://git.gnome.org/browse/gnome-calculator/commit/src/math-history.vala?id=64f6c94b07ad56539665547a59916916fd917b45 causing the crash, but no idea why only on i586

I guess verifying that listbox is not null would help but I don't know why it would be (I have no idea how vala works and would need to check the generated code).

Note that on x86_64 we get CRITICAL like this:

(gnome-calculator:12412): Gtk-CRITICAL **: gtk_list_box_get_adjustment: assertion 'GTK_IS_LIST_BOX (box)' failed

(gnome-calculator:12412): Gtk-CRITICAL **: gtk_widget_get_size_request: assertion 'GTK_IS_WIDGET (widget)' failed

(gnome-calculator:12412): Gtk-CRITICAL **: gtk_adjustment_set_page_size: assertion 'GTK_IS_ADJUSTMENT (adjustment)' failed

So the problem also exists there, but doesn't cause a crash

CC: (none) => pterjan

Comment 15 Pascal Terjan 2017-07-25 15:24:15 CEST
Problem is actually that we have an old version of history-view.ui missing https://git.gnome.org/browse/gnome-calculator/diff/data/history-view.ui?id=49e87682b3d7a846e30e2073ec0e86b88621c012

Removing Source1 and Source2 (and the cp) from the package seem to fix the problem
Comment 16 Pascal Terjan 2017-07-25 19:49:15 CEST
Please test 6/core/updates_testing/gnome-calculator-3.24.0-1.1.mga6.i586.rpm or cauldron/core/release/gnome-calculator-3.24.0-2.mga7.i586.rpm
Comment 17 katnatek 2017-07-25 21:05:36 CEST
(In reply to Pascal Terjan from comment #16)
> Please test 6/core/updates_testing/gnome-calculator-3.24.0-1.1.mga6.i586.rpm
> or cauldron/core/release/gnome-calculator-3.24.0-2.mga7.i586.rpm

In what mirror? (distribb-coffe don't have neither yet)
Comment 19 katnatek 2017-07-25 23:42:46 CEST
(In reply to Pascal Terjan from comment #18)
> It is there now:
> http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/6/i586/media/
> core/updates_testing/

It Works!
Comment 20 Rémi Verschelde 2017-07-25 23:46:30 CEST
Advisory:
=========

Updated gnome-calculator package fixes crash on i586

  Due to a packaging issue, gnome-calculator used to crash with a segmentation
  fault on i586 systems. This update fixes it.

RPMs in core/updates_testing:
=============================

gnome-calculator-3.24.0-1.1.mga6

SRPMs in core/updates_testing:
==============================

gnome-calculator-3.24.0-1.1.mga6

Whiteboard: (none) => MGA6-32-OK
Assignee: gnome => qa-bugs

Comment 21 Rémi Verschelde 2017-07-25 23:51:30 CEST
Advisory uploaded, validating as it was already tested on i586 by katnatek.

Whiteboard: MGA6-32-OK => advisory MGA6-32-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 22 Mageia Robot 2017-07-26 00:07:55 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2017-0031.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 23 katnatek 2017-07-26 00:24:47 CEST
I update the english and spanish erratas.

Thank you.

Note You need to log in before you can comment on or make changes to this bug.