0

I have begun working on a code (the DALTON quantum chemistry code) that is millions of lines of FORTRAN in size. I would like to debug this through Eclipse so have been working on getting it setup within the IDE.

All is running fine, the code seems to be imported correctly and Eclipse will build it fine (with debug settings) through the makefile that Cmake produces for it. The program will also run fine within Eclipse printing the expected results to the console. However when I come to try debugging it I am presented with a java.lang.NullPointerException error that I am at a loss on how to solve.

Some clue to things not being right can be seen in the project explorer. Eclipse does not seem to handle the "dalton.exe" executable in the same way it handles the executable produced by making (same compiler, gfortran) a simple helloworld program I made to test that Eclipse was debugging Fortran files as expected. It appears to be treating the executable as a text file.

I am unable to post images directly as a new user so I will have to provide a link to a hosted version. (I will loiter and answer any questions I find I can to change this :) )

Any help is greatly appreciated.

SCREENSHOT : https://i.stack.imgur.com/ZtJOB.png

EDIT:

I have looked at the .metadata/.log for the workspace, I can't make much of the errors I'm afraid. It logs the following:

!SESSION 2013-11-20 13:46:52.774 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.parallel.product
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.parallel.product

!ENTRY org.eclipse.core.net 1 0 2013-11-20 13:47:30.190
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.debug.ui 4 0 2013-11-20 13:48:54.496
!MESSAGE Tab group extension: org.eclipse.cdt.launch.applicationProfileLaunchTabGroup for type org.eclipse.cdt.launch.applicationLaunchType for the [profile] mode has been replaced by extension: org.eclipse.cdt.launch.applicationProfileLaunchTabGroup

!ENTRY org.eclipse.core.jobs 4 2 2013-11-20 13:49:02.238
!MESSAGE An internal error occurred during: "Launching DALTON-Debug_build Configuration".
!STACK 0
java.lang.NullPointerException
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1889)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1910)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1910)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.setSourceLookupPath(CDebugTarget.java:1863)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.initializeSourceLookupPath(CDebugTarget.java:385)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.initialize(CDebugTarget.java:286)
    at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.<init>(CDebugTarget.java:279)
    at org.eclipse.cdt.debug.core.CDIDebugModel$1.run(CDIDebugModel.java:127)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
    at org.eclipse.cdt.debug.core.CDIDebugModel.newDebugTarget(CDIDebugModel.java:132)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchLocalDebugSession(LocalCDILaunchDelegate.java:162)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchDebugger(LocalCDILaunchDelegate.java:113)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launch(LocalCDILaunchDelegate.java:74)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

EDIT2:

Some progress perhaps:

I am now launching eclipse with sudo. I switched to the Debug window, and to the Executables tab in the console. There I right clicked in the table and imported dalton.x as an executable. It is of note that the source code was found successfully and the executable imported fine.

Running a debug build with this presents a new error: Failed to set program arguments, environment or working directory. Unable to set working directory: "/Users/james/QC_Codes/Dalton/build": No such file or directory. Unable to set working directory: "/Users/james/QC_Codes/Dalton/build": No such file or directory. Unable to set working directory: "/Users/james/QC_Codes/Dalton/build": No such file or directory.

I have double checked. These directories exist and should be accessible.

Again any advice is greatly appreciated.

I experiment onwards...

JamesFurness
  • 178
  • 1
  • 8
  • Try looking in the .log file in the workspace .metadata directory for more details about the internal error (or look in the Error Log view). – greg-449 Nov 20 '13 at 13:41
  • Sure thing, I have had a look and a read but can't make much of it and posted the log data in the question above in an edit. – JamesFurness Nov 20 '13 at 14:00

1 Answers1

0

The error looks like several Eclipse bug reports, like https://bugs.eclipse.org/bugs/show_bug.cgi?id=335180 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=288106 They seem to be related to missing resources or missing linked resources.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • Very much so, especially the second. However I am stuck regarding how to avoid virtual folders. I have followed the advice in [this thread](http://public.kitware.com/Bug/view.php?id=13189) on setting a cmake flag for avoiding them, though this hasn't helped. (edit formatting. – JamesFurness Nov 20 '13 at 16:54