After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679365 - gtk_icon_view_compute_n_items_for_size causes SIGFPE, Arithmetic exception
gtk_icon_view_compute_n_items_for_size causes SIGFPE, Arithmetic exception
Status: RESOLVED DUPLICATE of bug 677809
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-07-04 06:29 UTC by Pim Vullers
Modified: 2012-07-04 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace (7.09 KB, text/plain)
2012-07-04 06:29 UTC, Pim Vullers
Details

Description Pim Vullers 2012-07-04 06:29:11 UTC
Created attachment 217982 [details]
gdb backtrace

When trying to run Noise (http://launchpad.net/noise), build on Gentoo Hardened x64 against Gtk+ 3.4.3, I get the following error:

Floating point exception

Running with gdb shows that this is caused in gtkiconview.c:

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff65ffc68 in gtk_icon_view_compute_n_items_for_size (icon_view=<optimized out>, orientation=GTK_ORIENTATION_VERTICAL, size=<optimized out>, 
    min_items=0x7fffffffcc78, min_item_size=0x7fffffffcc7c, max_items=0x0, max_item_size=0x0) at gtkiconview.c:1582

The relevant part of this file (lines 1580-1590):

  if (min_item_size)
    {
      *min_item_size = size / *min_items;
      if (orientation == GTK_ORIENTATION_HORIZONTAL)
        *min_item_size -= priv->column_spacing;
      else
        *min_item_size -= priv->row_spacing;
      *min_item_size = MIN (*min_item_size, natural);
      *min_item_size -= 2 * priv->item_padding;
    }

This error does not occur in 3.4.2 (which does not yet have the gtk_icon_view_compute_n_items_for_size function).

My simple guess, based on the exception name, is that the devision 'size / *min_items' results in a float which is then assigned to an int. But this might be wrong.

If you need any additional information, let me know.
Comment 1 Pim Vullers 2012-07-04 16:31:31 UTC
This seems to be fixed in trunk, by commits concerning bug #677809.

*** This bug has been marked as a duplicate of bug 677809 ***