pkgr icon indicating copy to clipboard operation
pkgr copied to clipboard

nil pointer error

Open billdenney opened this issue 5 years ago • 2 comments

Same title as #159, but I think it's for a different reason. This is with version 0.5.1.

The URLs work in the attached file (so, it's not the same error as #159): pkgr.txt (note that I renamed from .yml for upload here)

>pkgr --update install
INFO[0000] R Version 3.6.2
INFO[0000] found installed packages                      count=277
WARN[0000] Packages not installed by pkgr                packages="[chron gbRd TopicLongTable AlgDesign formulops pmxTools sandwich dparser bdsmatrix PKdata crossdes maxLik tabulizer tictoc here lmtest microbenchmark Rsdtm rJava drake ggdendro xpose glmmML PKNCA bsd.report latex.makers tabulizerjars filetype.mappings]"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x7ab93e]

goroutine 6 [running]:
github.com/metrumresearchgroup/pkgr/cran.(*RepoDb).FetchPackages.func1(0xc00016e280, 0x3, 0x6, 0x2, 0xc0004bb620, 0xc0001057f0, 0x2)
        /Users/devinpastoor/go/src/github.com/metrumresearchgroup/pkgr/cran/repodb.go:132 +0x10e
created by github.com/metrumresearchgroup/pkgr/cran.(*RepoDb).FetchPackages
        /Users/devinpastoor/go/src/github.com/metrumresearchgroup/pkgr/cran/repodb.go:124 +0x31c

billdenney avatar Feb 16 '20 21:02 billdenney

I'm not getting this error with 0.6.0. I'm not sure if the resolution was within pkgr or if it was something about the websites being up/down. If possible, clearer error messages would help, but if it was fixed in another way, feel free to close the issue.

billdenney avatar Mar 15 '20 15:03 billdenney

Thanks Bill, so its not a change in pkgr its definitely the instability of the microsoft cran snapshot.

It's not a 'bug', its just a very bad error message - in particular its timing out before it can fetch the PACKAGES file. That can either be because its completely down, or just very slow.

For what its worth, the stack trace points (those who are familiar with the code base) quite quickly to:

github.com/metrumresearchgroup/pkgr/cran.(*RepoDb).FetchPackages

which is where its going out to the packages file at <REPOURL>/src/contrib/PACKAGES

For pkgr 1.0, which should be coming out in the next month, this will be a more informative message around the db being either invalid or unavailable.

dpastoor avatar Mar 15 '20 16:03 dpastoor