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

Bug 566076

Summary: [15] BETA_JAVA15 Gerrit build failing due to OutOfMemoryError
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: UIAssignee: Noopur Gupta <noopur_gupta>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: kalyan_prasad, noopur_gupta, wearybands
Version: 4.17   
Target Milestone: BETA J15   
Hardware: All   
OS: All   
Whiteboard:

Description Noopur Gupta CLA 2020-08-14 06:27:46 EDT
From bug 566058#c6:

https://ci.eclipse.org/jdt/job/eclipse.jdt.ui-Gerrit/6170/artifact/org.eclipse.jdt.ui.tests/target/work/data/.metadata/.log/*view*/

java.lang.NullPointerException
	at org.eclipse.urischeme.internal.registration.DesktopFileWriter.escapeSpaces(DesktopFileWriter.java:186)
	at org.eclipse.urischeme.internal.registration.DesktopFileWriter.getMinimalDesktopFileContent(DesktopFileWriter.java:175)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.readFileOrGetInitialContent(RegistrationLinux.java:115)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.changeDesktopFile(RegistrationLinux.java:98)
	at org.eclipse.urischeme.internal.registration.RegistrationLinux.handleSchemes(RegistrationLinux.java:64)
	at org.eclipse.urischeme.AutoRegisterSchemeHandlersJob.run(AutoRegisterSchemeHandlersJob.java:78)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Comment 1 Noopur Gupta CLA 2020-08-14 06:28:24 EDT
Build is failed with:

https://ci.eclipse.org/jdt/job/eclipse.jdt.ui-Gerrit/6170/console

Exception in thread "Active Thread: Equinox Container: 7f2f4037-f702-4c50-a7c5-08f1e6569802" java.lang.OutOfMemoryError: Java heap space
Comment 2 Noopur Gupta CLA 2020-10-08 06:33:23 EDT
Not applicable anymore.
Comment 3 Umair Iqbal CLA 2020-10-22 16:02:47 EDT
I see the exact same error while running SWTBot tests with latest eclipse (eclipse-2020-09), openjdk 11.0.7 inside docker ubuntu 18.04 image, the error log is 

21:39:09  java.lang.NullPointerException
21:39:09  	at org.eclipse.urischeme.internal.registration.DesktopFileWriter.escapeSpaces(DesktopFileWriter.java:186)
21:39:09  	at org.eclipse.urischeme.internal.registration.DesktopFileWriter.getMinimalDesktopFileContent(DesktopFileWriter.java:175)
21:39:09  	at org.eclipse.urischeme.internal.registration.RegistrationLinux.readFileOrGetInitialContent(RegistrationLinux.java:115)
21:39:09  	at org.eclipse.urischeme.internal.registration.RegistrationLinux.changeDesktopFile(RegistrationLinux.java:98)
21:39:09  	at org.eclipse.urischeme.internal.registration.RegistrationLinux.handleSchemes(RegistrationLinux.java:64)
21:39:09  	at org.eclipse.urischeme.AutoRegisterSchemeHandlersJob.run(AutoRegisterSchemeHandlersJob.java:78)
21:39:09  	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

it crashes eclipse and the test fails, is there any fix for this?
Comment 4 Noopur Gupta CLA 2020-10-23 03:39:51 EDT
For this bug, comment #0 was not relevant. It was comment #1 causing the issue and got solved in bug 567052.
Comment 5 Noopur Gupta CLA 2020-10-23 03:41:32 EDT

*** This bug has been marked as a duplicate of bug 567052 ***
Comment 6 Umair Iqbal CLA 2020-10-23 05:26:53 EDT
Is this fix available in eclipse 2020-09? because I see the issue with eclipse 2020-09
Comment 7 Noopur Gupta CLA 2020-10-23 06:00:11 EDT
(In reply to Umair Iqbal from comment #6)
> Is this fix available in eclipse 2020-09? because I see the issue with
> eclipse 2020-09

The OOM issue was JDT tests specific and only present in a separate BETA_JAVA15 branch until 2020-09. 

So, this bug and hence the fix is not related to Eclipse 2020-09.
Comment 8 Umair Iqbal CLA 2020-10-23 06:28:17 EDT
Sorry I am a bit confused, I am talking about the NullPointerException error This error was not present with previous eclipse while running SWTBot tests but with eclipse 2020-09 I see this issue and it crashes eclipse during tests execution
Comment 9 Noopur Gupta CLA 2020-10-23 06:32:01 EDT
(In reply to Umair Iqbal from comment #8)
> Sorry I am a bit confused, I am talking about the NullPointerException error
> This error was not present with previous eclipse while running SWTBot tests
> but with eclipse 2020-09 I see this issue and it crashes eclipse during
> tests execution

As mentioned in comment #4, this bug is not about the NPE but about the OOME in JDT tests. Please open a bug in Platform UI for the NPE issue.
Comment 10 Umair Iqbal CLA 2020-10-23 06:33:58 EDT
Ah ok thanks for the clarification