We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to use GetClips with a specified start time and end time, I get a segfault:
startTime := time.Now().Add(time.Duration(-1) * time.Hour) endTime := time.Now() resp, err := twitchClient.GetClips(&helix.ClipsParams { BroadcasterID: accountID, First: 5, StartedAt: helix.Time{ Time: startTime }, EndedAt: helix.Time{ Time: endTime }, })
The same code works if I remove StartedAt and EndedAt.
StartedAt
EndedAt
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x67753f] goroutine 1 [running]: github.com/nicklaw5/helix.(*Client).getBaseURL(0x94f500, 0x7061c4, 0x6, 0x6bf460, 0xc000169d90) /home/fish/go/pkg/mod/github.com/nicklaw5/helix@v0.5.9/helix.go:307 +0xff github.com/nicklaw5/helix.(*Client).newRequest(0x94f500, 0x705c51, 0x3, 0x7061c4, 0x6, 0x695bc0, 0xc000102e70, 0x40e100, 0x20, 0x6bf460, ...) /home/fish/go/pkg/mod/github.com/nicklaw5/helix@v0.5.9/helix.go:253 +0x46 github.com/nicklaw5/helix.(*Client).sendRequest(0x94f500, 0x705c51, 0x3, 0x7061c4, 0x6, 0x695a80, 0xc0001103a0, 0x695bc0, 0xc000102e70, 0x40e100, ...) /home/fish/go/pkg/mod/github.com/nicklaw5/helix@v0.5.9/helix.go:158 +0xca github.com/nicklaw5/helix.(*Client).get(...) /home/fish/go/pkg/mod/github.com/nicklaw5/helix@v0.5.9/helix.go:133 github.com/nicklaw5/helix.(*Client).GetUsers(0x94f500, 0xc000102e70, 0x2a, 0xc000169ed8, 0x40e198) /home/fish/go/pkg/mod/github.com/nicklaw5/helix@v0.5.9/users.go:42 +0xa0 main.get_user_id_from_username(0x706a7a, 0x8, 0x7083f0, 0xe) /home/fish/twitch-discord-bot/main.go:17 +0xa9 main.main() /home/fish/twitch-discord-bot/main.go:38 +0x145 exit status 2
The text was updated successfully, but these errors were encountered:
I goofed; I'm segfaulting no matter the request so I assume I did something wrong setupwise
Sorry, something went wrong.
Whoops, looks like this is my bad. I'd set up a global twitchClient *helix.Client and using it in bad ways
twitchClient *helix.Client
No branches or pull requests
When I try to use GetClips with a specified start time and end time, I get a segfault:
The same code works if I remove
StartedAt
andEndedAt
.Here's the error:
The text was updated successfully, but these errors were encountered: