Bug 10685 - Project runs successfully but debugging throws NullPointerException
Summary: Project runs successfully but debugging throws NullPointerException
Status: RESOLVED MOVED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 2.1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3
Assignee: Tim Orling
QA Contact: Humberto Ibarra
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-11-16 16:42 UTC by Humberto Ibarra
Modified: 2016-11-28 19:08 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
nullpointer_eclipse (72.31 KB, image/png)
2016-11-16 16:42 UTC, Humberto Ibarra
no flags Details
txtexception (7.24 KB, text/plain)
2016-11-16 16:43 UTC, Humberto Ibarra
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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