fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
10.28k stars 399 forks source link

fastfetch 2.3.4 (x86_64) default settings cause segmentation fault without X session #660

Closed gan-ainm closed 10 months ago

gan-ainm commented 10 months ago

General description of bug:

# Often helpful information:

* Default preset file (btw.jsonc)

{ "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "logo": { "type": "builtin", "source": "arch" }, "modules": [ "title", "separator", { "type": "os", "format": "Arch Linux ({12})" }, "host", "kernel", "uptime", { "type": "packages", "format": "{} (pacman)" }, "shell", "display", "de", "wm", "wmtheme", "theme", "icons", "font", "cursor", "terminal", "terminalfont", "cpu", "gpu", "memory", "disk", "battery", "poweradapter", "locale", "break", "colors" ] }


Output of `env NO_CONFIG=1 fastfetch --load-config all --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false`:
Terminal:

24071 Segmentation fault (core dumped)

i3wm:

gan@case 0ms

1ms OS: Arch Linux x86_64 0ms Host: 244743G (ThinkPad W530) 0ms Bios (Legacy): G5ETA6WW (2.66 ) (2.66) 0ms Board: 244743G (Not Defined) 0ms Chassis: Notebook (Not Available) 0ms Kernel: 6.6.6-arch1-1 0ms Uptime: 5 hours, 46 mins 0ms Processes: 276 1ms Packages: 2304 (pacman) 1ms Shell: zsh 5.9 27ms Display (PHL 273V5): 1920x1080 @ 60Hz * Display (LEN40B2): 1920x1080 @ 60Hz 5ms Brightness (nvidia_0): 100% 0ms Monitor: No physical display detected 0ms LM: login (TTY) 0ms DE: No DE found 0ms WM: i3 (X11) 0ms WM Theme: Unknown WM: i3 0ms Theme: Adwaita-dark [GTK2/3] 0ms Icons: Adwaita [GTK2/3] 0ms Font: Cantarell (11pt) [GTK2/3] 0ms Cursor: Adwaita 0ms Wallpaper: Failed to detect the current wallpaper path 0ms Terminal: rxvt-unicode 9.31 0ms Terminal Font: Unknown terminal: urxvt 0ms Terminal Size: Failed to detect terminal size 201ms CPU: Intel(R) Core(TM) i7-3820QM (8) @ 3.70 GHz 0ms CPU Usage: 4% 0ms GPU: NVIDIA Quadro K2000M 15ms Memory: 3.84 GiB / 31.00 GiB (12%) 0ms Swap: 0 B / 8.00 GiB (0%) 0ms Disk (/): 31.33 GiB / 39.71 GiB (79%) - ext4 Disk (/home): 329.26 GiB / 817.98 GiB (40%) - ext4 Disk (/run/media/gan/Insre_Sproch): 485.87 MiB / 485.87 MiB (100%) - udf [External, Read-only] Disk (/tmp): 72.00 KiB / 15.50 GiB (0%) - tmpfs 0ms Battery: batteryDir doesn't contain any battery folder 0ms Power Adapter: Not supported on this platform 0ms Media Player: Mozilla Firefox 7ms Media: spudlyo - Features of a Modern Terminal Emulator 0ms Public IP: redacted 136ms Local IP (enp0s25): 192.168.178.85/24 * 1ms Wifi: Unavailable 24ms Date & Time: 2023-12-16 14:09:06 0ms Locale: en_US.UTF-8 0ms Vulkan: 1.2.175 - NVIDIA [470.223.02] 30ms OpenGL: 4.6.0 NVIDIA 470.223.02 47ms OpenCL: 3.0 CUDA 11ms Users: gan - login time 2023-12-16T08:23:08+0100 0ms Bluetooth: Failed to call GetManagedObjects 36ms Sound: GK107 HDMI Audio Controller Digital Stereo (HDMI) (100%) 3ms Gamepad: No devices detected 0ms Weather: +10°C - Overcast (Cologne, Germany) 34ms Network IO (enp0s25): 1.69 KiB/s (IN) - 1.09 KiB/s (OUT) 420ms Disk IO (CT1000MX500SSD1 2308E6B1AD5A): 0 B/s (R) - 0 B/s (W) Disk IO (MATSHITADVD): 0 B/s (R) - 0 B/s (W) Disk IO (name): 0 B/s (R) - 0 B/s (W) Disk IO (name): 0 B/s (R) - 0 B/s (W) Disk IO (name): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) Disk IO (uuid): 0 B/s (R) - 0 B/s (W) 1ms Version: fastfetch 2.3.4 (x86_64) 0ms

0ms 0ms

Output of `fastfetch --list-features`:

threads
libpci vulkan wayland xcb-randr xcb xrandr x11 drm gio dconf dbus imagemagick7 chafa zlib xfconf egl glx osmesa opencl libpulse libnm libddcutil Directx Headers


## If fastfatch crashed

Paste the stacktrace here. You may get it with:

(gdb) bt

0 drmConnectLibdrm.constprop.0 (result=) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/detection/displayserver/linux/drm.c:224

1 0x0000562a6d8c006b in ffdsConnectDrm (result=0x562a6d9c3660 ) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/detection/displayserver/linux/drm.c:285

2 ffConnectDisplayServerImpl (ds=0x562a6d9c3660 ) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/detection/displayserver/linux/displayserver_linux.c:39

3 ffConnectDisplayServer () at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/detection/displayserver/displayserver.c:39

4 0x0000562a6d8f5d29 in ffConnectDisplayServer () at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/detection/displayserver/displayserver.c:39

5 ffPrintDisplay (options=0x562a6d9c1e88 <instance+2536>) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/modules/display/display.c:11

6 0x0000562a6d8b3af9 in ffPrintCommandOption (jsonDoc=, data=0x7fffccdeb6d0) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/common/commandoption.c:137

7 run (data=0x7fffccdeb6d0) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/fastfetch.c:799

8 main (argc=, argv=) at /usr/src/debug/fastfetch/fastfetch-2.3.4/src/fastfetch.c:853

CarterLi commented 10 months ago

Please try the latest dev build

gan-ainm commented 10 months ago

Freshly built from the dev branch, it also works in a terminal session:

$ git show-ref HEAD
8fa073b1e45b3846f24c026653fb99f9399dc9d4 refs/remotes/origin/HEAD
$ fastfetch --version
fastfetch 2.3.4-21 (x86_64)
CarterLi commented 10 months ago

Thanks for testing. The reault of DiskIO doesnt seem correct also. Can you paste the result of ls -l /dev/disk/by-id and ls -l /sys/block?

gan-ainm commented 10 months ago
$ ls -l /dev/disk/by-id 
total 0
lrwxrwxrwx 1 root root  9 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A -> ../../sda
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 ata-CT1000MX500SSD1_2308E6B1AD5A-part6 -> ../../sda6
lrwxrwxrwx 1 root root  9 2023-12-16 08:23 ata-MATSHITADVD-RAM_UJ8B0_YM39_201793 -> ../../sr0
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-crypthome -> ../../dm-8
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-cryptoroot -> ../../dm-5
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-cryptswap -> ../../dm-7
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-crypttmp -> ../../dm-6
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-vg00-boot -> ../../dm-0
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-vg00-home -> ../../dm-4
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-vg00-lvroot -> ../../dm-1
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-vg00-swap -> ../../dm-2
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-name-vg00-tmp -> ../../dm-3
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-CRYPT-LUKS1-5b72696168f34c3684fea131f46662d6-crypthome -> ../../dm-8
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-CRYPT-LUKS1-9be4a281181840498422068b93446764-cryptoroot -> ../../dm-5
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-CRYPT-PLAIN-cryptswap -> ../../dm-7
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-CRYPT-PLAIN-crypttmp -> ../../dm-6
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-LVM-3A8x3ONGxZARPG4S90UN4ChtQWaytifS06EkNuD2cpJhti39MBc0nqk5xSUl5U2Z -> ../../dm-0
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-LVM-3A8x3ONGxZARPG4S90UN4ChtQWaytifSBzpwYmEAMDU1Ft3AYx92k1Stm3enfivj -> ../../dm-1
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-LVM-3A8x3ONGxZARPG4S90UN4ChtQWaytifSwxzNRxmBEzue4S8ariJdjBamh1DwWqtH -> ../../dm-2
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-LVM-3A8x3ONGxZARPG4S90UN4ChtQWaytifSxEAl8HWeNSJBhb88vur5ogFj1MqJ3RPo -> ../../dm-4
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 dm-uuid-LVM-3A8x3ONGxZARPG4S90UN4ChtQWaytifSZyv04Amw1ar64cZjw8fxcZ4CRYVqcV0n -> ../../dm-3
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 lvm-pv-uuid-EDazZ2-o1k2-hs0m-rhoM-Y7Et-TWkb-R1CTIu -> ../../sda4
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 lvm-pv-uuid-L4nMxi-1v86-9sL0-1Ksm-3BIv-wrnI-pJXjN9 -> ../../sda6
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 lvm-pv-uuid-LdOlYf-YNN8-uFeo-AWga-fhb7-hfWd-6pXXas -> ../../sda2
lrwxrwxrwx 1 root root  9 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a -> ../../sda
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 2023-12-16 08:22 wwn-0x500a0751e6b1ad5a-part6 -> ../../sda6
$ ls -l /sys/block
total 0
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx 1 root root 0 2023-12-16 09:12 dm-3 -> ../devices/virtual/block/dm-3
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-4 -> ../devices/virtual/block/dm-4
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-5 -> ../devices/virtual/block/dm-5
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-6 -> ../devices/virtual/block/dm-6
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-7 -> ../devices/virtual/block/dm-7
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 dm-8 -> ../devices/virtual/block/dm-8
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 sda -> ../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 2023-12-16 08:22 sr0 -> ../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sr0
CarterLi commented 10 months ago

Can you try the latest dev build with env NO_CONFIG=1 fastfetch -c all --format json?