[MacOS] Table is rendered incompletely on mouse-down
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by running the supplied Snippet395 example on macOS and reproduce the incomplete table rendering while holding the mouse button on the left list. Read the SWT table repaint and selection-handling paths implicated by the example; the issue does not name source files or tests. Done means all table items render completely while the button is held and remain correct after release.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Table repaint triggered from selection listener of another control is rendered incompletely while mouse button is held.
To Reproduce
/*******************************************************************************
* Copyright (c) 2026 Vasili Guelvich and others
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.swt.snippets;
/*
* Table example: repaint triggered from selection listener of another control.
*
* Demonstrates a bug where table repaint is rendered incompletely while the
* mouse button is held down. Click and hold items in the left list and observe
* the right table.
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
*
* @see <a href="https://github.com/eclipse-platform/eclipse.platform.swt/issues/3311">Issue 3311</a>
*/
import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class Snippet395 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Table SetInput on Selection - Bug 3311");
shell.setMinimumSize(300, 300);
shell.setLayout(new FillLayout());
String[][] data = {
{"1 very long long long long long long string 1", "2 very long long long long long long string 2"},
{"1 short string 1", "2 short string 2"},
{"3 short string 4", "4 short string 5"}
};
String[] labels = {"long values", "short values", "2 short values 2"};
String[][] currentData = {null};
List selector = new List(shell, SWT.BORDER | SWT.SINGLE);
selector.setItems(labels);
Table table = new Table(shell, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.VIRTUAL | SWT.FULL_SELECTION);
table.addListener(SWT.SetData, event -> {
TableItem ti = (TableItem) event.item;
int index = table.indexOf(ti);
if (currentData[0] != null && index < currentData[0].length) {
ti.setText(currentData[0][index]);
}
});
selector.addListener(SWT.Selection, event -> {
display.asyncExec(() -> {
if (table.isDisposed()) return;
try {
table.setRedraw(false);
int index = selector.getSelectionIndex();
currentData[0] = index >= 0 ? data[index] : null;
table.setItemCount(currentData[0] != null ? currentData[0].length : 0);
table.clearAll();
} finally {
table.setRedraw(true);
}
});
});
shell.setSize(400, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
- Click every item in left pane a few times
- Click and hold every item in left pane, observe right pane
- Try click-and-hold second (middle) item multiple times
Expected behavior
All items are rendered the mouse button is pushed, nothing happens when button is released.
Observed behavior
Right pane renders random prefixes of data. Lines have incomplete/truncated symbols at the end.
Rendering completes when mouse button is released.
Screenshots
https://github.com/user-attachments/assets/012af415-50f6-43ce-a933-141034844fc5
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
-
Additional OS info (e.g. OS version, Linux Desktop, etc)
MacOS: 26.4.1 (25E253) -
JRE/JDK version
openjdk 21.0.10 2026-01-20 LTS
OpenJDK Runtime Environment Temurin-21.0.10+7 (build 21.0.10+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.10+7 (build 21.0.10+7-LTS, mixed mode, sharing)
otool -l /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/java | grep sdk
sdk 14.4
Version since
Unknown
Workaround (or) Additional context
Originally found in https://github.com/eclipse-platform/eclipse.platform.swt/pull/3260
Reproduces more consistently with eGit
- Lingua principale
- Java
- Stelle
- 202
- Fork
- 206
- Merge medio
- 14h 7m
- PR unite (30g)
- 103
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-platform/eclipse.platform.swt
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-platform/eclipse.platform.swt
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
apache/rocketmq-dashboard#6610 ·
I maintainer di solito rispondono entro 3 giorni
-
Citationcount column sorts alphabetically instead of numericallyForse già presa @kpunia306 l’ha presa oggi. Apertastatus: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
JabRef/jabref#17459 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elementsForse già presa @CCCLL l’ha presa oggi. Apertastatus: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spring-projects/spring-data-redis#3461 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
javapathfinder/jpf-core#649 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
devops-thiago/ThrillhouseBot#1093 ·
I maintainer di solito rispondono entro 1 giorno