fossfreedom / alternative-toolbar

Modern, minimal and music-focused interface for Rhythmbox
GNU General Public License v3.0
156 stars 20 forks source link

Doing execl restart in preferences causes data loss #155

Closed crvigh closed 3 years ago

crvigh commented 4 years ago

Rhythmbox performs delayed commits of in-memory-data to disk. All data is finally synced to disk on the handler to "window::delete-event" signal. Restarting rhythmbox via execl will overwrite the existing process image which has new uncommitted data, causing irreversible data loss.

Eg.

  1. Open rhythmbox with alt-toolbar plugin enabled.
  2. Go to podcasts source and check the feed count ( say, "All 4 feeds" ).
  3. Now subscribe to a new podcast feed.
  4. Now the feed count should be "All 5 feeds". The new feed data is still uncommitted to disk.
  5. Now go to alt-toolbar preferences and press "Restart".
  6. Go to podcasts source and now check the feed count.
  7. Feed count will now show "All 4 feeds" as the new feed is lost by execl overwrite.

The alternative is to display an info dialog to the user to restart the application.