Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App just terminates after a few seconds with no error #1244

Closed
1player opened this issue Nov 9, 2021 · 6 comments
Closed

App just terminates after a few seconds with no error #1244

1player opened this issue Nov 9, 2021 · 6 comments

Comments

@1player
Copy link
Contributor

1player commented Nov 9, 2021

EasyEffects Version

6.1.4

What package are you using?

Flatpak (Flathub)

Distribution

Fedora Kinoite (Silverblue KDE)

Describe the bug

I have a simple setup with an output equalizer. Everything works perfectly for about 30 seconds, then the application just closes. No error in output, even when using the G_MESSAGES_DEBUG=easyeffects variable.

Expected Behavior

Application to keep running

Debug Log

No response

Additional Information

No response

@vchernin
Copy link
Contributor

vchernin commented Nov 10, 2021

It sounds like you have run into #1242 as have a few others...

flatpak permission-reset com.github.wwmm.easyeffects, restart, then enable the autostart permission again. Ensure to allow EasyEffects to run in the background if prompted.

@vchernin
Copy link
Contributor

vchernin commented Nov 10, 2021

I think I have reproducer steps for this now. I belive this is an xdg-desktop-portal inconsistency which is really confusing. For now the above workaround fixes the issue.

  1. Install EasyEffects Flatpak (fresh install, if not use the reset command first otherwise this won't work).
  2. Open it and then close it to let it run in background
  3. You will get this pop-up (or similar on KDE), within a couple minutes usually.
    image Don't click anything yet, let it stay there.
  4. Then open EasyEffects again.
  5. Enable autostart in EasyEffects. You will be asked to "Allow EasyEffects to run in background" It is right in the center of your screen, and looks different from the prompt above at least on GNOME. The above one I can move around and forget about, while this one I have to respond to.
  6. Force quit it using the dialog from earlier.
  7. Start it again and confirm of the autostart file is in ~/.config/autostart. Now do some rebooting and see if you can confirm the bug.
  8. EasyEffects should be autostarted but then randomly sigkilled by xdg-desktop-portal, within 1 or 2 minutes usually.

Another method:

  1. Have created an autostart file for EasyEffects manually beforehand.
  2. Install a fresh install of EasyEffects Flatpak.
  3. Notice within a minute or two you will be asked to force quit or allow EasyEffects to run in the background. Which makes from a Flatpak perspective, but little from a user's perspective. They probably want the app to run in the bacgrkound since they put the file there.

Funnily enough I noticed if you do this:

  1. Install EasyEffects Flatpak (fresh install, if not use the reset command first otherwise this won't work).
  2. Start the app and then close it with the close button, by default it will not shutdown and continue to run in the background.
  3. You will get this pop-up (or similar on KDE), within a couple minutes usually.
    image
  4. Click "Force quit".
  5. Start EasyEffects again and enable autostart.

The autostart switch no longer edits ~/.config/autostart in step 5 because you've revoked the permission. But it silently fails...

I also noticed some weird issues perhaps with a recent wireplumber update, where EasyEffects isn't able to process Firefox audio and outputs nothing for some reason. But that will need to be debugged later...

Note to self, flatpak/xdg-desktop-portal#570 was encountered while debugging this.

@1player
Copy link
Contributor Author

1player commented Nov 10, 2021

Yes, @vchernin's workaround fixed it for me. Feel free to close the issue if it's a duplicate.

@wwmm wwmm closed this as completed Nov 10, 2021
@1player
Copy link
Contributor Author

1player commented Nov 10, 2021

Would be good to document this behaviour prominently in the README, since I'm not the only one affected, and Flatpak is a recommended installation method for this piece of software.

@vchernin
Copy link
Contributor

vchernin commented Nov 10, 2021

Would be good to document this behaviour prominently in the README, since I'm not the only one affected, and Flatpak is a recommended installation method for this piece of software.

I agree. However, I think it's worth noting there is little we can do from EasyEffects's perspective. From my testing this is really a weird edge case where the background portal and xdg-desktop-portal are working against each other. To my knowledge EasyEffects is doing everything correctly.

I will report it upstream as it's best solved there, if it's not going to be fixed quickly I'll mention it in the README.

@vchernin
Copy link
Contributor

vchernin commented Nov 10, 2021

Thinking more about this perhaps the issue is EasyEffects needs to request background access and autostart for everything to work as expected. I think this might really be something EasyEffects should do after all.

tl;dr EasyEffects is requesting autostart access which works. The issue is that autostart says nothing about whether it can run in the background, at start time or otherwise. We've gotten permission to autostart but not to actually run in the background. I believe all the steps I've listed are all consequences of this. EasyEffects should also ask for background access.

This raises a few questions:

  1. Can we ask for both background and autostart access in one propmt?
  2. EasyEffects by default assumes when the window is closed, it should run in the background. But by default it does this without asking permission first. So should this default be changed, that is by default it will shutdown on window close? If a user wants it to run in the background, they need to disable shutdown on window close and for Flatpak agree to let EasyEffects run in the background.
  3. What happens if shutdown on window close is enabled, but autostart is? Does this mean it will autostart with the window open, therefore avoiding needing to ask to run in the background (since it isn't).
  4. Should shutdown on window close be renamed (again). I am less sure about this, since I think this name makes sense from a user's perspective and I don't have any alternatives.

I will investigate more, this is more of a rabbit hole than I thought.

Also if you're thinking this is a regression of Flatpak having the autostart portal acesss now, I think that is not quite correct. This problem was always there, EasyEffects didn't use the background portal. It's just that users having a working autostart button in Flatpak means more people will run into this.

As long as EasyEffects doesn't itself ask for background access, the system itself will intervene and give these prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants