Bug 10685

Summary: Project runs successfully but debugging throws NullPointerException
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Humberto Ibarra <humberto.ibarra.lopez>
Component: eclipse-pluginAssignee: Tim Orling <tim.orling>
Status: RESOLVED MOVED QA Contact: Humberto Ibarra <humberto.ibarra.lopez>
Severity: normal    
Priority: Medium CC: brian.avery, ioanax.grigoropol, jose.perez.carranza, yp.ep.watcher, yp.watcher
Version: 2.1.2   
Target Milestone: 2.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
nullpointer_eclipse
none
txtexception none

Description Humberto Ibarra 2016-11-16 16:42:34 UTC
Created attachment 3536 [details]
nullpointer_eclipse

Going through eclipse testcases #373, 378 and #379 which deal with running and debugging projects with eclipse plugin. All three different projects run successfully following the instructions (C, C++ & GTK), but when trying to debug a NullPointerException is thrown. Attaching the exception.

The testing environment was a Fedora 24 running eclipse Mars 4.5.2 and 2.1.2 eclipse plugin. The eclipse tar was downloaded directly from http://autobuilder.yoctoproject.org/pub/releases/yocto-2.1.2.rc1/ 

I found out that there's a workaround for this, by modifying the eclipse.ini file and adding the following lines:

--launcher.GTK_version
2

Created this bug to track the issue. Not sure if this can be implemented on eclipse-poky repository or if it should be left as a documented workaround.
Comment 1 Humberto Ibarra 2016-11-16 16:43:00 UTC
Created attachment 3537 [details]
txtexception
Comment 2 Tim Orling 2016-11-17 16:23:57 UTC
This looks like an upstream issue, so we should either find or file a bug on it with upstream (either Eclipse Platform or Eclipse CDT). It remains to be determined if this is a Mars (4.5.x) only issue or still present in Neon (4.6.x) and Oxygen (4.7.x). We can provide the documented workaround as a "known issue".

Writing code to alter the user's eclipse.ini feels wrong, especially for an issue that has been mentioned upstream in other contexts.
Comment 3 brian avery 2016-11-21 18:11:03 UTC
Can we close this and add a documentation bug to add the workaround to our eclipse docs? It's an upstream issue.
Eclipse bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736

Workaround 1st pass documentation:
https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage#Dealing_with_java.lang.NullPointerException
Comment 4 Tim Orling 2016-11-28 19:08:23 UTC
This activity will be tracked in a documentation bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10714