| Summary: | [GTK3] disposing an item will select a node | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||
| Component: | SWT | Assignee: | Xi Yan <xixiyan> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ericwill, niraj.modi | ||||
| Version: | 4.6 | Keywords: | triaged | ||||
| Target Milestone: | 4.12 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/137466 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1dd8b6850f4caf6a689de54a9065a448fc455e46 https://git.eclipse.org/r/138564 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5a77dd402a843c024214579c91628da0a2671744 https://git.eclipse.org/r/139323 https://bugs.eclipse.org/bugs/show_bug.cgi?id=545994 |
||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 546333 | ||||||
| Attachments: |
|
||||||
|
Description
Thomas Singer
Created attachment 260343 [details]
Sample code
Workaround: before invoking tree.deselectAll, one has to select a different node (that not will be disposed): tree.setSelection(parentItem); tree.deselectAll(); item.dispose(); ... or simply invoke tree.deselectAll after item.dispose. I can still reproduce this issue on SWT master as of this morning, GTK3.22, and Fedora 28. New Gerrit change created: https://git.eclipse.org/r/137466 Gerrit change https://git.eclipse.org/r/137466 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1dd8b6850f4caf6a689de54a9065a448fc455e46 (In reply to Eclipse Genie from comment #6) > Gerrit change https://git.eclipse.org/r/137466 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=1dd8b6850f4caf6a689de54a9065a448fc455e46 In master now, thanks for the fix Xi. New Gerrit change created: https://git.eclipse.org/r/138564 Gerrit change https://git.eclipse.org/r/138564 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=5a77dd402a843c024214579c91628da0a2671744 (In reply to Eclipse Genie from comment #9) > Gerrit change https://git.eclipse.org/r/138564 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=5a77dd402a843c024214579c91628da0a2671744 This fixes the regression from https://download.eclipse.org/eclipse/downloads/drops4/I20190312-0340/testresults/html/org.eclipse.ant.tests.ui_ep412I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html which is due to "gtk_changed" signal not blocked when disposing item. This patch also includes a SWT test checking that SWT.Selection event is not sent when item is disposed. Will verify build tomorrow. New Gerrit change created: https://git.eclipse.org/r/139323 (In reply to Eclipse Genie from comment #9) > Gerrit change https://git.eclipse.org/r/138564 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=5a77dd402a843c024214579c91628da0a2671744 Hi Xi, The JUnit test "test_disposeItemNotTriggerSelection" added by above commit failing on Windows since sometime. Please have look: https://download.eclipse.org/eclipse/downloads/drops4/I20190325-0105/testresults/html/org.eclipse.swt.tests_ep412I-unit-win32-java8_win32.win32.x86_64_8.0.html (In reply to Niraj Modi from comment #12) > (In reply to Eclipse Genie from comment #9) > > Gerrit change https://git.eclipse.org/r/138564 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > ?id=5a77dd402a843c024214579c91628da0a2671744 > > Hi Xi, > The JUnit test "test_disposeItemNotTriggerSelection" added by above commit > failing on Windows since sometime. Please have look: > https://download.eclipse.org/eclipse/downloads/drops4/I20190325-0105/ > testresults/html/org.eclipse.swt.tests_ep412I-unit-win32-java8_win32.win32. > x86_64_8.0.html Hi, I don't have a Windows machine to test on, the test checks for whether disposing the tree item will trigger a SWT.Selection event. Does this happen on Windows? (In reply to Xi Yan from comment #13) > (In reply to Niraj Modi from comment #12) > > (In reply to Eclipse Genie from comment #9) > > > Gerrit change https://git.eclipse.org/r/138564 was merged to [master]. > > > Commit: > > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > > ?id=5a77dd402a843c024214579c91628da0a2671744 > > > > Hi Xi, > > The JUnit test "test_disposeItemNotTriggerSelection" added by above commit > > failing on Windows since sometime. Please have look: > > https://download.eclipse.org/eclipse/downloads/drops4/I20190325-0105/ > > testresults/html/org.eclipse.swt.tests_ep412I-unit-win32-java8_win32.win32. > > x86_64_8.0.html > > Hi, I don't have a Windows machine to test on, the test checks for whether > disposing the tree item will trigger a SWT.Selection event. Can you please share a test snippet for this scenario, I can try it out and let you know. > Does this happen > on Windows? Yes, it's on Windows. Ping! Hi Xi, I have raised separate bug 546333 to track the failing JUnit test on Windows. Marking this as resolved. Don't forget to verify this bug fix on GTK for 4.12 M1, Thanks! Verified in I20190410-0600. |