oshi: OSHI-5.0.1: NPE in getDisks()
Hi,
following setup on my system:
$ cat /proc/partitions
major minor #blocks name
259 0 488386584 nvme0n1
259 1 307200 nvme0n1p1
259 2 488074784 nvme0n1p2
254 0 488072736 dm-0
dm-0 is basically luks encryption on top of nvme0n1p2. For some reason it wants to add the partition nvme0n1p1 to the partition list of dm-0 which is null because dm-0 has no partitions. I think you can reproduce it if you add e.g. an USB stick which has no partitions on it …
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (21 by maintainers)
By the way, another issue prompted me to look into the group query code which gets all groups. There’s an api call to get only the primary group which is a 1000x faster call. I’ll be backporting that to 4.7.x which should improve things a lot from the 1.5h run time issues.
Did some quick test and no NPE anymore … I will double-check with debugger if the values are sane on my system …
FYI: it only shows up when I run updateAttributes() … so with a store set … if store == NULL then it detects all disks …