jpg causes nub to crash

1 view
Skip to first unread message

Anthony Webb

unread,
Mar 29, 2008, 6:38:57 PM3/29/08
to GitNub
I have a commit where I added a folder with a jpg in it. When I view
that particular commit in nub it will crash nub and send me back to
the command line.

Justin Palmer

unread,
Mar 29, 2008, 6:43:30 PM3/29/08
to git...@googlegroups.com
Hey Anthony,

Can you tell me what version of GitNub you're using and what does Console.app tell you when GitNub crashes?

 -Justin

Anthony Webb

unread,
Mar 29, 2008, 9:45:46 PM3/29/08
to GitNub
I was using .8, but I updated to .85 with the same result, here is the
log:

3/29/08 7:42:25 PM GitNub[99874]
CommitsController#tableViewSelectionDidChange: TypeError: can't
convert nil into String
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:201:in
`basename'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:201:in
`update_main_document'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /Library/
Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:
154:in `each_with_index'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`each'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`each_with_index'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`update_main_document'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:90:in
`tableViewSelectionDidChange'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/rb_main.rb:23:in
`NSApplicationMain'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/rb_main.rb:23
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:201:in
`basename': can't convert nil into String (TypeError)
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:201:in
`update_main_document'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/
oc_import.rb:154:in `each_with_index'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`each'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`each_with_index'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:173:in
`update_main_document'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/CommitsController.rb:90:in
`tableViewSelectionDidChange'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/rb_main.rb:23:in
`NSApplicationMain'
3/29/08 7:42:25 PM
[0x0-0xb00b0].com.alternateidea.rubycocoa.GitNubApp[99874] from /
Applications/GitNub.app/Contents/Resources/rb_main.rb:23

On Mar 29, 4:43 pm, "Justin Palmer" <encyteme...@gmail.com> wrote:
> Hey Anthony,
> Can you tell me what version of GitNub you're using and what does
> Console.app tell you when GitNub crashes?
>
> -Justin
>
> On Sat, Mar 29, 2008 at 3:38 PM, Anthony Webb <anthony.w...@gmail.com>
> wrote:
>
>
>
> > I have a commit where I added a folder with a jpg in it. When I view
> > that particular commit in nub it will crash nub and send me back to
> > the command line.
>
> --
> Justin Palmerhttp://alternateidea.com|http://lighthouseapp.com|http://activereload.net|http://warehouseapp.com

Justin Palmer

unread,
Mar 31, 2008, 1:08:42 PM3/31/08
to git...@googlegroups.com
Hmm, this could be a Grit issue.  Can you test with this code in IRB:

require '/Path/To/GitNub.app/Contents/Resources/grit/lib/grit'
repo = Grit::Repo.new("/Path/To/Your/Repo")
commit = repo.commit("hash_of_the_jpeg_commit")
commit.diffs.each do |diff|
  puts diff.b_path
end

Does this throw an error?  What is the output for the jpeg file?

 -Justin

--
Justin Palmer

Anthony Webb

unread,
Mar 31, 2008, 10:25:37 PM3/31/08
to GitNub
Unfortunately I'm not a ruby buff. If you can give me a little more
instruction on how to run the command I will give it a shot though.
Is IRB something I have or something I can get? Sorry, I know I sound
like an idiot here. But I'd like to learn and help because I'd love
to see a nice git gui util.

On Mar 31, 11:08 am, "Justin Palmer" <encyteme...@gmail.com> wrote:
> Hmm, this could be a Grit issue.  Can you test with this code in IRB:
> require '/Path/To/GitNub.app/Contents/Resources/grit/lib/grit'
> repo = Grit::Repo.new("/Path/To/Your/Repo")
> commit = repo.commit("hash_of_the_jpeg_commit")
> commit.diffs.each do |diff|
>   puts diff.b_path
> end
>
> Does this throw an error?  What is the output for the jpeg file?
>
>  -Justin
>
> On Sat, Mar 29, 2008 at 6:45 PM, Anthony Webb <anthony.w...@gmail.com>

Justin Palmer

unread,
Apr 1, 2008, 10:43:52 PM4/1/08
to git...@googlegroups.com
No problem!  

