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

从源码自行编译的版本在tg中点击按钮报错 #56

Open
BA7JCM opened this issue Feb 22, 2022 · 0 comments
Open

从源码自行编译的版本在tg中点击按钮报错 #56

BA7JCM opened this issue Feb 22, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@BA7JCM
Copy link

BA7JCM commented Feb 22, 2022

运行起来之后在tg中点击“正在下载”按钮,无反应
image

回到终端中查看发现以下报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 49 [running]:
main.GetDiskPercent(0x4040d90b2164c3c0)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc001306000, 0xfa, 0x13c, 0x0, 0x0, 0xfa, 0x13c)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.activeRefresh.func1(0x0, 0x6018aa59, 0xc00035b4a0, 0xc000076fa0, 0xc0000b69a0)
        /root/DownloadBot/Telegram.go:673 +0x94
main.activeRefresh(0x4, 0xc00035b4a0, 0xc000076fa0, 0x3e4b)
        /root/DownloadBot/Telegram.go:728 +0x14d
created by main.tgBot
        /root/DownloadBot/Telegram.go:899 +0x32ca

image

点击“正在等待”按钮和“已完成”按钮也没反应
image
点击“正在等待”按钮时的报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 30 [running]:
main.GetDiskPercent(0x4059000000000000)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc0000c3000, 0xa, 0xd, 0x0, 0x0, 0x0, 0xc0000c3000)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.tgBot(0xc00002a300, 0x2e, 0xc0000294a0)
        /root/DownloadBot/Telegram.go:901 +0x312a
created by main.main
        /root/DownloadBot/main.go:34 +0x9f

点击“已完成”按钮时的报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 30 [running]:
main.GetDiskPercent(0x4059000000000000)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc0000c3000, 0xa, 0xd, 0x0, 0x0, 0x0, 0xc0000c3000)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.tgBot(0xc00002a300, 0x2e, 0xc000029490)
        /root/DownloadBot/Telegram.go:908 +0x2ffd
created by main.main
        /root/DownloadBot/main.go:34 +0x9f

image

使用release中的版本点击“正在下载”也会报错:

2022/02/23 09:25:02 context deadline exceeded
panic: context deadline exceeded

goroutine 48 [running]:
log.Panic(0xc00012cdd8, 0x1, 0x1)
        D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
        D:/program_data/go/DownloadBot/main.go:14
main.formatTellSomething(0x0, 0x0, 0x0, 0xbc6a40, 0x102fee0, 0x0, 0x0)
        D:/program_data/go/DownloadBot/Aria2.go:77 +0x8b
main.activeRefresh.func1(0x0, 0x6018aa59, 0xc00048a640, 0xc000066460, 0x0)
        D:/program_data/go/DownloadBot/Telegram.go:541 +0x94
main.activeRefresh(0x18, 0xc00048a640, 0xc000066460, 0xd857)
        D:/program_data/go/DownloadBot/Telegram.go:596 +0x159
created by main.tgBot
        D:/program_data/go/DownloadBot/Telegram.go:767 +0x3207

image

但是点击“等待中”和“已停止”按钮都不会报错,不知道什么原因,源码我是自己git clone源码之后编译的版本,系统是centos7.9,另外能否增加忽略证书错误的功能,我aria2为了适应启用了https的ariang,开启了https,然后在机器人的配置文件中使用“wss://127.0.0.1:6800/jsonrpc"连接会报错”cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
image

@BA7JCM BA7JCM changed the title 在tg中点击“正在下载”按钮报错 从源码自行编译的版本在tg中点击按钮报错 Feb 23, 2022
@gaowanliang gaowanliang added the bug Something isn't working label Dec 14, 2022
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

2 participants