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
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
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
但是点击“等待中”和“已停止”按钮都不会报错,不知道什么原因,源码我是自己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](https://user-images.githubusercontent.com/79561519/155080446-37be251c-ab9e-4528-a6df-852de79f9c52.png)