Images aren't properly loading

Hey y’all. I’m not exactly sure what’s going on here, but I was using the pokedex example to base my code off of, and the image of the pokemon in it wasn’t loading - it was just a black box. I figured it was some issue with the API it used, so I went ahead with my program, and sure enough, I’m having the same problem. The images in my program are obviously loaded into the program, the size seems to be correct, and testing with a differently sized image displays it with the proper size, but it just isn’t displaying the actual image contents.

My source code is at SadlyNotSappho/ggg: a shitty gui rust app to read a webcomic i like - this is a rewrite of my github repo of this over at - ggg - Forgejo: Beyond coding. We forge., and here’s a screenshot of the problem:

If anyone knows how to fix this, help would be greatly appreciated.

So I just ran it on my laptop to see what would happen, and the images display fine. The only differences between my laptop and desktop are that on my laptop, I’m using KDE with BSPWM as the window manager, and on my desktop, I use pure BSPWM. I really don’t know why it doesn’t work on my desktop, but it doesn’t, so that’s fun.

We are aware of this issue and we have always assumed it’s a graphics driver problem.

Your desktop may not fully support Vulkan. Make sure to update its graphics driver.

Now, it is possible for this to be a bug in the atlas allocator logic; but we haven’t been able to find anything wrong there yet.

Alright. I ran a pretty big update on my desktop a bit after making the post, and havent been able to check if it works yet.

Same problem here

In iced repo:

cargo r --package pokedex

My system info

inxi --full --admin --filter --width

  Kernel: 6.5.5-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.5-x86_64
    root=UUID=d2a55327-f83c-40b1-8b9a-bc1b1919926a rw quiet
    root=/dev/mapper/luks-4eee9d9f-29e3-4002-95e1-a9b95a5beeff splash
  Desktop: KDE Plasma v: 5.27.8 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: ASUSTeK product: ROG Strix G614JU_G614JU v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: G614JU v: 1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: G614JU.318 date: 07/28/2023
  ID-1: BAT0 charge: 87.3 Wh (100.0%) condition: 87.3/90.0 Wh (97.0%)
    volts: 17.6 min: 16.0 model: AS3GYFG3KC R220358 type: Unknown
    serial: <filter> status: full
  Info: model: 13th Gen Intel Core i9-13980HX bits: 64 type: MST AMCP
    arch: Raptor Lake gen: core 13 level: v3 note: check built: 2022+
    process: Intel 7 (10nm) family: 6 model-id: 0xB7 (183) stepping: 1
    microcode: 0x119
  Topology: cpus: 1x cores: 24 mt: 8 tpc: 2 st: 16 threads: 32 smt: enabled
    cache: L1: 2.1 MiB desc: d-16x32 KiB, 8x48 KiB; i-8x32 KiB, 16x64 KiB
    L2: 32 MiB desc: 8x2 MiB, 4x4 MiB L3: 36 MiB desc: 1x36 MiB
  Speed (MHz): avg: 848 high: 1561 min/max: 800/5400:5600:4000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 935 2: 800 3: 800 4: 800
    5: 865 6: 863 7: 800 8: 800 9: 966 10: 1561 11: 990 12: 800 13: 800 14: 800
    15: 964 16: 800 17: 800 18: 800 19: 800 20: 800 21: 800 22: 800 23: 800
    24: 800 25: 800 26: 800 27: 800 28: 800 29: 800 30: 800 31: 800 32: 800
    bogomips: 154880
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS, IBPB: conditional,
    RSB filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: Intel Raptor Lake-S UHD Graphics vendor: ASUSTeK driver: i915
    v: kernel arch: Gen-13 process: Intel 7 (10nm) built: 2022+ ports:
    active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 0000:00:02.0
    chip-ID: 8086:a788 class-ID: 0300
  Device-2: NVIDIA AD107M [GeForce RTX 4050 Max-Q / Mobile] vendor: ASUSTeK
    driver: nvidia v: 535.113.01 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-09) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022-23+ bus-ID: 0000:01:00.0
    chip-ID: 10de:28e1 class-ID: 0300
  Device-3: Sonix USB2.0 HD UVC WebCam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-8:3 chip-ID: 322e:2122
    class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.2.1
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,nouveau,nv,vesa dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1680x1050 s-dpi: 96 s-size: 444x277mm (17.48x10.91")
    s-diag: 523mm (20.6")
  Monitor-1: eDP-1 model: TL160ADMP03-0 built: 2022 res: 1680x1050 hz: 60
    dpi: 124 gamma: 1.2 size: 345x215mm (13.58x8.46") diag: 407mm (16")
    ratio: 16:10 modes: 2560x1600
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 1 drv: iris device: 3 drv: swrast surfaceless:
    drv: nvidia x11: drv: iris inactive: gbm,wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 23.1.8-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (RPL-S)
    device-ID: 8086:a788 memory: 22.55 GiB unified: yes
  API: Vulkan v: 1.3.264 layers: 12 device: 0 type: integrated-gpu
    name: Intel Graphics (RPL-S) driver: mesa intel v: 23.1.8-manjaro1.1
    device-ID: 8086:a788 surfaces: xcb,xlib device: 1 type: discrete-gpu
    name: NVIDIA GeForce RTX 4050 Laptop GPU driver: nvidia v: 535.113.01
    device-ID: 10de:28e1 surfaces: xcb,xlib
  Device-1: Intel vendor: ASUSTeK driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:7a50
    class-ID: 0403
  Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 0000:01:00.1 chip-ID: 10de:22be class-ID: 0403
  API: ALSA v: k6.5.5-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.80 status: off with: pipewire-media-session
    status: active tools: pw-cat,pw-cli
  Server-3: PulseAudio v: 16.1 status: active with: 1: pulseaudio-alsa
    type: plugin 2: pulseaudio-jack type: module tools: pacat,pactl
  Device-1: Intel driver: iwlwifi v: kernel port: N/A bus-ID: 0000:00:14.3
    chip-ID: 8086:7a70 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel port: 4000 bus-ID: 0000:6c:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp108s0 state: down mac: <filter>
  Device-1: Intel driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-14:4 chip-ID: 8087:0033 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  Hardware-1: Intel Volume Management Device NVMe RAID Controller Intel
    driver: vmd v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:a77f rev:
    class-ID: 0104
  Local Storage: total: 953.87 GiB used: 192.25 GiB (20.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2400 MTFDKBA1T0QFM
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: V3MA003 temp: 41.9 C
    scheme: GPT
  ID-1: / raw-size: 936.8 GiB size: 921.02 GiB (98.32%)
    used: 192.21 GiB (20.9%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-4eee9d9f-29e3-4002-95e1-a9b95a5beeff
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 37.6 MiB (12.5%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 16.77 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-560ef57a-391b-4666-a575-d79d2bd0f88f
  System Temperatures: cpu: 37.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 2500
  Processes: 515 Uptime: 52m wakeups: 3 Memory: total: 24 GiB note: est.
  available: 23.1 GiB used: 3.98 GiB (17.2%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: 1487 pm: pacman pkgs: 1454 libs: 391 tools: pamac pm: flatpak
  pkgs: 33 Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole
  inxi: 3.3.30

The example works fine with WGPU_BACKEND=vulkan cargo r --package pokedex

what backend was it using by default?

How can i know that ?

On Linux it’s very likely gl. But to be sure you can include and enable tracing-subscriberin the application and then set RUST_LOG to info and check if either Vulkan or OpenGL is used.