Bug 11923 - [Eclipse] Failed to debug a Project in Eclipse and displays error: java.lang.NullPointerException
Summary: [Eclipse] Failed to debug a Project in Eclipse and displays error: java.lang....
Status: RESOLVED NOTABUG
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M4
Assignee: Libertad
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-08-10 00:49 UTC by David Lopez Barriba
Modified: 2017-08-29 22:07 UTC (History)
7 users (show)

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


Attachments
error (67.52 KB, image/png)
2017-08-10 00:49 UTC, David Lopez Barriba
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Lopez Barriba 2017-08-10 00:49:36 UTC
Created attachment 3937 [details]
error

BUILD: 2.4 M2: rc3-9ed748a542b520c1cb763d981969233c0f5efd4e
Eclipse version:  mars
OS: Debian 8

Error occurred when I tried to debug a project in eclipse

java.lang.NullPointerException

(see attachment)


STEPS TO REPRODUCE: 

1. Download and install toolchain from AB (2.4 M2: rc3)
    https://autobuilder.yocto.io/pub/releases/yocto-2.4_M2.rc3/toolchain/x86_64/poky-glibc-x86_64-core-image-sato-i586-toolchain-2.3.sh

chmod +x poky-glibc-x86_64-core-image-sato-i586-toolchain-2.3.sh

- run script

2. Download and extract eclipse file:
https://autobuilder.yocto.io/pub/releases/yocto-2.4_M2.rc3/eclipse-poky-mars-92aa0e79e8b01c56f0670af3cd8296ec68b43350.tar.bz2

3.tar -xvf eclipse-poky-mars-92aa0e79e8b01c56f0670af3cd8296ec68b43350.tar.bz2

run setup.sh inside the scripts folder

open Eclipse

Download and Install Eclipse plugin:
https://autobuilder.yocto.io/pub/releases/yocto-2.4_M2.rc3/eclipse-plugin/mars/org.yocto.sdk-development-201708040747-archive.zip

In eclipse click 
Help > Install new Software > Add 

Select the downloaded plugin file org.yocto.sdk-development-201708040747-archive.zip
 
4. Download core-image-sato-sdk-qemux86.tar.bz2 archive for sysroot:   
https://autobuilder.yocto.io/pub/releases/yocto-2.4_M2.rc3/machines/qemu/qemux86/core-image-sato-sdk-qemux86-20170803101949.rootfs.tar.bz2
  
   - source /opt/poky/2.3/environment-setup-i586-poky-linux
   - runqemu-extract-sdk core-image-sato-sdk-qemux86-20170803101949.rootfs.tar.bz2 /home/david/qemux86

3. Download bzImage-qemux86.bin for QEMU Kernel 
https://autobuilder.yocto.io/pub/releases/yocto-2.4_M2.rc3/machines/qemu/qemux86/bzImage-qemux86.bin

4.Configure in Eclipse:
   - Cross Compiler Options: Standalone pre-built
   - Toolchain Root Location: /opt/poky/2.3 (target directory for toolchain)
   - Sysroot Location: /home/david/qemux86 (pointing where i extract sysroot from archive)
   - Target Options: QEMU
   - Kernel: /home/david/download/bzImage-qemux86.bin 

6. Apply settings for Standard Profile
7. Create a Hello Word C Project
 New-->Project-->C Project-->Yocto Project SDK Autotools Project-->Hello World ANSI C Autotools Project

8. Reconfigure Project
9. Build Project
10. Run Project:
    - Run as --> Run Configuration
    - select project
    - Configure C/C++ Application" field input Remote Absolute File path for C/C++ Application with "home/root/myApplication"
    - create a ssh connection to qemu 
    - press Run button

11. Try to Debug Project:
Debug as > Debug Configurations..

Actual Outcome:
The program displays an Error dialog with the following info:
An error has occurred. See error log for more details
java.lang.NullPointerException
Comment 1 Joshua Lock 2017-08-15 15:29:14 UTC
Which Eclipse version are you using? From where did you install it? Debian's apt archive? downloaded from eclipse.org? something else?

What Java version are you using? Is it a JRE from Oracle? An OpenJDK from Debian's apt archive? Something else?
Comment 2 Tim Orling 2017-08-18 15:22:03 UTC
In the QA report [1], it says that the Eclipse testing was being performed on Fedora 22 [2], yet your comment above says Debian 8. First of all, it is important that we are consistent in our information and testing platforms. Second of all, Fedora-22 has been EOL for a while now and should NOT be used for QA.

[1] https://wiki.yoctoproject.org/wiki/WW32_-_2017-08-09_-_Full_Test_Cycle_2.4_M2_rc3
[2] https://bugzilla.yoctoproject.org/tr_show_run.cgi?run_id=7844
Comment 3 David Lopez Barriba 2017-08-18 23:10:08 UTC
(In reply to comment #2)
> In the QA report [1], it says that the Eclipse testing was being performed
> on Fedora 22 [2], yet your comment above says Debian 8. First of all, it is
> important that we are consistent in our information and testing platforms.
> Second of all, Fedora-22 has been EOL for a while now and should NOT be used
> for QA.
> 
> [1]
> https://wiki.yoctoproject.org/wiki/WW32_-_2017-08-09_-_Full_Test_Cycle_2.
> 4_M2_rc3
> [2] https://bugzilla.yoctoproject.org/tr_show_run.cgi?run_id=7844

What happens is when the testrun was created, automatically was selected fedora 22 by default, and must be changed to debian 8 and I forgot to do it, but has been tested on Debian 8
Comment 4 brian avery 2017-08-23 20:13:38 UTC
Hi, 

TLDR:  it's a proxy issue. To verify and close, see below.

Could you retry this by doing the following:
1) Get your eclipse Mars 4.5.2 from downloads.eclipse.org - that's where our users will get it from.
2) try both a TCF and SSH connection.
3) do NOT type in the "Remote Absolute File path". Instead use the BROWSE button, double click on Root, and browse to /home/root.
  a) If browsing does not work, it indicates a connection problem.  This is what happened for me.
  b) If you have a connection problem, edit the ssh connection you made by clicking on the configure proxies line; change it to manual, and then add 192.168.7.X (2 probably by default? )to the Proxy bypass section of the Network connections. This is what was causing the connection to fail.
  c) If you just type in the result, it is trying to execute a null connection socket, thus the error.
4) If that works, please close the bug.
Comment 5 brian avery 2017-08-29 22:07:54 UTC
did add the browse button as a network connection test to the documentation in a separate doc bug