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

Nil pointer dereference when starting PMS in certain terminals #66

Open
tremby opened this issue Aug 7, 2017 · 8 comments
Open

Nil pointer dereference when starting PMS in certain terminals #66

tremby opened this issue Aug 7, 2017 · 8 comments
Labels

Comments

@tremby
Copy link
Collaborator

tremby commented Aug 7, 2017

PMS runs fine for me in urxvt, but in st (both 0.4.1, which is packaged in my distro's repo, and the latest master) I get the following error:

Practical Music Search undefined
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x825d02]

goroutine 1 [running]:
github.com/ambientsound/pms/widgets.(*UI).Start(0x0)
        /home/tremby/src/gocode/src/github.com/ambientsound/pms/widgets/ui.go:107 +0x22
github.com/ambientsound/pms/pms.(*PMS).setupUI(0xc42015ba00)
        /home/tremby/src/gocode/src/github.com/ambientsound/pms/pms/setup.go:74 +0xb3
github.com/ambientsound/pms/pms.New(0x952563)
        /home/tremby/src/gocode/src/github.com/ambientsound/pms/pms/setup.go:42 +0x92c
main.main()
        /home/tremby/src/gocode/src/github.com/ambientsound/pms/main.go:66 +0x2f1
@carnager
Copy link

also happens on termite (which is vte3 based) but then again works fine with gnome-terminal

@kimtore kimtore changed the title Nil pointer dereference when trying to start PMS in st (suckless terminal) Nil pointer dereference when starting PMS in certain terminals Aug 29, 2017
@kimtore
Copy link
Owner

kimtore commented Sep 20, 2017

I'm considering switching to the termbox-go library instead of tcell. I tested termbox-go on st and it works. tcell uses a compile-time terminfo library, maybe that's why it works.

The tcell Application based event loop is going to be removed at one point in favor of PMS' own event loop setup. The widgets and styles from tcell are nice, however. Unsure about the amount of work that would be required to replicate today's functionality.

@danarnold
Copy link

I get this on macOS with iTerm2 3.2.9. I have no issues in the native Terminal.app, alacritty, and Therm.

@mpldr
Copy link

mpldr commented Dec 7, 2019

Can confirm this bug for kitty

@kimtore
Copy link
Owner

kimtore commented Dec 10, 2019

Newest build tested with iTerm2 3.3.6 and AlacriTTY 0.4.0, with no problems. Please give it another shot and see if this fixes anything for you?

@mpldr
Copy link

mpldr commented Dec 11, 2019

columns="artist,track,title,album,year,time"panic: runtime error: invalid memory address or nil pointer dereference
                                            [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8adf4f]

                                           goroutine 41 [running]:
                                                                  github.com/ambientsound/pms/index.(*Index).IndexFull(0x0, 0xfe8f78, 0x0, 0x0, 0xc000392150, 0xb82480, 0x437b46)
                                   	/home/moritz/Projects/Go/pms/index/index.go:175 +0xdf
                      github.com/ambientsound/pms/songlist.(*Library).ReIndex.func1(0xc00016c360)
                          	/home/moritz/Projects/Go/pms/songlist/library.go:109 +0x7f
                   created by github.com/ambientsound/pms/songlist.(*Library).ReIndex
              	/home/moritz/Projects/Go/pms/songlist/library.go:107 +0x92

is all I get when running with Alacritty 0.4.0-1

@kimtore
Copy link
Owner

kimtore commented Dec 11, 2019

@poldi1405, the backtrace shows that you hit another bug which I think is probably unrelated to which terminal you're running.

Can you try to delete PMS' index file, then run it again? (should be in your XDG cache directory which is usually ~/.cache/pms).

@mpldr
Copy link

mpldr commented Dec 11, 2019

Thought so too, that's why I opened #122

The index file does not exist yet.

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

Successfully merging a pull request may close this issue.

5 participants