If you open Terminal.app and type 'irb' it should fire up an IRB shell (Interactive Ruby).
You can probably just paste this code right in (assuming you've entered the correct path).

You can also dump it in a ruby file (somefile.rb) and run it from Terminal:  "ruby somefile.rb"

-Justin
--
Justin Palmer

Anthony Webb

unread,
Apr 3, 2008, 12:33:22 AM4/3/08
to GitNub
OK, I'm not sure what I am looking for in here, hope this helps you :)

[#<Grit::Diff:0x30b4d4 @b_commit=#<Grit::Commit
"6239edccde468f3ac5e16aead59976a5474660f1">, @new_file=true,
@a_commit=nil, @b_mode=nil, @b_path=nil, @diff="Binary files /dev/null
and b/another flder/anthony_bio.jpg differ", @a_mode=nil,
@repo=#<Grit::Repo "/Users/awebb/Desktop/gitr/.git">, @a_path=nil,
@deleted_file=false>, #<Grit::Diff:0x30b31c @b_commit=#<Grit::Commit
"dc89362379626b2735ce5e2961e657c047957ab1">, @new_file=false,
@a_commit=#<Grit::Commit "cb1955303b7efa7130d951f5175002add22e3cbe">,
@b_mode="100644", @b_path="somethingnew.rtf", @diff="--- a/
somethingnew.rtf\n+++ b/somethingnew.rtf\n@@ -4,4 +4,8 @@\n \
\margl1440\\margr1440\\vieww9000\\viewh8400\\viewkind0\n \\pard\\tx720\
\tx1440\\tx2160\\tx2880\\tx3600\\tx4320\\tx5040\\tx5760\\tx6480\
\tx7200\\tx7920\\tx8640\\ql\\qnatural\\pardirnatural\n \n-\\f0\\fs24 \
\cf0 This is on the new thing}\n\\ No newline at end of file\n+<<<<<<<
HEAD:somethingnew.rtf\n+\\f0\\fs24 \\cf0 This is on the new thing}\n
+=======\n+\\f0\\fs24 \\cf0 This is something else on the branch}\n
+>>>>>>> fixes:somethingnew.rtf", @a_mode=nil, @repo=#<Grit::Repo "/
Users/awebb/Desktop/gitr/.git">, @a_path="somethingnew.rtf",
@deleted_file=false>]



On Apr 1, 8:43 pm, "Justin Palmer" <encyteme...@gmail.com> wrote:
> No problem!
> If you open Terminal.app and type 'irb' it should fire up an IRB shell
> (Interactive Ruby).
> You can probably just paste this code right in (assuming you've entered the
> correct path).
>
> You can also dump it in a ruby file (somefile.rb) and run it from Terminal:
>  "ruby somefile.rb"
>
> -Justin
>
> On Mon, Mar 31, 2008 at 7:25 PM, Anthony Webb <anthony.w...@gmail.com>
> Justin Palmerhttp://alternateidea.com|http://lighthouseapp.com|http://activereload.net|http://warehouseapp.com

Anthony Webb

unread,
Apr 3, 2008, 12:39:43 AM4/3/08
to GitNub
One other detail that might have bearing here.

I am new to git. When I first ran the "git init" I was sudo su, so
some commands I run I have to be su or else I get a permission denied.

When I try to run "nub" as SU, I get this error:
LSGetApplicationForInfo() failed with error -10814 while trying to
determine the application with bundle identifier
com.alternateidea.rubycocoa.GitNubApp.

Exiting SU I can then run "nub" fine and browse around, except for the
crash when I try to view that commit with the jpg.

Hope this helps.

Thanks,
Anthony


On Apr 1, 8:43 pm, "Justin Palmer" <encyteme...@gmail.com> wrote:
> No problem!
> If you open Terminal.app and type 'irb' it should fire up an IRB shell
> (Interactive Ruby).
> You can probably just paste this code right in (assuming you've entered the
> correct path).
>
> You can also dump it in a ruby file (somefile.rb) and run it from Terminal:
>  "ruby somefile.rb"
>
> -Justin
>
> On Mon, Mar 31, 2008 at 7:25 PM, Anthony Webb <anthony.w...@gmail.com>
> Justin Palmerhttp://alternateidea.com|http://lighthouseapp.com|http://activereload.net|http://warehouseapp.com

Kevin Ballard

unread,
Apr 5, 2008, 12:09:35 PM4/5/08
to GitNub
You should probably chown the .git dir back to yourself so you can
stop using su.

In any case, I just tested your described scenario and GitNub doesn't
crash for me.
Reply all
Reply to author
Forward
0 new messages