gospt crashing easily #2

Closed
opened 2023-01-16 12:37:25 +00:00 by Ghost · 12 comments

Hi,
Continuing the reddit discussion here instead.
I've asked a couple of fellow devs to test the package, which I've imported to our WIP-repository, http://mail-index.netbsd.org/pkgsrc-wip-changes/2023/01/16/msg026094.html

Quoting the response,

I've quickly tried it, configured it, sometimes seems okay-ish (I've
only tried with the mobile Android Spotify opened and checked that the
played song is output corrected) but seems still
pretty crashy.

$ gospt
 panic: runtime error: invalid memory address or nil pointer dereference [recovered]
         panic: close of nil channel
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7e14c7]

 goroutine 1 [running]:
 github.com/charmbracelet/bubbletea.(*standardRenderer).kill.func1()
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/standard_renderer.go:107 +0x25
 sync.(*Once).doSlow(0x9d7ac0?, 0xc000014018?)
         /usr/pkg/go119/src/sync/once.go:74 +0xc2
 sync.(*Once).Do(...)
         /usr/pkg/go119/src/sync/once.go:65
 github.com/charmbracelet/bubbletea.(*standardRenderer).kill(0xc00032e0b0?)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/standard_renderer.go:106 +0x12b
 github.com/charmbracelet/bubbletea.(*Program).shutdown(0xc00032e000, 0xe8?)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:529 +0x33
 github.com/charmbracelet/bubbletea.(*Program).Run.func1()
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:381 +0x49
 panic({0x88cbc0, 0xc8ef60})
         /usr/pkg/go119/src/runtime/panic.go:890 +0x262
 github.com/charmbracelet/bubbletea.(*Program).Run(0xc00032e000)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:412 +0x507
 github.com/charmbracelet/bubbletea.(*Program).Start(...)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:488
 gospt/src/tui.StartTea(0x0?, 0x0?, {0x8fc7ec?, 0x0?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/tui.go:19 +0xd1
 gospt/src/cmd.glob..func22(0xc9adc0?, {0x8fc7a4?, 0x0?, 0x0?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/tui.go:24 +0x10f
 github.com/spf13/cobra.(*Command).execute(0xc9adc0, {0xcd32e8, 0x0, 0x0})
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
 github.com/spf13/cobra.(*Command).ExecuteC(0xc996c0)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
 github.com/spf13/cobra.(*Command).Execute(...)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
 gospt/src/cmd.Execute({0x8fc473?, 0x3?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/root.go:41 +0x116
 main.main()
         /tmp/pkgsrc/wip/gospt/work/gospt/main.go:9 +0x25

and some other times,

$ gospt
 Service unavailable
 panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x82a92b]

 goroutine 1 [running]:
 gospt/src/tui.MainView(0xc00007f6b0, 0xc00007f890)
         /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/views.go:293 +0x64b
 gospt/src/tui.InitMain(0xc00007f6b0, 0xc00007f890, {0x8fc7ec, 0x4})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/main.go:552 +0x13c
 gospt/src/tui.StartTea(0x0?, 0x0?, {0x8fc7ec?, 0x0?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/tui.go:14 +0x25
 gospt/src/cmd.glob..func22(0xc9adc0?, {0x8fc7a4?, 0x0?, 0x0?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/tui.go:24 +0x10f
 github.com/spf13/cobra.(*Command).execute(0xc9adc0, {0xcd32e8, 0x0, 0x0})
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
 github.com/spf13/cobra.(*Command).ExecuteC(0xc996c0)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
 github.com/spf13/cobra.(*Command).Execute(...)
         /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
 gospt/src/cmd.Execute({0x8fc473?, 0x3?})
         /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/root.go:41 +0x116
 main.main()
         /tmp/pkgsrc/wip/gospt/work/gospt/main.go:9 +0x25

Do you believe these are only related to a missing background client running?

Thanks!

Hi, Continuing the reddit discussion here instead. I've asked a couple of fellow devs to test the package, which I've imported to our WIP-repository, http://mail-index.netbsd.org/pkgsrc-wip-changes/2023/01/16/msg026094.html Quoting the response, > I've quickly tried it, configured it, sometimes seems okay-ish (I've only tried with the mobile Android Spotify opened and checked that the played song is output corrected) but seems still pretty crashy. ``` $ gospt panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: close of nil channel [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x7e14c7] goroutine 1 [running]: github.com/charmbracelet/bubbletea.(*standardRenderer).kill.func1() /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/standard_renderer.go:107 +0x25 sync.(*Once).doSlow(0x9d7ac0?, 0xc000014018?) /usr/pkg/go119/src/sync/once.go:74 +0xc2 sync.(*Once).Do(...) /usr/pkg/go119/src/sync/once.go:65 github.com/charmbracelet/bubbletea.(*standardRenderer).kill(0xc00032e0b0?) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/standard_renderer.go:106 +0x12b github.com/charmbracelet/bubbletea.(*Program).shutdown(0xc00032e000, 0xe8?) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:529 +0x33 github.com/charmbracelet/bubbletea.(*Program).Run.func1() /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:381 +0x49 panic({0x88cbc0, 0xc8ef60}) /usr/pkg/go119/src/runtime/panic.go:890 +0x262 github.com/charmbracelet/bubbletea.(*Program).Run(0xc00032e000) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:412 +0x507 github.com/charmbracelet/bubbletea.(*Program).Start(...) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.1/tea.go:488 gospt/src/tui.StartTea(0x0?, 0x0?, {0x8fc7ec?, 0x0?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/tui.go:19 +0xd1 gospt/src/cmd.glob..func22(0xc9adc0?, {0x8fc7a4?, 0x0?, 0x0?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/tui.go:24 +0x10f github.com/spf13/cobra.(*Command).execute(0xc9adc0, {0xcd32e8, 0x0, 0x0}) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862 github.com/spf13/cobra.(*Command).ExecuteC(0xc996c0) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd github.com/spf13/cobra.(*Command).Execute(...) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968 gospt/src/cmd.Execute({0x8fc473?, 0x3?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/root.go:41 +0x116 main.main() /tmp/pkgsrc/wip/gospt/work/gospt/main.go:9 +0x25 ``` and some other times, ``` $ gospt Service unavailable panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x82a92b] goroutine 1 [running]: gospt/src/tui.MainView(0xc00007f6b0, 0xc00007f890) /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/views.go:293 +0x64b gospt/src/tui.InitMain(0xc00007f6b0, 0xc00007f890, {0x8fc7ec, 0x4}) /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/main.go:552 +0x13c gospt/src/tui.StartTea(0x0?, 0x0?, {0x8fc7ec?, 0x0?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/tui/tui.go:14 +0x25 gospt/src/cmd.glob..func22(0xc9adc0?, {0x8fc7a4?, 0x0?, 0x0?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/tui.go:24 +0x10f github.com/spf13/cobra.(*Command).execute(0xc9adc0, {0xcd32e8, 0x0, 0x0}) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862 github.com/spf13/cobra.(*Command).ExecuteC(0xc996c0) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd github.com/spf13/cobra.(*Command).Execute(...) /tmp/pkgsrc/wip/gospt/work/.gopath/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968 gospt/src/cmd.Execute({0x8fc473?, 0x3?}) /tmp/pkgsrc/wip/gospt/work/gospt/src/cmd/root.go:41 +0x116 main.main() /tmp/pkgsrc/wip/gospt/work/gospt/main.go:9 +0x25 ``` Do you believe these are only related to a missing background client running? Thanks!
Owner

the second one looks like its happening when opening the tui if you have no artists saved in your account which i can add checks for to make it not do that. as for the first one when is that happening? it might be related but i am not sure what events led to the crash

the second one looks like its happening when opening the tui if you have no artists saved in your account which i can add checks for to make it not do that. as for the first one when is that happening? it might be related but i am not sure what events led to the crash
Owner

i just pushed a fix for the second issue ea69ad6310 it may also fix the first issue but i am not sure

i just pushed a fix for the second issue ea69ad6310e4126a5318bf3d4d6049dcf5fdc4fb it may also fix the first issue but i am not sure
Author

I couldn't tell but, I can ask if you want.

Would you agree with the comment I've added to the package?

# gospt is not really a Spotify client but, more of a controller.
# You will need a client like 'librespot' or 'spotifyd' running in
# the backgroud and to set that as device in gospt.

Or, would you prefer to express it in another way?

I couldn't tell but, I can ask if you want. Would you agree with the comment I've added to the package? ``` # gospt is not really a Spotify client but, more of a controller. # You will need a client like 'librespot' or 'spotifyd' running in # the backgroud and to set that as device in gospt. ``` Or, would you prefer to express it in another way?
Author

i just pushed a fix for the second issue ea69ad6310 it may also fix the first issue but i am not sure

Cheers! I'll keep updating the package.

> i just pushed a fix for the second issue ea69ad6310e4126a5318bf3d4d6049dcf5fdc4fb it may also fix the first issue but i am not sure Cheers! I'll keep updating the package.
Owner

I couldn't tell but, I can ask if you want.

Would you agree with the comment I've added to the package?

# gospt is not really a Spotify client but, more of a controller.
# You will need a client like 'librespot' or 'spotifyd' running in
# the backgroud and to set that as device in gospt.

Or, would you prefer to express it in another way?

this is accurate

> I couldn't tell but, I can ask if you want. > > Would you agree with the comment I've added to the package? > > ``` > # gospt is not really a Spotify client but, more of a controller. > # You will need a client like 'librespot' or 'spotifyd' running in > # the backgroud and to set that as device in gospt. > ``` > > Or, would you prefer to express it in another way? this is accurate
Owner

didnt mean 2 close this

didnt mean 2 close this
abs3nt reopened this issue 2023-01-17 05:16:18 +00:00
Author

You may close it now if you would like.
Things are working fine. Will test for a few hours and merge it if I don't hit any issues.

You may close it now if you would like. Things are working fine. Will test for a few hours and merge it if I don't hit any issues.
Author

@abs3nt Package merged into the main branch now. See commit, http://mail-index.netbsd.org/pkgsrc-changes/2023/01/18/msg267288.html

To install it on NetBSD you will simply need to run:

pkgin install gospt

Or, if you prefer to build it from source:

cd /usr/pkgsrc/audio/gospt
make install

Regards,
pin

@abs3nt Package merged into the main branch now. See commit, http://mail-index.netbsd.org/pkgsrc-changes/2023/01/18/msg267288.html To install it on NetBSD you will simply need to run: ``` pkgin install gospt ``` Or, if you prefer to build it from source: ``` cd /usr/pkgsrc/audio/gospt make install ``` Regards, pin
Author

FYI, up-to-date http://mail-index.netbsd.org/pkgsrc-changes/2023/01/21/msg267547.html

Have you thought about a ChangeLog?

FYI, up-to-date http://mail-index.netbsd.org/pkgsrc-changes/2023/01/21/msg267547.html Have you thought about a ChangeLog?
Owner

nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet.

nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet.
Author

nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet.

it's a manual entry. usually, I just copy the ChangeLog or, release notes and paste this into the commit message.

> nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet. it's a manual entry. usually, I just copy the ChangeLog or, release notes and paste this into the commit message.
Owner

nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet.

it's a manual entry. usually, I just copy the ChangeLog or, release notes and paste this into the commit message.

got it. I can just make release notes for more important changes / updates in the future.

> > nice thank you. does netbsd pull from something like CHANGELOG.md or is it a manual entry. I might add one in the next release im not sure yet. > > it's a manual entry. usually, I just copy the ChangeLog or, release notes and paste this into the commit message. got it. I can just make release notes for more important changes / updates in the future.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: abs3nt/gospt#2
No description provided.