Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 472352

Summary: [GTK3] Virtual Table SetData event triggers with invalid index -1
Product: [Eclipse Project] Platform Reporter: Alexander Levsha <levsha.alexander>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bandwerker, ericwill
Version: 4.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
reproduction none

Description Alexander Levsha CLA 2015-07-10 06:26:30 EDT
Created attachment 255108 [details]
reproduction

When my virtual table has user selection and Table.removeAll() is called the table receives a SetData event with Event.index == -1.

Repro:
1. Run the attached code, ensure that it says it runs under GTK3.
2. Click on an item in the table (might take several tries).
3. Watch messages in stderr as removeAll() is called to update the table.

SWT 4.527, GTK 3.10.8, Ubuntu 14.04

-1 Item 4
java.lang.Exception
	at VTableSwtGtk3$1.handleEvent(VTableSwtGtk3.java:33)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1351)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1336)
	at org.eclipse.swt.widgets.Table.checkData(Table.java:268)
	at org.eclipse.swt.widgets.Table.cellDataProc(Table.java:207)
	at org.eclipse.swt.widgets.Display.cellDataProc(Display.java:759)
	at org.eclipse.swt.internal.gtk.OS._gtk_list_store_clear(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_list_store_clear(OS.java:9032)
	at org.eclipse.swt.widgets.Table.removeAll(Table.java:2471)
	at VTableSwtGtk3$2.run(VTableSwtGtk3.java:44)
	at org.eclipse.swt.widgets.Display.timerProc(Display.java:4406)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2422)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
	at VTableSwtGtk3.main(VTableSwtGtk3.java:52)

Bug 320838 is a possible duplicate but it's very old so i made a new one.
Comment 1 Eric Williams CLA 2018-04-11 11:58:00 EDT
This is still reproducible on GTK3.22, Fedora 27, and 4.8 M6.
Comment 2 Eric Williams CLA 2018-04-13 15:20:46 EDT
*** Bug 320838 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2020-06-01 10:46:44 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.