Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 534179 (WarnColumnResize) - [GTK3] GTK warnings when resizing column to 0 width
Summary: [GTK3] GTK warnings when resizing column to 0 width
Status: CLOSED WONTFIX
Alias: WarnColumnResize
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks: 518143
  Show dependency tree
 
Reported: 2018-04-28 06:54 EDT by Simeon Andreev CLA
Modified: 2020-08-26 06:11 EDT (History)
4 users (show)

See Also:


Attachments
SWT snippet to reproduce the problem with. Resize column1 until it has zero width. (1.56 KB, text/x-java)
2018-04-28 06:54 EDT, Simeon Andreev CLA
no flags Details
Video showing the problem using the attached snippet. (685.33 KB, image/gif)
2018-04-28 07:00 EDT, Simeon Andreev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2018-04-28 06:54:30 EDT
Created attachment 273851 [details]
SWT snippet to reproduce the problem with. Resize column1 until it has zero width.

To reproduce:

1. Start Eclipse.
2. Open Problems View.
3. Resize first column so that it has 0 width.
4. Observe GTK warnings on standard error:

(Eclipse:20043): Gtk-WARNING **: Negative content width -4 (allocation 6, extents 5x5) while allocating gadget (node button, owner GtkButton)


Note that with the attached snippet, the application will often crash with:

Gtk:ERROR:gtkcellrenderer.c:1787:gtk_cell_renderer_get_aligned_area: assertion failed: (aligned_area->x >= cell_area->x && aligned_area->x <= cell_area->x + cell_area->width)

We have seen this also in Eclipse but its much rarer compared to a simple snippet (and so much harder to reproduce).

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=531685#c3.
Comment 1 Simeon Andreev CLA 2018-04-28 06:55:59 EDT
We observe this on GTK 3.22.10 (RHEL 7.4) with latest SWT.
Comment 2 Simeon Andreev CLA 2018-04-28 07:00:37 EDT
Created attachment 273852 [details]
Video showing the problem using the attached snippet.
Comment 3 Eric Williams CLA 2018-04-28 16:01:32 EDT
I'm wondering if maybe we should set some sort of a minimum here, such that resizing a Table/Tree header below 1 will fail silently. I can't imagine a use case where a user needs to set a size of 0 (which I imagine is the culprit here).
Comment 4 Leo Ufimtsev CLA 2018-04-30 11:05:20 EDT
(In reply to Eric Williams from comment #3)
> I'm wondering if maybe we should set some sort of a minimum here, such that
> resizing a Table/Tree header below 1 will fail silently. I can't imagine a
> use case where a user needs to set a size of 0 (which I imagine is the
> culprit here).

+1.
Comment 5 Leo Ufimtsev CLA 2018-04-30 11:05:57 EDT
(In reply to Leo Ufimtsev from comment #4)
> (In reply to Eric Williams from comment #3)
> > I'm wondering if maybe we should set some sort of a minimum here, such that
> > resizing a Table/Tree header below 1 will fail silently. I can't imagine a
> > use case where a user needs to set a size of 0 (which I imagine is the
> > culprit here).
> 
> +1.
Comment 6 Xi Yan CLA 2018-08-16 11:49:59 EDT
This also happens with a native GTK tree, not sure if it can be fixed on the SWT level. See https://gitlab.gnome.org/GNOME/gtk/issues/1275
Comment 7 Eclipse Genie CLA 2020-08-26 06:11:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.