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

运行node命令报错退出:invalid memory address or nil pointer dereference #40

Open
kamehouse2023 opened this issue Dec 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kamehouse2023
Copy link

版本、系统及CPU架构

Txray版本:v3.0.8
系统版本:Manjaro 24.2.0
CPU架构:x86-64

描述问题

一直使用Manjaro, 之前Txray一直正常,但是半个月前重装系统后,Txray就出现了问题:如果之前已经导入节点,运行Txray, 其他命令可以使用,但是运行node命令,就会报错并退出:

panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x778a98]

goroutine 1 [running]:
Txray/cmd.InitNodeShell.func1(0xc00032e340)
E:/code/go/Txray/cmd/node.go:51 +0x498
github.com/abiosoft/ishell.(*Shell).handleCommand(0xc000256000, {0xc000309f20, 0x1, 0x1})
E:/gopath/pkg/mod/github.com/abiosoft/ishell@v2.0.0+incompatible/ishell.go:250 +0xec
github.com/abiosoft/ishell.handleInput(0xc000256000, {0xc000309f20, 0x1, 0x1})
E:/gopath/pkg/mod/github.com/abiosoft/ishell@v2.0.0+incompatible/ishell.go:204 +0x31
github.com/abiosoft/ishell.(*Shell).run(0xc000256000)
E:/gopath/pkg/mod/github.com/abiosoft/ishell@v2.0.0+incompatible/ishell.go:183 +0x2ef
github.com/abiosoft/ishell.(*Shell).Run(0xc0000124d8?)
E:/gopath/pkg/mod/github.com/abiosoft/ishell@v2.0.0+incompatible/ishell.go:99 +0x28
main.main()
E:/code/go/Txray/Txray.go:50 +0x252

复现问题的步骤

  1. 运行Txray, 运行node rm all清空节点,运行sub update-node导入节点,这时程序运行正常,node命令也可以正常显示节点列表
  2. 退出Txray后再次运行,这时其他命令都可以使用(sub, setting, run等),但是只要运行node命令,就会报错退出

Txray设置以及相关截图

屏幕截图_20241205_225658
屏幕截图_20241205_225945

@kamehouse2023 kamehouse2023 added the bug Something isn't working label Dec 5, 2024
@kamehouse2023
Copy link
Author

manjaro更新了两次,Txray又工作正常了

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

1 participant