Community
Participate
Working Groups
Created attachment 254982 [details] missing null pointer checks I reproduce this issue with RCPTT 2.0.0 from the Mars release. When attempting to launch my AUT from the IDE, the AUT fails to start and the below NullPointerException is logged: java.lang.NullPointerException at org.eclipse.rcptt.launching.internal.target.TargetPlatformHelper.getInstanceContainer(TargetPlatformHelper.java:1248) at org.eclipse.rcptt.launching.internal.target.TargetPlatformHelper.getTargetPlatformProfilePath(TargetPlatformHelper.java:330) at org.eclipse.rcptt.internal.launching.ext.Q7TargetPlatformInitializer.getInfo(Q7TargetPlatformInitializer.java:231) at org.eclipse.rcptt.internal.launching.ext.Q7TargetPlatformInitializer.initialize(Q7TargetPlatformInitializer.java:100) at org.eclipse.rcptt.launching.configuration.Q7LaunchConfigurationDelegate.preLaunchCheck(Q7LaunchConfigurationDelegate.java:150) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:840) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) My target platform definition comes from a .target file in my workspace, pointing to one of the public Eclipse update sites. The Eclipse Target Editor nor the Target Platform section in the Eclipse preferences show errors for my .target file. I can build and launch my Eclipse application against my target platform definition without error. Only launching the AUT config causes an error. Further background: My organization does not run into this problem in Q7 1.3.14 but started running into this in Q7 1.3.15 and we still have the problem in RCPTT 2.0.0 from Mars release. So, this may be an old regression from before Q7 was moved to the Eclipse project. I managed to work around the issue by patching my local org.eclipse.rcptt.launching.ext_2.0.0.201506110605.jar, adding missing null pointer checks to TargetPlatformHelper. I am attaching a diff.
Created attachment 254987 [details] manually patched org.eclipse.rcptt.launching.ext_2.0.0.201506110605.jar
The problem was also reported by several individuals on the below Eclipse forum: https://www.eclipse.org/forums/index.php/t/1065683/
Any update on this issue?
New Gerrit change created: https://git.eclipse.org/r/54393
Verified fix by installing RCPTT from https://hudson.eclipse.org/rcptt/job/rcptt-all-gerrit/921/artifact/repository/full/target/repository/
Gerrit change https://git.eclipse.org/r/54393 was merged to [master]. Commit: http://git.eclipse.org/c/rcptt/org.eclipse.rcptt.git/commit/?id=3380625ccf6c1135e881ba1b54d4a08de19e7f2f
Fixed and verified (https://hudson.eclipse.org/rcptt/job/rcptt-all/617). Will be available in upcoming nightly build.
(In reply to Ulyana Skorokhodova from comment #7) > Fixed and verified (https://hudson.eclipse.org/rcptt/job/rcptt-all/617). > Will be available in upcoming nightly build. Thank you. I no longer run into the NullPointerException from TargetPlatformHelper with a 2.1.0 nightly build. However, there is a different NullPointerException that I sometimes get from Q7LaunchConfigurationDelegate that I am able to work around. This other NullPointerException was also mentioned on the Eclipse forum that I referenced in comment 2. java.lang.NullPointerException at org.eclipse.rcptt.launching.configuration.Q7LaunchConfigurationDelegate.preLaunchCheck(Q7LaunchConfigurationDelegate.java:260) at org.eclipse.pde.launching.AbstractPDELaunchConfiguration.launch(AbstractPDELaunchConfiguration.java:63) at org.eclipse.rcptt.launching.configuration.Q7LaunchConfigurationDelegate.launch(Q7LaunchConfigurationDelegate.java:90) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) When I get this other NullPointerException I click "Window -> Preferences -> Target Platform" then delete any target platform definitions created by RCPTT. They appear to have the same name as any AUT launch configs that I had created. Next, I have to restart Eclipse. After Eclipse comes back up I can start the AUT successfully without getting the NullPointerException. I haven't verified this but I also suspect that shutting down Eclipse and deleting ".metadata/.plugins/org.eclipse.pde.core" from my workspace before restarting will achieve a similar result. So, RCPTT should probably be fixed to not through this other NullPointerException from Q7LaunchConfigurationDelegate and instead maybe report an error about the target platform needing to be cleaned and re-built (or something).