Crashes on certain IRCd servers #2

Закрито
2023-04-27 13:31:26 +00:00 відкрито jewbird · 3 коментарів
jewbird прокоментував(ла) 2023-04-27 13:31:26 +00:00
First-time contributor

Hi there,

This package seems to crash on certain ircd servers, such as efnet and birdnest chat. Others are fine though.

I think it has something to do with the names state updating.

If the bot joins a channel with no one in it, it will work okay. If it joins a channel with existing users it will crash with this message.

Using version github.com/yunginnanet/girc-atomic v0.7.1

panic: nil string

goroutine 205001 [running]:
git.tcp.direct/kayos/common/pool.String.MustWriteString(...)
	/home/debian/go/pkg/mod/git.tcp.direct/kayos/common@v0.8.2/pool/strings.go:94
github.com/yunginnanet/girc-atomic.(*state).createUser(0xc0000b4640, 0xc0003b1e90)
	/home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/state.go:464 +0xe6b
github.com/yunginnanet/girc-atomic.handleNAMES(0xc000098f00, {0xc0003b1ce0, 0x0, {0xc10aba3cf1463f5d, 0x257bcd6bc, 0x9cd580}, {0xc0007d04cd, 0x3}, {0xc00005cfc0, 0x4, ...}, ...})
	/home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/builtin.go:607 +0x2ac
github.com/yunginnanet/girc-atomic.HandlerFunc.Execute(0x7f7bfb7299c0?, 0x12000008?, {0xc0003b1ce0, 0x0, {0xc10aba3cf1463f5d, 0x257bcd6bc, 0x9cd580}, {0xc0007d04cd, 0x3}, {0xc00005cfc0, ...}, ...})
	/home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:75 +0x5b
github.com/yunginnanet/girc-atomic.(*Caller).exec.func1(0xc0003d4490?)
	/home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:274 +0x1b5
created by github.com/yunginnanet/girc-atomic.(*Caller).exec
	/home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:251 +0x553
Hi there, This package seems to crash on certain ircd servers, such as efnet and birdnest chat. Others are fine though. I think it has something to do with the names state updating. If the bot joins a channel with no one in it, it will work okay. If it joins a channel with existing users it will crash with this message. Using version github.com/yunginnanet/girc-atomic v0.7.1 ``` panic: nil string goroutine 205001 [running]: git.tcp.direct/kayos/common/pool.String.MustWriteString(...) /home/debian/go/pkg/mod/git.tcp.direct/kayos/common@v0.8.2/pool/strings.go:94 github.com/yunginnanet/girc-atomic.(*state).createUser(0xc0000b4640, 0xc0003b1e90) /home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/state.go:464 +0xe6b github.com/yunginnanet/girc-atomic.handleNAMES(0xc000098f00, {0xc0003b1ce0, 0x0, {0xc10aba3cf1463f5d, 0x257bcd6bc, 0x9cd580}, {0xc0007d04cd, 0x3}, {0xc00005cfc0, 0x4, ...}, ...}) /home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/builtin.go:607 +0x2ac github.com/yunginnanet/girc-atomic.HandlerFunc.Execute(0x7f7bfb7299c0?, 0x12000008?, {0xc0003b1ce0, 0x0, {0xc10aba3cf1463f5d, 0x257bcd6bc, 0x9cd580}, {0xc0007d04cd, 0x3}, {0xc00005cfc0, ...}, ...}) /home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:75 +0x5b github.com/yunginnanet/girc-atomic.(*Caller).exec.func1(0xc0003d4490?) /home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:274 +0x1b5 created by github.com/yunginnanet/girc-atomic.(*Caller).exec /home/debian/go/pkg/mod/github.com/yunginnanet/girc-atomic@v0.7.1/handler.go:251 +0x553 ```
kayos прокоментував(ла) 2023-04-27 17:10:56 +00:00
Власник

makes sense, i re-use string buffers for performance purposes, but yeah it'll DIAF if you try to write an empty string, i'll implement a fix shortly

makes sense, i re-use string buffers for performance purposes, but yeah it'll DIAF if you try to write an empty string, i'll implement a fix shortly
kayos згадано цю задачу в коміті 2023-04-27 17:12:19 +00:00
kayos закрив цю задачу 2023-04-27 17:12:19 +00:00
kayos прокоментував(ла) 2023-04-27 17:12:38 +00:00
Власник

should be good to go

should be good to go
jewbird прокоментував(ла) 2023-04-28 04:10:30 +00:00
Author
First-time contributor

Thanks @kayos that got it working good

Thanks @kayos that got it working good
Підпишіться щоб приєднатися до обговорення.
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: kayos/girc-atomic#2
No description provided.