Skip to content

"invalid memory address or nil pointer dereference" on launch #28

Description

@leifdenby

First, thank you for building this!

It nearly works for me in that scom starts up, I briefly see some jobs in the "Job queue", but then scom crashes with:

denbylei@uan01:~/Downloads> ./scom 
Welcome to Slurm Commander!

2023/07/24 13:12:58 Trying conf file: /etc/scom/scom.conf
2023/07/24 13:12:58 Conf: FAILED reading /etc/scom/scom.conf
2023/07/24 13:12:58 Trying conf file: /users/denbylei/scom/scom.conf
2023/07/24 13:12:58 Conf: FAILED reading /users/denbylei/scom/scom.conf
2023/07/24 13:12:58 Trying conf file: /users/denbylei/.config/scom/scom.conf
2023/07/24 13:12:58 INFO: Configuration: &config.ConfigContainer{Prefix:"/usr/bin", Binpaths:map[string]string{"sacct":"/usr/bin/sacct", "sacctmgr":"/usr/bin/sacctmgr", "sbatch":"/usr/bin/sbatch", "scancel":"/usr/bin/scancel", "scontrol":"/usr/bin/scontrol", "sinfo":"/usr/bin/sinfo", "squeue":"/usr/bin/squeue", "sstat":"/usr/bin/sstat"}, Tick:0x3, JobHist:config.ConfigJobHistContainer{Starttime:"now-7days", Endtime:"", Timeout:0x1e}, TemplateDirs:[]string{"/etc/scom/templates"}}

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:385 +0x95
panic({0x5b76e0, 0x76da00})
	/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/panic.go:838 +0x207
github.com/CLIP-HPC/SlurmCommander/internal/model/tabs/jobhisttab.(*JobHistTab).GetStatsFiltered(0xc00042a680, 0xc004324db8?)
	/home/runner/work/SlurmCommander/SlurmCommander/internal/model/tabs/jobhisttab/jobhisttab.go:136 +0xa02
github.com/CLIP-HPC/SlurmCommander/internal/model.Model.Update({{0x0, 0x2, 0x0, {0x0, 0x0}, {0x0, 0x0}, 0xee, 0x3a, 0xc0002e2230, ...}, ...}, ...)
	/home/runner/work/SlurmCommander/SlurmCommander/internal/model/update.go:547 +0x1bfe
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc0003d00b0, {0x65a0f8?, 0xc000426000?}, 0x0?)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:324 +0x602
github.com/charmbracelet/bubbletea.(*Program).Run(0xc0003d00b0)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.23.0/tea.go:448 +0x8e7
main.main()
	/home/runner/work/SlurmCommander/SlurmCommander/cmd/scom/scom.go:146 +0x171e
Goodbye!

Version info:

denbylei@uan01:~/Downloads> ./scom -v
Welcome to Slurm Commander!

2023/07/24 13:13:17 Trying conf file: /etc/scom/scom.conf
2023/07/24 13:13:17 Conf: FAILED reading /etc/scom/scom.conf
2023/07/24 13:13:17 Trying conf file: /users/denbylei/scom/scom.conf
2023/07/24 13:13:17 Conf: FAILED reading /users/denbylei/scom/scom.conf
2023/07/24 13:13:17 Trying conf file: /users/denbylei/.config/scom/scom.conf
----------------------------------------
Version: v1.0.5
Build commit hash: 8bf029f6be143194742b0469d635399c5805c06a
----------------------------------------

Any idea why? Happy to provide more info to help debug this :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions