voltra icon indicating copy to clipboard operation
voltra copied to clipboard

Error on live mode: panic: runtime error: invalid memory address or nil pointer dereference

Open asonaph opened this issue 1 year ago • 3 comments

Describe the bug The error occurs when test mode is disabled, manifesting after a successful token purchase.

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5a3b34d]

goroutine 7 [running]:
github.com/sleeyax/voltra/internal/bot.(*Bot).sell(0xc000078690, {0x5c2a0e0, 0xc0001df7c0}, 0xc0000ac360?)
	/github/workspace/internal/bot/bot.go:191 +0x2ed
created by github.com/sleeyax/voltra/internal/bot.(*Bot).Start in goroutine 1
	/github/workspace/internal/bot/bot.go:58 +0x157

Steps to reproduce Disabling test mode; it runs normally while in test mode.

enable_test_mode: false

Steps:

  • I executed ./voltra in a terminal/command prompt

Screenshots image System information

  • OS: macos
  • Bot version: latest

asonaph avatar Mar 30 '24 10:03 asonaph

Thank you for reporting this issue. If you can find your way compiling the go source code in this repository I would appreciate an error log of a debug build so I can better pinpoint the exact location of the nil pointer. If not, that's fine though. This needs to be investigated.

sleeyax avatar Mar 30 '24 11:03 sleeyax

image I am new to Go, so I am trying to run a debug on this code. The problem may occur when boughtCoin.TakeProfit is nil. I am trying to understand and fix it. I will update you soon.

asonaph avatar Mar 31 '24 03:03 asonaph

Thank you for trying to contribute to the project, I appreciate that a lot! I'm here if you need any help or have other questions.

sleeyax avatar Mar 31 '24 13:03 sleeyax