jurkovic-nikola / OpenLinkHub

Open source interface for iCUE LINK Hub and other Corsair AIOs, Hubs for Linux
GNU General Public License v3.0
54 stars 4 forks source link

Docker container does not start #13

Closed MTrinkiesJr closed 1 month ago

MTrinkiesJr commented 1 month ago

Describe the bug I built the docker container from the current source code and tried to start it with the default mounted config.json. But it gives me this error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x84a2a7]

goroutine 12 [running]:
OpenLinkHub/src/devices/cpro.(*Device).getDevices(0xc0002de0a0)
        /app/OpenLinkHub/src/devices/cpro/cpro.go:872 +0x1007
OpenLinkHub/src/devices/cpro.Init(0x1b1c, 0xc10, {0xc000206040, 0x10})
        /app/OpenLinkHub/src/devices/cpro/cpro.go:198 +0x6d9
OpenLinkHub/src/devices.Init.func8(0x0?, 0x0?, {0xc000206040?, 0x0?})
        /app/OpenLinkHub/src/devices/devices.go:828 +0x1c
created by OpenLinkHub/src/devices.Init in goroutine 1
        /app/OpenLinkHub/src/devices/devices.go:827 +0x588

Steps to reproduce the behavior:

  1. Your configuration values config.json:
{
  "listenPort": 27003,
  "listenAddress": "127.0.0.1",
  "cpuSensorChip": "coretemp",
  "manual": false,
  "frontend": true,
  "metrics": true
}

Container start command:

sudo docker run -dt --network host --privileged --name openlinkhub -v /home/{myname}/docker/mounts/openlinkhub/config.json:/opt/OpenLinkHub/config.json openlinkhub
  1. Number of devices 1

Expected behavior The docker container starts

Desktop

jurkovic-nikola commented 1 month ago

This was caused by empty profile and missing null check if profile exists on temperature probe detection. Try to pull latest code, should be okay. Tested on Commander Pro and it started without crash.

MTrinkiesJr commented 1 month ago

It's working, thank you very much