-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV in Tree.cellDataProc
when calling TreeItem.setImage
#678
Comments
Tree.cellDataProc
when calling TreeItem.setImage
Tree.cellDataProc
when calling TreeItem.setImage
Tree.cellDataProc
when calling TreeItem.setImage
Tree.cellDataProc
when calling TreeItem.setImage
Sorry about the waiting time, SWT currently has few active maintainers. |
Hello, just a ping on this issue: We are still often encountering this crash on an almost daily basis... :/ |
SWT is currently low on active contributors. |
Of course, I understand, FOSS is what it is...
Actually we ended up tossing the problematic pieces of code (in this one and #697) into a |
I found a way to reproduce all the time in a @flatpak runtime, where also all workarounds fail. |
It would be useful if you describe how exactly do you reproduce. |
Sorry, I thought that it won't be that helpful because you need to build a package to test. Here it is https://github.com/Mailaender/flathub/compare/chemclipse Check the README for the commands to build it. Click Use runtime-version: 20.08 and rebuild to see how the application looked before the crash was introduced. |
Oh, I didn't expect a whole other application. Indeed I don't have the time to debug it. |
You can also indirectly trigger this with public class MyLabelProvider extends LabelProvider implements ILabelProvider {
@Override
public Image getImage(Object element) {
// return something other then null
}
} This is sometimes difficult to reproduce. I had my best chances when there was only one unexpanded item in the tree viewer. |
We still have the |
There are occasions where the I just copied your snippet into my 2023-03 project and it crashed. It does not when I try it here. The instructions at https://www.eclipse.org/swt/git.php are somehow outdated or not very precise, but this should work: Install
I just ignored the API baseline error and got a test environment where the problem is not reproducible or hopefully already fixed. |
Updated consecutively up to Eclipse 2023-12 and the crash is still there. |
While trying to work around it, I found another way to crash more reliable: public class MyLabelProvider extends LabelProvider implements ILabelProvider {
@Override
public Image getImage(Object element) {
try {
Thread.sleep(100);
} catch(InterruptedException e) {
logger.warn(e);
}
new Image(display, 16, 16))
}
} |
I have no real fix yet, and the |
I also don't understand why this crash does not happen with the Eclipse IDE. The PDE Project Explorer and Java Package Explorer as well as the Git Repositories all use trees with icons. |
Just an observation: running original snippet from the ticket description I see no crash but following GTK errors on GTK 3.22 / RHEL 7.9
and following on GTK 3.24 / RHEL 9.2:
|
Let's say it makes most calls safe. My workaround only reduces the occurrence of the crash. |
I think this was introduced in GTK version jump between Ubuntu 22.04 → Ubuntu 24.04. |
You mean it doesn't crash on 22.04 but crashes on 24.04 ? |
I updated our Eclipse RCPTT UI testing server recently and it also started randomly crashing. However, it does not preserve the stack trace and is not reproducible between runs. |
OpenJDK from Ubuntu or Temurin from Eclipse, JVM does not seem to matter here. |
I think the difference between Eclipse IDE and Eclipse ChemClipse is that the Data Explorer (file viewer) halts the whole application while it waits for I/O related things. It either crashes right at the beginning when folders are traversed or not at all, as in it never crashes except during startup. The Eclipse IDE has a way more responsive UI while it is still loading things. |
Describe the bug
Virtual
Tree
widget crashes JVM (through GTK3) when settingImage
ontoTreeItem
inListener
toSWT.SetData
.This is a continuation of https://bugs.eclipse.org/bugs/show_bug.cgi?id=573090.
To Reproduce
Expected behavior
The application always shows a window with a tree widget in it, containing one item, with a small white icon.
Screenshots
Not applicable.
Environment:
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX 550 Series
org.eclipse.swt.internal.gtk.version=3.24.37
JRE version: OpenJDK Runtime Environment Temurin-17.0.7+7 (17.0.7+7) (build 17.0.7+7)
Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (17.0.7+7, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
Version since
Tested on Eclipse 4.27 (SWT 4.958).
Workaround (or) Additional context
The crash doesn't always happen, but fairly often.
Removing the
TreeItem.setImage
call avoids the crash entirely.The text was updated successfully, but these errors were encountered: