Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #53

Closed
mckellyln opened this issue Mar 23, 2018 · 5 comments
Closed

Crash #53

mckellyln opened this issue Mar 23, 2018 · 5 comments

Comments

@mckellyln
Copy link

mckellyln commented Mar 23, 2018

When I scroll down to a certain commit grv crashes with this -

anic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5ece08]
goroutine 13 [running]:
main.DetermineRenderedCodePoint(0x9, 0x36, 0x0, 0x0, 0xc421b7e480, 0x1, 0x1)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/window.go:533 +0x208
main.(*TableFormatter).textWidth(0xc4201660c0, 0x11, 0x3, 0x2c, 0x3f)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:235 +0x10f
main.(*TableFormatter).determineMaxColWidths(0xc4201660c0, 0x1)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:220 +0x9b
main.(*TableFormatter).PadCells(0xc4201660c0, 0xc420244401, 0x7382f4, 0xc)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:180 +0x4c
main.(*TableFormatter).Render(0xc4201660c0, 0x766ba0, 0xc42013e0e0, 0x1, 0x1, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:144 +0x5f
main.(*CommitView).Render(0xc420132180, 0x766ba0, 0xc42013e0e0, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/commit_view.go:137 +0x408
main.(*ContainerView).renderWindowView(0xc4200ac160, 0x765d80, 0xc420132180, 0xc42161d2a0, 0xc420132180, 0xc421808b01, 0x8)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:388 +0xd6
main.(*ContainerView).Render(0xc4200ac160, 0x29, 0x6a, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:282 +0x30a
main.(*ContainerView).Render(0xc4200ac210, 0x29, 0x8d, 0xc420528d90, 0x1, 0x1, 0x0, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:291 +0x495
main.(*View).Render(0xc4201520c0, 0x2c, 0x8d, 0xbea53b26e501a563, 0x430392b8b, 0xab7c80, 0xab7c01, 0x0)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/view.go:164 +0x23d
main.(*GRV).runDisplayLoop(0xc420132280, 0xc42001b560, 0xc420024600, 0xc420142000, 0xc42007c600)
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/grv.go:352 +0x7bf
created by main.(*GRV).Run
/home/<user>/go/src/github.com/rgburke/grv/cmd/grv/grv.go:261 +0x13b

What can I provide to help debug ?
btw, thx for grv.

@mckellyln
Copy link
Author

mckellyln commented Mar 23, 2018

% go version
go version go1.10 linux/amd64
% grv --version
GRV - Git Repository Viewer v0.1.2-16-g36497eb (commit: 36497eb, compiled: 2018-02-25 12:57:00 EST)
Ubuntu 16.04+hwe with 4.13.0-37 kernel

@mckellyln
Copy link
Author

mckellyln commented Mar 23, 2018

#0  main.DetermineRenderedCodePoint (codePoint=9, column=54, config=..., renderedCodePoints=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/window.go:533
#1  0x00000000005d928f in main.(*TableFormatter).textWidth (colIndex=3, column=44, rowIndex=17, tableFormatter=0xc42002a140, width=63)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:235
#2  0x00000000005d90fb in main.(*TableFormatter).determineMaxColWidths (border=true, tableFormatter=0xc42002a140)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:220
#3  0x00000000005d8e6c in main.(*TableFormatter).PadCells (border=true, err=..., tableFormatter=0xc42002a140)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:180
#4  0x00000000005d8a6f in main.(*TableFormatter).Render (border=true, err=..., tableFormatter=0xc42002a140, viewStartColumn=1, win=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/table_formatter.go:144
#5  0x0000000000593308 in main.(*CommitView).Render (commitView=0xc42015c180, err=..., win=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/commit_view.go:137
#6  0x00000000005a2c66 in main.(*ContainerView).renderWindowView (childPosition=0xc420d0b0e0, childView=..., containerView=0xc4200d0210,
    ~r2=0xc42015c180, ~r3=...) at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:388
#7  0x00000000005a207a in main.(*ContainerView).Render (containerView=0xc4200d0210, err=..., viewDimension=..., wins=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:282
#8  0x00000000005a2205 in main.(*ContainerView).Render (containerView=0xc4200d02c0, err=..., viewDimension=..., wins=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/container_view.go:291
#9  0x00000000005e63ad in main.(*View).Render (err=..., view=0xc42017c0c0, viewDimension=..., wins=...)
    at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/view.go:164
#10 0x00000000005b634f in main.(*GRV).runDisplayLoop (displayCh=0xc42016c000, errorCh=0xc4200a0600, exitCh=0xc4200a25a0, grv=0xc42015c280,
    waitGroup=0xc4200bf460) at /home/<user>/go/src/github.com/rgburke/grv/cmd/grv/grv.go:352
#11 0x000000000047bd01 in runtime.goexit () at /usr/local/go/src/runtime/asm_amd64.s:2361

@mckellyln
Copy link
Author

529     // DetermineRenderedCodePoint converts a code point into its rendered representation
530     func DetermineRenderedCodePoint(codePoint rune, column uint, config Config) (renderedCodePoints []RenderedCodePoint) {
531             if !unicode.IsPrint(codePoint) {
532                     if codePoint == '\t' {
533                             tabWidth := uint(config.GetInt(CfTabWidth))
534                             width := tabWidth - ((column - 1) % tabWidth)
535
536                             for i := uint(0); i < width; i++ {
537                                     renderedCodePoints = append(renderedCodePoints, RenderedCodePoint{

@rgburke
Copy link
Owner

rgburke commented Mar 24, 2018

@mckellyln Thanks for providing so much detail. This bug was fixed by f537cc9 and should be fixed in the latest release of grv (v0.1.3) or using the latest code on master. Could you update the grv version you're using and confirm if the issue is no longer present?

@mckellyln
Copy link
Author

Yes, thanks, it's fixed now.
% grv --version
GRV - Git Repository Viewer v0.1.3-23-g77433ac (commit: 77433ac, compiled: 2018-03-25 09:20:08 EDT)
Closing issue as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants