Skip to content

feeling_lucky() (dice button) crashes the player by writing data_source.Default = null #272

Description

@SoplosLinux

Environment

  • Hidamari v3.7 (Flatpak, Flathub)
  • Non-GNOME X11 session (XFCE-based)
  • System info reported by Hidamari on startup: is_gnome = False, is_wayland = False, is_flatpak = True

Steps to reproduce

  1. Start Hidamari with a video already configured (config.json has both data_source.Default and data_source.<monitor> pointing to a valid file).
  2. Click the dice icon ("I'm feeling lucky") in the main window, or call the D-Bus method directly:
gdbus call --session --dest io.github.jeffshee.Hidamari.server --object-path /io/github/jeffshee/Hidamari/server --method io.github.jeffshee.hidamari.server.feeling_lucky
  1. The player process crashes and the video wallpaper stops.

What happens

When a new random video is picked, the config is saved with the new path under the monitor-specific key (e.g. eDP-1), but Default gets reset to null:

Before:

"data_source": {
   "Default": "/home/soplos/Vídeos/Hidamari/c9fa0212b8_sunset-serenity-pavilion-asian-lake-live-wallpaper-wallsflow-com.mp4",
   "eDP-1": "/home/soplos/Vídeos/Hidamari/c9fa0212b8_sunset-serenity-pavilion-asian-lake-live-wallpaper-wallsflow-com.mp4"
}

After clicking the dice:

"data_source": {
   "Default": null,
   "eDP-1": "/home/soplos/Vídeos/Hidamari/815bc7130a_forgotten-train-station.mp4"
}

The hidamari-player-1 subprocess then calls reload_config(), which calls _checkDefaultSource() (utils.py:410), which does os.path.isfile(default_source) where default_source is None, raising:

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Full traceback

Process hidamari-player-1:
Traceback (most recent call last):
  File "/usr/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
    self.run()
  File "/usr/lib/python3.13/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/app/share/hidamari/hidamari/player/video_player.py", line 748, in main
    app = VideoPlayer()
  File "/app/share/hidamari/hidamari/player/video_player.py", line 335, in __init__
    self.reload_config()
  File "/app/share/hidamari/hidamari/player/video_player.py", line 724, in reload_config
    self.config = ConfigUtil().load()
  File "/app/share/hidamari/hidamari/utils.py", line 437, in load
    self._checkDefaultSource(config)
  File "/app/share/hidamari/hidamari/utils.py", line 410, in _checkDefaultSource
    if mode == MODE_VIDEO and not os.path.isfile(default_source):
  File "<frozen genericpath>", line 39, in isfile
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Additional notes

  • After this crash, the app's own --reset flag does not help, since _load_config() (which reads the broken config) runs before the reset logic can apply.
  • The corrupted config also breaks every subsequent launch, including via autostart, since _checkDefaultSource() is called on every startup while mode is MODE_VIDEO.
  • Manually fixing data_source.Default to match the current per-monitor value in config.json restores normal startup, until the dice button is used again.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions