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

[BUG] runtime error with the rxvt, while the xterm works fine. #279

Open
greyHairChooseLife opened this issue May 8, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@greyHairChooseLife
Copy link

greyHairChooseLife commented May 8, 2023

Describe the bug

I issued #257 last week and that is closed. I couldn't reopen it so I open new but almost same issue. I hope this doesn't bother you.

When I run this plugin with the xterm, it works fine. It loads my PRs or whatever, I guess.

But I still get same runtime error message just like...
runtime error: invalid memory address or nil pointer dereference

Although I upgrade them.

Please update your gh cli as well as gh-dash to their latest versions as this was just fixed a couple of days ago.
Originally posted by @dlvhdr in #257 (comment)

I did update gh cli and gh-dash. They are now..

gh-cli :  version 2.28.0 (2023-04-25)
gh dash : dlvhdr/gh-dash	v3.7.9

But the outputs are little bit different as I run gh dash > output. It seems it work actually fine internally.

Here are outputs.

gh dash in directory having .git
^[]11;rgba:0000/0000/0000/e666^[^[[2;1R^[]10;rgb:adad/d8d8/e6e6^[^[[2;40RCaught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
  /opt/hostedtoolcache/go/1.20.3/x64/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
  /opt/hostedtoolcache/go/1.20.3/x64/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
  /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:385 +0x95
panic({0xd02460, 0x1558240})
  /opt/hostedtoolcache/go/1.20.3/x64/src/runtime/panic.go:884 +0x213
github.com/dlvhdr/gh-dash/ui/components/issuessection.FetchAllSections({{0x0, 0x0}, 0x2e, 0xae, 0xae, 0x29, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
  /home/runner/work/gh-dash/gh-dash/ui/components/issuessection/issuessection.go:275 +0x92
github.com/dlvhdr/gh-dash/ui.(*Model).fetchAllViewSections(0xc000024310?)
  /home/runner/work/gh-dash/gh-dash/ui/ui.go:502 +0xf9
github.com/dlvhdr/gh-dash/ui.Model.Update({{{0x0, 0x0}, {{0xc000234240, 0x2, 0x2}, {{...}, {...}}, 0x0}, {{0xc000234260, 0x2, ...}, ...}, ...}, ...}, ...)
  /home/runner/work/gh-dash/gh-dash/ui/ui.go:189 +0x301d
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00013a0b0, {0x10008a0?, 0xc000130000?}, 0xffd640?)
  /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:324 +0x60a
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00013a0b0)
  /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:448 +0x91a
github.com/dlvhdr/gh-dash/cmd.init.0.func1(0x15630a0?, {0xda5024?, 0x0?, 0x0?})
  /home/runner/work/gh-dash/gh-dash/cmd/root.go:131 +0x255
github.com/spf13/cobra.(*Command).execute(0x15630a0, {0xc000022240, 0x0, 0x0})
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x15630a0)
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
  /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/dlvhdr/gh-dash/cmd.Execute()
  /home/runner/work/gh-dash/gh-dash/cmd/root.go:41 +0x25
main.main()
  /home/runner/work/gh-dash/gh-dash/gh-dash.go:8 +0x17
gh dash > output in git directory
�[?25l�[?1049h�[2J�[1;1H�[1;1H�[?25l                                                                            
�[2m�[0m  |  �[1;;mMy Pull Requests�[0m  |  �[2mNeeds My Review�[0m  |  �[2mInvolved�[0m  �[1;;m[ PRs]�[0m�[;m[ Issues]�[0m
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╭──────────────────────────╮                                                          │               Nothing selected...               
│ is:pr �[2m�[0m�[2mi�[0m�[2ms:open author:@me�[0m│                                                                                                            
╰──────────────────────────╯                                                                                                            
�[1m Tip:�[0m you can change the search query by pressing  �[;m/�[0m  and submitting it with  �[;mEnter�[0m                                                    
────────────────────────────────────
[ 3] ⢿  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⡿  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣟  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣯  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣷  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣾  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣽  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⣻  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⢿  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B[ 3] ⡿  Fetching PRs for "Involved"�[9;0H�[2K�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[0D�[2K                                                                            
�[2m�[0m  |  �[1;;mMy Pull Requests�[0m  |  �[2mNeeds My Review�[0m  |  �[2mInvolved�[0m  �[1;;m[ PRs]�[0m�[;m[ Issues]�[0m
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╭──────────────────────────╮                                            │                                                 
│ is:pr �[2m�[0m�[2mi�[0m�[2ms:open author:@me�[0m│                                            │                                                 
╰──────────────────────────╯                                            │  �[1;m0%�[0m                                             
�[1;m�[0m      �[1;m�[0m  �[1;m�[0m              �[1;mTitle�[0m  �[1;mAuthor�[0m         �[1;m󰯢�[0m   �[1;m�[0m   �[1;m�[0m                                                                 
                                                                                                                         
                                                                                                                         
                                                                                                                         
 05/08 22:30:18 • PR 1/2 • Fetched 2                                                                                     
──────────────────────────────
⡿  Fetching PRs for "Involved"�[13;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B⣟  Fetching PRs for "Involved"�[13;0H�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B⣯  Fetching PRs for "Involved"�[13;0H�[2K�[1A�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B──────────────────────────────────────
 PRs for "Involved" have been fetched�[13;0H�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[2K�[1A�[2K�[1A�[2K�[1A�[1A�[2K�[1A�[0D�[2K                                                                            
�[2m�[0m  |  �[2mMy Pull Requests�[0m  |  �[1;;mNeeds My Review�[0m  |  �[2mInvolved�[0m  �[1;;m[ PRs]�[0m�[;m[ Issues]�[0m
�[1B ╭────────────────────────────────────╮                                  │                                                 
│ is:pr �[2m�[0m�[2mi�[0m�[2ms:open review-requested:@me�[0m│                                  │                                                 
╰────────────────────────────────────╯                                  │  �[1;m0%�[0m                                             
�[1B�[1B�[1B�[1B�[1B�[1B�[13;0H�[2K�[1A�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B──────────────────────
? toggle help • q quit�[13;0H�[1A�[1A�[2K�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[1A�[0D�[2K                                                                            
�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B�[1B  05/08 22:30:18 • PR 2/2 • Fetched 2                                                                                     
�[1B�[13;0H�[2K�[?25h�[?1002l�[?1003l�[?1049l�[?25hCaught panic:

runtime error: slice bounds out of range [11:4]

Restoring terminal...
debug.logwhen I try gh dash --debug

This is some additional information that you can view by clicking the toggle.

11:11PM DEBUG <cmd/root.go:58> Logging to debug.log
11:11PM DEBUG <ui/ui.go:106> Key pressed key=[
11:11PM DEBUG <ui/ui.go:106> Key pressed key=3
11:11PM DEBUG <ui/ui.go:106> Key pressed key=;
11:11PM DEBUG <ui/ui.go:106> Key pressed key=1
11:11PM DEBUG <ui/ui.go:106> Key pressed key=R

To Reproduce
Steps to reproduce the behavior:

  1. install with gh extension install ...
  2. gh dash

Desktop (please complete the following information):
OS: manjaro linux
TERM: rxvt-256

just in case,

here is my .Xresource config
Xft.dpi:       96
Xft.antialias: true
Xft.hinting:   true
Xft.rgba:      rgb
Xft.autohint:  false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault

XTerm*background:        #222D31
XTerm*foreground:        #d8d8d8
XTerm*pointerColor:      #1ABB9B
XTerm*faceName:          Fixed
XTerm*faceSize:          11
XTerm*reverseVideo:      on
XTerm*selectToClipboard: true

*background:                      #222D31
!*background:                      [90]#000000
!*foreground:                      #d8d8d8
!*foreground:                      green
*foreground:                      white 
*fading:                          10
*fadeColor:                       black
!*cursorColor:                     #1ABB9B
*cursorColor:                     green
*pointerColorBackground:          #2B2C2B
*pointerColorForeground:          #16A085

!! black dark/light
*color0:                          #222D31
*color8:                          #585858

!! red dark/light
*color1:                          #fa3232
*color9:                          #ab4642

!! green dark/light
*color2:                          #4bc95e
!*color2:                          #7E807E
*color10:                         #0dfc31

!! yellow dark/light
*color3:                          #f7ca88
*color11:                         #f7ca88

!! blue dark/light
*color4:                          #4b5ec9
*color12:                         #7cafc2

!! magenta dark/light
*color5:                          #ba8baf
*color13:                         #ba8baf

!! cyan dark/light
*color6:                          #1ABB9B
*color14:                         #1ABB9B

!! white dark/light
*color7:                          #d8d8d8
*color15:                         #f8f8f8

Xcursor.theme: xcursor-breeze
Xcursor.size:                     0

!urxvt.font: 					  xft:NotoSansCJKKR:size=12
urxvt.font: 					  xft:D2Coding:size=15, xft:HackNerdFontMono:size=18
!urxvt.font: 					  xft:D2Coding:size=15, xft:FiraCodeNerdFont:size=16
URxvt*boldFont:                   xft:D2Coding:size=16

!URxvt*perl-lib:                   ~/.urxvtv/ext/keyboard-select
urxvt.perl-ext-common: resize-font, keyboard-select

URxvt.perl-ext: default,url-select
URxvt.keysym.M-u: perl:url-select:select_next
URxvt.url-select.launcher: /usr/bin/xdg-open
URxvt.url-select.underline: true

! keyboard-select
! URxvt.keysym.M-Escape: perl:keyboard-select:activate
! URxvt.keysym.M-s: perl:keyboard-select:search

! resize font size
!URxvt.keysym.C-j:     resize-font:smaller
!URxvt.keysym.C-k:      resize-font:bigger
! alternative font settings with 'terminus':
! URxvt.font:      -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
!! terminus names see end of file!

URxvt.depth:                      32
URxvt.background:                 [90]#000000
URxvt*scrollBar:                  false
URxvt*mouseWheelScrollPage:       false
URxvt*cursorBlink:                true
URxvt*background:                 black
URxvt*foreground:                 lightblue 
URxvt*saveLines:                  5000
URxvt*fading:                     50
URxvt*colorUL:                    yellow

! for 'fake' transparency (without Compton) uncomment the following three lines
! URxvt*inheritPixmap:            true
! URxvt*transparent:              true
! URxvt*shading:                  138

! Normal copy-paste keybindings without perls
URxvt.iso14755:                   false
URxvt.keysym.Shift-Control-V:     eval:paste_clipboard
URxvt.keysym.Shift-Control-C:     eval:selection_to_clipboard
!Xterm escape codes, word by word movement
URxvt.keysym.Control-Left:        \033[1;5D
! URxvt.keysym.Control-h:        \033[1;5D
! URxvt.keysym.Shift-Control-Left:  \033[1;6D
URxvt.keysym.Control-Right:       \033[1;5C
! URxvt.keysym.Control-l:       \033[1;5C
! URxvt.keysym.Shift-Control-Right: \033[1;6C
! URxvt.keysym.Control-Up:          \033[1;5A
! URxvt.keysym.Shift-Control-Up:    \033[1;6A
! URxvt.keysym.Control-Down:        \033[1;5B
! URxvt.keysym.Shift-Control-Down:  \033[1;6B
! Rxvt.perl-ext-common:             ...,clipboard
! URxvt.keysym.M-C-c:               perl:clipboard:copy
! URxvt.keysym.M-v:                 perl:clipboard:paste
! URxvt.keysym.M-C-v:               perl:clipboard:paste_escaped
URxvt*termName:                   rxvt-unicode-256color
URxvt*geometry:                   80x-1
! URxvt*chdir:                      string
! URxvt*loginShell:                 boolean
! URxvt*multiClickTime:             number
! URxvt*jumpScroll:                 boolean
! URxvt*skipScroll:                 boolean
! URxvt*pastableTabs:               boolean
! URxvt*scrollstyle:                plain
! URxvt*scrollBar_right:            boolean
! URxvt*scrollBar_floating:         true
! URxvt*scrollBar_align:            mode
! URxvt*thickness:                  number
! URxvt*scrollTtyOutput:            boolean
! URxvt*scrollTtyKeypress:          boolean
! URxvt*scrollWithBuffer:           boolean
! URxvt*tintColor:                  !7DA55
! URxvt*blurRadius:                 HxV
! URxvt*fading:                     number
! URxvt*fadeColor:                  color
! URxvt*utmpInhibit:                boolean
! URxvt*urgentOnBell:               boolean
! URxvt*visualBell:                 boolean
! URxvt*mapAlert:                   boolean
! URxvt*meta8:                      boolean
! URxvt*tripleclickwords:           boolean
! URxvt*insecure:                   boolean
! URxvt*cursorUnderline:            boolean
! URxvt*pointerBlank:               boolean
! URxvt*color0:                     color
! URxvt*color1:                     color
! URxvt*color2:                     color
! URxvt*color3:                     color
! URxvt*color4:                     color
! URxvt*color5:                     color
! URxvt*color6:                     color
! URxvt*color7:                     color
! URxvt*color8:                     color
! URxvt*color9:                     color
! URxvt*color10:                    color
! URxvt*color11:                    color
! URxvt*color12:                    color
! URxvt*color13:                    color
! URxvt*color14:                    color
! URxvt*color15:                    color
! URxvt*colorBD:                    color
! URxvt*colorIT:                    color
! URxvt*colorUL:                    color
! URxvt*colorRV:                    color
! URxvt*underlineColor:             color
! URxvt*scrollColor:                color
! URxvt*troughColor:                color
! URxvt*highlightColor:             color
! URxvt*highlightTextColor:         color
! URxvt*cursorColor:                color
! URxvt*cursorColor2:               color
! URxvt*pointerColor:               color
! URxvt*pointerColor2:              color
! URxvt*borderColor:                color
! URxvt*iconFile:                   file
! URxvt*font:                       fontname
! URxvt*boldFont:                   fontname
! URxvt*italicFont:                 fontname
! URxvt*boldItalicFont:             fontname
! URxvt*intensityStyles:            boolean
URxvt*inputMethod:                ibus
URxvt*preeditType:                OnTheSpot
URxvt*utf8:             		      true
URxvt*locale:             		    true
URxvt*imLocale:                   en_US.UTF-8
! URxvt*imFont:                     fontname
! URxvt*title:                      string
! URxvt*iconName:                   string
! URxvt*buffered:                   boolean
! URxvt*depth:                      number
! URxvt*visual:                     number
! URxvt*transient-for:              windowid
! URxvt*override-redirect:          boolean
! URxvt*hold:                       boolean
! URxvt*externalBorder:             number
! URxvt*internalBorder:             number
! URxvt*borderLess:                 true
! URxvt*lineSpace:                  number
! URxvt*letterSpace:                number
URxvt*skipBuiltinGlyphs:          true
! URxvt*pointerBlankDelay:          number
! URxvt*backspacekey:               string
! URxvt*deletekey:                  string
! URxvt*print-pipe:                 string
! URxvt*modifier:                   modifier
! URxvt*cutchars:                   string
! URxvt*answerbackString:           string
! URxvt*secondaryScreen:            boolean
! URxvt*secondaryScroll:            boolean
! URxvt*perl-eval:                  perl-eval
! URxvt*perl-ext-common:            string
! URxvt*perl-ext:                   string
! URxvt*iso14755:                   boolean
! URxvt*iso14755_52:                boolean
! URxvt*xrm:                        string
! URxvt*keysym.sym:                 keysym
! URxvt*background.border:          boolean
! URxvt*background.expr:            string
! URxvt*background.interval:        seconds
! URxvt*bell-command:               string
! URxvt*kuake.hotkey:               string
! URxvt*matcher.button:             string
! URxvt*matcher.launcher:           string
! URxvt*matcher.launcher.*:         string
! URxvt*matcher.pattern.*:          string
! URxvt*matcher.rend.*:             string
! URxvt*remote-clipboard.fetch:     string
! URxvt*remote-clipboard.store:     string
! URxvt*searchable-scrollback:      string
! URxvt*selection-autotransform.*:  string
! URxvt*selection-pastebin.cmd:     string
! URxvt*selection-pastebin.url:     string
! URxvt*selection.pattern-0:        string
! URxvt*tab-bg:                     colour
! URxvt*tab-fg:                     colour
! URxvt*tabbar-bg:                  colour
! URxvt*tabbar-fg:                  colour
! URxvt*url-launcher:               string

! The Terminus font uses the following X-names:
! -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
! -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1
! -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1
@greyHairChooseLife greyHairChooseLife added the bug Something isn't working label May 8, 2023
@greyHairChooseLife greyHairChooseLife changed the title [BUG] runtime error with the rxvt while the xterm works fine. [BUG] runtime error with the rxvt, while the xterm works fine. May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant