Skip to content

Crash on start while closing pending sessions #10321

Closed
@naltatis

Description

Der aktuelle Master möchte nicht mehr mit meiner Test-Datenbank reden.

Hier die Datenbank zum Reproduzieren evcc.db.zip

[db    ] INFO 2023/10/14 18:46:53 using sqlite database: /Users/michael/.evcc/evcc.db
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x105bd9aac]

goroutine 1 [running]:
github.com/evcc-io/evcc/core/session.(*DB).ClosePendingSessionsInHistory(0x140004de6e0, 0x0)
	/Users/michael/lab/evcc/core/session/db.go:77 +0x1ac
github.com/evcc-io/evcc/core.NewSiteFromConfig(0x14000f73050, 0x106dcdd28?, {0x140019c5630, 0x2, 0x2}, {{0x5e}, {0x106dcdd28, 0x140019b9680}, {0x106dcdd28, 0x140019b96b0}, ...})
	/Users/michael/lab/evcc/core/site.go:146 +0x65c
github.com/evcc-io/evcc/cmd.configureSite(0x14000c73538?, {0x140019c5630?, 0x14000c73550?, 0x5?}, {{0x5e}, {0x106dcdd28, 0x140019b9680}, {0x106dcdd28, 0x140019b96b0}, {0x106dcdd00, ...}, ...})
	/Users/michael/lab/evcc/cmd/setup.go:640 +0x88
github.com/evcc-io/evcc/cmd.configureSiteAndLoadpoints({{0x0, 0x0}, {{0x105e16dc3, 0x4}, {0x105e2d0f6, 0xa}, 0x1b9e}, {0x14000c726db, 0x5}, {0x0, ...}, ...})
	/Users/michael/lab/evcc/cmd/setup.go:636 +0x1bc
github.com/evcc-io/evcc/cmd.runRoot(0x14000c98700?, {0x105e23b65?, 0x7?, 0x105e16dd3?})
	/Users/michael/lab/evcc/cmd/root.go:191 +0x870
github.com/spf13/cobra.(*Command).execute(0x108b53f00, {0x1400004e730, 0x2, 0x2})
	/Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x640
github.com/spf13/cobra.(*Command).ExecuteC(0x108b53f00)
	/Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/evcc-io/evcc/cmd.Execute()
	/Users/michael/lab/evcc/cmd/root.go:110 +0x24
main.main()
	/Users/michael/lab/evcc/main.go:45 +0x38
exit status 2

Originally posted by @naltatis in #10246 (comment)

//cc @GrimmiMeloni @andig

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions