Skip to content
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

Eclipse is crashing in SUSE platform #212

Closed
vishnusarathashling opened this issue Oct 6, 2022 · 16 comments
Closed

Eclipse is crashing in SUSE platform #212

vishnusarathashling opened this issue Oct 6, 2022 · 16 comments

Comments

@vishnusarathashling
Copy link

Eclipse is crashing in SUSE platform.

  • We observe the issue with eclipse platform version 4.24. With 4.23 we don't see the issue.
  • OS - Type, distribution and version 
    NAME="SLES"
    VERSION="12-SP5"
    VERSION_ID="12.5"
    PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
    ID="sles"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:suse:sles:12:sp5"
  • The log says : JVM terminated, Exit code=127
@vishnusarathashling
Copy link
Author

@akurtakov
Copy link
Member

You would have to tell us a lot more before your report could be actionable at least in theory.
Does it happen with 4.25?
What are the steps to reproduce the crash?
Would you please attach the hs_err_pid* file generated by the JVM?

@akurtakov
Copy link
Member

@jukzi
Copy link
Contributor

jukzi commented Oct 6, 2022

When the JVM crashes you should report it to the JVM vendor and hope you got a service contract.

@jukzi jukzi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@vishnusarathashling
Copy link
Author

You would have to tell us a lot more before your report could be actionable at least in theory. Does it happen with 4.25? What are the steps to reproduce the crash? Would you please attach the hs_err_pid* file generated by the JVM?

The eclipse was crashing when we are opening a workspace, sorry I missed to add the step. Ok anyways thanks for the info you shared.

@akurtakov
Copy link
Member

When the JVM crashes you should report it to the JVM vendor and hope you got a service contract.

@jukzi JVM crash happens more often due to bugs in SWT than bugs in the JVM itself.
@vishnusarathashling In general such bugs are of interest for the project and we try to fix them if they are reproducible with latest Eclipse version and on recent OS as having a huge support matrix is beyond our manpower.

@vishnusarathashling
Copy link
Author

When the JVM crashes you should report it to the JVM vendor and hope you got a service contract.

@jukzi JVM crash happens more often due to bugs in SWT than bugs in the JVM itself. @vishnusarathashling In general such bugs are of interest for the project and we try to fix them if they are reproducible with latest Eclipse version and on recent OS as having a huge support matrix is beyond our manpower.

Thats sounds perfect! Thanks @akurtakov I will try with latest eclipse and update.

@vishnusarathashling
Copy link
Author

vishnusarathashling commented Oct 19, 2022

I tried with the latest eclipse (2022-09, platform 4.25) and I am getting the same crash.
Steps to reproduce:

  • Installed "Eclipse IDE for C/C++ Developers" (2022-09)
  • Opened a workspace
  • Import a project.
  • Right click the imported project.

Platform details below:
OS - Type, distribution and version
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"

The log says : JVM terminated, Exit code=127

@iloveeclipse
Copy link
Member

SLES 12 is not supported, see above

@promodkumarCM
Copy link

I too face the same issue in SLES 12, sorry to hear that we don't have support for that.

@vishnusarathashling
Copy link
Author

vishnusarathashling commented Jun 5, 2023

@iloveeclipse @akurtakov @jonahgraham @jukzi
I had to work on this issue and found that the changes in the commit : eclipse-platform/eclipse.platform.swt@d8e3f29#diff-874667bd88035dc47251befdad240fb5cf39f7db50597060fe17c2ecb6082de5 has caused this issue. But this commit seems to be added intentionally making the min version of GTK to 3.22. The crash occurs when we are right clicking (when trying to show a pop up menu) - getting gtk_menu_popup_at_pointer undefined symbol. Since this may not be present in gtk4. Earlier we used to have a separate handling if the gtk version was less than 3.22. I tried to add the removed native call and changes in Menu.java, Device.java and Shell.java and the right click functionality is working fine now.

I had to build the .so files used for gtk.linux locally for this. When I was doing that I created the .so files using
eclipse.platform.swt\bundles\org.eclipse.swt\bin\library\build.sh -gtk3 install command. The output .so files will be created using GTK3 binding (eg: libswt-pi3-gtk-4960r6.so ) and it will not have the .so corresponding to GTK4 binding (expected as per the documentation).

  • But will these .so files work for any platform (when the final product is installed) where the GTK version installed is GTK4. I am afraid that it will fail at some native calls for GTK4 (as I see we have GTK4 native calls made from different UI java classes).
  • When I checked the latest eclipse platform, it also contains only the "libswt-pi3-gtk-4960r6.so" (and no libswt-pi4-gtk-4960r6.so) in org.eclipse.swt.gtk.linux.x86_64.jar. So I just wanted to confirm during eclipse build also we are using -gtk3 and e haven't moved to gtk4 still. Please correct me if I am wrong at some point.

@jonahgraham
Copy link
Contributor

@vishnusarathashling I wanted to let you know that I saw your comment/questions. But I don't have anything really to offer here. The mentioned commit did indeed make the min version 3.22 nearly 7 years after GTK 3.22 was released. As you can see from the commit, the reason for doing this was in part to remove lots of special case code.

All I can recommend is if you need GTK < 3.22 that you continue to use SWT / Platform that was released before this change. Of course if you want to rebuilt SWT for your own use as you have started to do, you are welcome to. But I don't think there is time from the people you tagged to support this old version of GTK with a new version of Eclipse.

@vishnusarathashling
Copy link
Author

Thanks @jonahgraham I got your point, but I am in real need of latest eclipse support with GTK3.20. So I have no way other than going with the build. Actually I am able to build it and it's working fine in 3.20. But I have a question like I built the .so files using
eclipse.platform.swt\bundles\org.eclipse.swt\bin\library\build.sh -gtk3 install command. The output .so files will be created using GTK3 binding (eg: libswt-pi3-gtk-4960r6.so ) and it will not have the .so corresponding to GTK4 binding (expected as per the documentation).

  • But will the .so files (built using gtk3 option) work for any platform where the GTK version installed is GTK4?
  • When I checked the latest eclipse platform, it also contains only the "libswt-pi3-gtk-4960r6.so" (and no libswt-pi4-gtk-4960r6.so) in org.eclipse.swt.gtk.linux.x86_64.jar. So I just wanted to confirm that during eclipse swt build process also we are using -gtk3 and we haven't moved to gtk4 still. Please correct me if I am wrong at some point ie: Since eclipse latest version is also coming with gtk3 built .so (like libswt-pi3-gtk-4960r6.so), will it work in a platform where we have gtk4 installed?

@laeubi
Copy link
Contributor

laeubi commented Jun 5, 2023

@vishnusarathashling maybe it would help to open a PR with the changes you made? Maybe they are simple enough to be included in the current SWT code, I assume it is not required to redo the whole commit but just adjust some code pathes?

@vishnusarathashling
Copy link
Author

vishnusarathashling commented Jun 5, 2023

@laeubi We were planning to go for reverting almost all the JNI call areas in the above mentioned commit, since in one way or another it might cause an issue for us since we need to support 3.20 GTK version. So basically it would be complete revert of the that commit. Anyway I will try to raise a PR ASAP.

It would be really helpful if someone could answer me on this, Are the current gtk built .so files built just for GTK3 ( I mean the seven .so files in org.eclipse.swt.gtk.linux.x86_64 including libswt-pi3-gtk-4960r6.so) or latest SWT will work on a platform running with GTK4 also? I am a bit confused on this. Basically I want to confirm whether how we will be able to support in GTK4 platform also, with the .so file built for GTK3 (using -gtk3 command)?

@vishnusarathashling
Copy link
Author

@laeubi As per Jonah's comment above it is evident that we have removed the special case codes intentionally. What I did is just bringing back those portion of codes and the JNI function involved in that (in our latest swt code). I think in a framework perspective, those may not be relevant, so I think there is no point in me raising a PR with those special case codes reverted. I will just go with the swt patch for my product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants