hyprwm / hyprpaper

Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.
https://wiki.hyprland.org/Hypr-Ecosystem/hyprpaper/
BSD 3-Clause "New" or "Revised" License
761 stars 55 forks source link

Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count' failed. #178

Closed drnfc closed 2 months ago

drnfc commented 2 months ago

I use a script to automatically change my wallpaper every 30 seconds and after a bit I get the following error:

hyprpaper: ../src/cairo-surface.c:938: cairo_surface_reference: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)' failed.

Here is more of the log. Unfortunately I didn't pipe it into a file or anything so this is all I got:

[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload all
[LOG] Unloading target /home/zack/Pictures/wallpapers/DoomWallpaper.jpg, preload path /run/user/1000/.hyprpaper_Q51Cnp
[LOG] Unloading target /home/zack/Pictures/wallpapers/DoomWallpaper.jpg, preload path /run/user/1000/.hyprpaper_VtAAdv
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/zack/Pictures/wallpapers/babylon5.jpg
[LOG] Preloaded target /home/zack/Pictures/wallpapers/babylon5.jpg in 4.97ms -> Pixel si
ze: [1920, 1080]
[LOG] Buffer created for target /home/zack/Pictures/wallpapers/babylon5.jpg, Shared Memory usage: 6.4MB
[LOG] Total SM usage for all buffers: 6.4MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] configure for eDP-2
[LOG] configure for eDP-2
[LOG] handlePreferredScale: 1.60 for 7f9d841963f0
[LOG] Buffer created for target /home/zack/Pictures/wallpapers/babylon5.jpg, Shared Memory usage: 16.4MB
[LOG] Total SM usage for all buffers: 22.8MB
[LOG] Pool buffer missing for available target??
[LOG] Pool buffer failed #2. Ignoring WP.
[LOG] handlePreferredScale: 1.60 for 7f9d841963f0
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: wallpaper eDP-2,/home/zack/Pictures/wallpapers/babylon5.jpg
[LOG] Buffer created for target /home/zack/Pictures/wallpapers/babylon5.jpg, Shared Memory usage: 25.6MB
[LOG] Total SM usage for all buffers: 48.4MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload all
[LOG] Unloading target /home/zack/Pictures/wallpapers/babylon5.jpg, preload path /run/user/1000/.hyprpaper_qjfp8b
[LOG] Unloading target /home/zack/Pictures/wallpapers/babylon5.jpg, preload path /run/user/1000/.hyprpaper_qHgKUp
[LOG] Unloading target /home/zack/Pictures/wallpapers/babylon5.jpg, preload path /run/user/1000/.hyprpaper_YHSi48
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/zack/Pictures/wallpapers/babylon5.jpg
[LOG] Preloaded target /home/zack/Pictures/wallpapers/babylon5.jpg in 5.85ms -> Pixel size: [1920, 1080]
[LOG] Buffer created for target /home/zack/Pictures/wallpapers/babylon5.jpg, Shared Memory usage: 6.4MB
[LOG] Total SM usage for all buffers: 6.4MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] configure for eDP-2
[LOG] configure for eDP-2
[LOG] handlePreferredScale: 1.60 for 7f9d84003120
[LOG] Buffer created for target /home/zack/Pictures/wallpapers/babylon5.jpg, Shared Memory usage: 16.4MB
[LOG] Total SM usage for all buffers: 22.8MB
[LOG] Image data for eDP-2: /home/zack/Pictures/wallpapers/babylon5.jpg at [-96.00, 0.00], scale: 1.48 (original image size: [1920, 1080])
hyprpaper: ../src/cairo-surface.c:938: cairo_surface_reference: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)' failed.
vaxerski commented 2 months ago

can you share the script? Also are you on latest git?

drnfc commented 2 months ago

heres the script, I should probably improve it one of these days:

    INTERVAL=30
    wp=$(find ~/Pictures/wallpapers/ -type f | shuf --random-source=/dev/urandom -n 1)
    hyprctl hyprpaper preload "$wp"

    while true; do
        hyprctl hyprpaper wallpaper ",$wp"

        wp=$(find ~/Pictures/wallpapers/ -type f | shuf --random-source=/dev/urandom -n 1)
        hyprctl hyprpaper unload all
        hyprctl hyprpaper preload "$wp"

        sleep $INTERVAL
    done

As far as the version, I believe so. I am using the hyprland flake, I'll update just to make sure.

drnfc commented 2 months ago

The issue has inexplicably gone away, possibly due to and update, so I'll close.