Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

crash - stack trace #10

Closed
sawilde opened this Issue Dec 22, 2011 · 5 comments

Comments

Projects
None yet
4 participants

sawilde commented Dec 22, 2011

Hi

I am trying this utility and I was wondering what the issue might be

C:\Ruby192>bugspots p:\projects\opencover.git\working
Scanning p:\projects\opencover.git\working repo
C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/process.rb:290:in `spawn
': can't convert nil into String (TypeError)
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/process.rb:
290:in `spawn'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/process.rb:
271:in `popen4'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/process.rb:
97:in `exec!'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/process.rb:
68:in `initialize'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/git.rb:301:
in `new'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/git.rb:301:
in `native'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/git.rb:325:
in `method_missing'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/commit_stat
s.rb:39:in `find_all'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/repo.rb:352
:in `commit_stats'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/grit-2.4.1/lib/grit/commit.rb:2
24:in `stats'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bugspots-0.0.4/lib/bugspots/sca
nner.rb:20:in `block in scan'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bugspots-0.0.4/lib/bugspots/sca
nner.rb:18:in `each'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bugspots-0.0.4/lib/bugspots/sca
nner.rb:18:in `scan'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bugspots-0.0.4/bin/bugspots:44:
in `<top (required)>'
        from C:/Ruby192/bin/bugspots:19:in `load'
        from C:/Ruby192/bin/bugspots:19:in `<main>'

C:\Ruby192>
Owner

igrigorik commented Dec 22, 2011

This looks like a bug in grit library, which is used to read out the git commit info.

mojombo/grit#57

Are you trying to read an empty directory, or git repo with no commits by any chance?

sawilde commented Dec 22, 2011

The repo has lots of commits (it is my opencover project) and the directory is not empty. It may have sub directories which are empty though - would that cause problems?

Owner

igrigorik commented Dec 22, 2011

I hope not! It's probably worth opening a bug on the grit repo around this.. If you're familiar with ruby, can you try dropping into irb and try to open the repo, walk over the commits?

https://github.com/mojombo/grit - check out examples in the readme, or take a look at the source in bugspots (which is very, very simple)

@igrigorik igrigorik referenced this issue Apr 17, 2012

Merged

Fix for bug 41 #18

Contributor

msgerbush commented Apr 19, 2012

Not exactly sure what is going on here, but it looks like some of the arguments getting passed to git-log when commit.stats is called are getting messed up. Its hard to tell without being able to reproduce the error. This is definitely a grit issue, but this grit stack trace includes code that is over a year old and has been completely refactored. You might want to try just updating your version of grit and seeing if that fixes the issue.

swang commented May 12, 2012

Hello,

I got this error not because of the issue #41 in grit, but because grit does not work properly in Windows. Windows separates paths in its environment variable by using semi-colons rather than colons and grit only tokenized on colons. I was going to submit a patch but someone beat me to the punch.

mojombo/grit#75

So what I did was run:

git clone https://github.com/Ziaw/grit.git
cd grit
git checkout -b patch-1 origin/patch-1
gem build grit

Then I uninstalled grit and reinstalled the built gem in the folder

Once I did that I was able to run bugspots fine.

@igrigorik igrigorik closed this Feb 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment