Community
Participate
Working Groups
Attached is the package 'eclnew' which loads the package 'testpkg'. The package 'testpkg' is located in the directory 'eclnew/testpkg', and when 'eclnew' is being built, the repository directory for 'testpkg' is the current working directory. To replicate the bug, unzip the attached file and build 'eclnew', without specifying XDCPATH. If XDCPATH is not being set to include the current working directory, this physical organization causes NullPointer exception. The exception is caused by the difference between the path used by xdc.findFile and the path used by BrowserSession. When the schema for 'testpkg' is loaded, xdc.findFile automatically adds the current working directory to the search path, and 'testpkg' is found and processed correctly. However, when BrowserSession searches for the spec for 'testpkg' at the time when the config files are generated, only the package path is searched. Here is the relevant part of the error output: configuring test.x64P from package/cfg/test_x64P.cfg ... java.lang.NullPointerException at xdc.services.intern.gen.Config.pkgSpec(Config.java:2739) at xdc.services.intern.gen.Config.getPkgAliases(Config.java:1765) at xdc.services.intern.gen.Config.gen(Config.java:251) at xdc.services.intern.gen.Prog.gen(Prog.java:63) at xdc.services.intern.gen.Prog.gen(Prog.java:40) ... js: "/db/rtree/install/trees/products/xdcprod/xdcprod-m36/product/Linux/xdctools_3_20_00_36_eng/packages/xdc/cfg/Main.xs", line 31: XDC runtime exception: java.lang.NullPointerException
Created attachment 168977 [details] testcase
The workaround that prevents NullPointer exception was implemented in xdc-v32. The new bug filed as a request for a better solution is 313634.
unziped example and built with xdctool 3.20.00.30 and observed the NULL pointer exception. cleaned and rebuilt with 3.20.00.39 and got: Warning: xdc.cfg.INCOMPATIBLE_TARGET_VERSION: current target 'ti.targets.C64P' [ 1,0,6.1,6] is not compatible with targets used to build the following packages; package ti.targets.rts6000 [in C:/users/dr/xdctools_3_20_00_39_eng/packages/ti/t argets/rts6000/] was built using 'ti.targets.C64P' [1,0,7.0,0] js: "C:/users/dr/xdctools_3_20_00_39_eng/packages/xdc/cfg/Main.xs", line 31: XDC runtime error: parser cannot find package 'testpkg' along the path 'c:/users/dr /xdctools_3_20_00_39_eng/packages;..;'. gmake.exe: *** [package/cfg/test_x64P.c] Error 1 gmake.exe: *** Deleting file `package/cfg/test_x64P.c'
3.20 available from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_20_00_41/index_FDS.html