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

RetroArch hangs when closing content #134

Open
5 of 11 tasks
DarkSide1305 opened this issue Dec 28, 2023 · 35 comments
Open
5 of 11 tasks

RetroArch hangs when closing content #134

DarkSide1305 opened this issue Dec 28, 2023 · 35 comments
Labels
bug Something isn't working cannot reproduce This issue cannot be reliably reproduced. microphone

Comments

@DarkSide1305
Copy link

What version of melonDS DS are you using?

0.7.27

Does the problem happen in standalone melonDS?

I don't know.

What happened?

RetroArch generally has some instability I never before experienced, only mith MelonDS DS. When changing the Screen Layout option, while only pressing left and right it constantly jumped up and down to random items in the same menu. I have also noticed "close content" is INCREDIBLY unreliable, maybe even "restart RetroArch". It gets RetroArch stuck almost every singled time I tried, maybe like 1/10 tries was able to close the content properly.

What should've happened instead?

RetroArch should close content and close itself without issues, Pointer shouldnt randomly jump around when going left and right

Which platforms do you see the problem on?

  • Windows
  • macOS
  • Linux
  • Android
  • iOS
  • tvOS
  • Other (specify below)

Which versions of the OS?

SteamOS 3.5 (or the newest version currently available)

Which libretro frontend are you using?

RetroArch 1.16.0 (newest Flatpak)

Terms

  • I agree to follow the code of conduct.
  • I understand that melonDS DS is not developed or maintained by the authors of melonDS.
  • I understand that this form is for reporting bugs, not for requesting help.
  • I understand that the author develops this core in his spare time, and that he is under no obligation to respond to this bug report.
@DarkSide1305 DarkSide1305 added the bug Something isn't working label Dec 28, 2023
@JesseTG
Copy link
Owner

JesseTG commented Dec 28, 2023

I'll address these one at a time:

When changing the Screen Layout option, while only pressing left and right it constantly jumped up and down to random items in the same menu.

That's not random; certain settings are only visible when an appropriate screen layout is selected. For example, the settings that affect hybrid mode are not shown if no hybrid layout is selected. Having said that, the fact that you reported this suggests that there's room for improvement. I have an idea here.

I have also noticed "close content" is INCREDIBLY unreliable, maybe even "restart RetroArch". It gets RetroArch stuck almost every singled time I tried, maybe like 1/10 tries was able to close the content properly.

Could you please try to reproduce this issue and post the resulting log file? You'll need to enable debug logging and verbosity in the Logging section of the settings menu.

@DarkSide1305
Copy link
Author

DarkSide1305 commented Dec 29, 2023

That's not random; certain settings are only visible when an appropriate screen layout is selected. For example, the settings that affect hybrid mode are not shown if no hybrid layout is selected. Having said that, the fact that you reported this suggests that there's room for improvement. I have an idea here.

Well, of course some Menu Items are visible and dissapear when you change some options, but it wasnt just that they appear, sometimes the cursor twitched to the first menu option, or the second, or third, it was completely randomly twitching around with no real reason why, I would expect the extra option to just appear while my cursor stays on the same option

@DarkSide1305
Copy link
Author

Could you please try to reproduce this issue and post the resulting log file? You'll need to enable debug logging and verbosity in the Logging section of the settings menu.

retroarch__2023_12_29__14_09_10.log

This is the log for the issue, I dont know if its helpful or not, but I am always forced to close RetroArch. I might not have to close RetroArch, but after pressing "Closing Content" RetroArch gets stuck for at least 30 seconds - every other Core might need like, 3 seconds at max to close content.

@JesseTG
Copy link
Owner

JesseTG commented Dec 29, 2023

I can reproduce the hang that occurs when closing the core in the Flatpak release on the Steam Deck. Let me see if it occurs on other platforms, too.

@JesseTG
Copy link
Owner

JesseTG commented Dec 29, 2023

Interestingly, this doesn't occur with my development build. It also doesn't occur when quitting RetroArch entirely (as opposed to just closing the content).

@JesseTG
Copy link
Owner

JesseTG commented Dec 29, 2023

I noticed from the video you posted in #133 that this occurs in the Steam release as well. I wonder if this occurs in nightly builds...in the video you posted, are you using the stable Steam release or the nightly build?

@DarkSide1305
Copy link
Author

DarkSide1305 commented Dec 29, 2023

Actually thats the Flatpak version added as a Non-Steam Game. I do not use the Steam version.

@DarkSide1305
Copy link
Author

https://youtu.be/EhhfXir11z0

Also here is the video of what I mean with "random up and down jumping". It is actually not random, as you said its settings appearing and dissapearing, but it is very jarring when your cursor suddenly jumps all over the place. Im not sure if you can do much, but my suggestion is that, even if new options appear, the cursor should not jump to a different setting - it should stay stable on the setting you selected

@JesseTG
Copy link
Owner

JesseTG commented Dec 29, 2023

Ah, I see what you mean. I think I know what's up. RetroArch is keeping the cursor on the same index, not the same option; so if the third core option is selected and changing the value shows another option before it, then the third option will be pushed down to the fourth. That's what's happening here.

I would open a bug report for this in RetroArch (and please cite this ticket if you do), but there is something I can do. I'll reorder these options so that the jumping is less of an issue.

@JesseTG
Copy link
Owner

JesseTG commented Jan 2, 2024

Fixed the issue with the core options. The other issue reported in this ticket is up next.

@JesseTG
Copy link
Owner

JesseTG commented Jan 2, 2024

@DarkSide1305 I'm narrowing down the cause and I'd like to be sure that my observations can be reproduced. What happens if you close the core (but not RetroArch itself) when not in full-screen mode?

@JesseTG
Copy link
Owner

JesseTG commented Jan 2, 2024

Additionally, could you please post your retroarch.cfg file? Remember to remove any credentials (RetroAchievements, social media, etc.) before posting it. The issue seemingly disappeared on its own for me, which leads me to think that the RetroArch settings could be related. I'm using the same Flatpak build that you are.

@DarkSide1305
Copy link
Author

Will test both tomorrow as its Midnight for me

@DarkSide1305
Copy link
Author

What happens if you close the core (but not RetroArch itself) when not in full-screen mode?

Exact same behaviour, was in Desktop Mode of my Steam Deck, turned off Fullscreen mode and it gets stuck upon pressing "Close Content"

@DarkSide1305
Copy link
Author

DarkSide1305 commented Jan 3, 2024

Additionally, could you please post your retroarch.cfg file?

retroarch.cfg.zip

@JesseTG
Copy link
Owner

JesseTG commented Jan 3, 2024

Thank you, I'll take a look.

@JesseTG
Copy link
Owner

JesseTG commented Jan 4, 2024

Hm...even after duplicating your retroarch.cfg, I still can't reproduce the issue again. I had it when I was first investigating the ticket, then I lost it. ☹️

I have a few questions:

  • Are you using core-specific options overrides for melonDS DS? (Overrides for general RetroArch settings, not input or core options.)
  • Is Bowser's Inside Story the only game you've tested with?
  • If you update to the latest build, does the issue seemingly go away on its own?
  • Do you encounter this issue when playing any DSi or homebrew game?
  • Do you have any relevant background services running besides whatever came out of the box? Like, for example, a Syncthing installation for syncing your save data to multiple devices.

@JesseTG JesseTG added the cannot reproduce This issue cannot be reliably reproduced. label Jan 4, 2024
@DarkSide1305
Copy link
Author

  1. Ive barely used DS DS, I dont think I set up any Core Override
  2. Yes, Im currently only playing Bowser's Inside Story
  3. I have not tried the recent build as im currently still using melonDS
  4. Havent tried any of these
  5. Other then a few Plugins on my Deck no, dont think I got any programs like that running

@DarkSide1305
Copy link
Author

  1. (Addition) I have just checked and indeed, no override file. Says N/A.
  2. (Addition) Still the same issue after updating

@JesseTG
Copy link
Owner

JesseTG commented Jan 4, 2024

5. Other then a few Plugins on my Deck no, dont think I got any programs like that running

Which plugins? I'm trying to think of a reason that one of them could cause something like this.

@DarkSide1305
Copy link
Author

I uninstalled Decky just to check if its somehow Decky related, and its not, still freezes.

@JesseTG JesseTG changed the title General RetroArch Instability RetroArch hangs when closing content Jan 8, 2024
@JesseTG
Copy link
Owner

JesseTG commented Jan 8, 2024

Unfortunately, I still can't reproduce this. I can't fix the issue until I know what's causing it. It's possible there's some subtle difference in your system (RetroArch config or otherwise) that's making a difference, but if neither of us know what to look for then that doesn't help.

If you know of someone else who's faced the same issue, consider asking them to post what they know in this ticket. Maybe there would be some common factor between their Steam Deck and yours.

Until I have a new lead, my only option here is to move on to other issues I can fix. Sorry. I will leave this ticket open until I can confirm that it's resolved. The best thing I can suggest right now is to keep your copy of melonDS DS up to date, in case this problem happens to be fixed by coincidence.

@ds22x
Copy link

ds22x commented Jan 13, 2024

I'm also getting a hang when closing content on my Steam Deck with the Flatpak version of RetroArch, but only when the "Microphone Input Mode" is set to "Microphone".
If I change it to something like "Blow", flush options to disk, and then restart RetroArch in its entirety, subsequent uses of Melon DS DS can be closed without it hanging.

@DarkSide1305
Copy link
Author

Interesting... I basically havent used DSDS so far so I would be using Default Options, maybe the Default Option is Microphone? Thats why my RetroArch.cfg did nothing for Jesse?

@JesseTG
Copy link
Owner

JesseTG commented Jan 13, 2024

I'll try it again to see if the mic is involved at all, thanks for the tip!

@ds22x
Copy link

ds22x commented Jan 13, 2024

After a bit more testing, the hang only seems to happen when the microphone driver is set to "Alsathread" (which is the default for the Flatpak at least).
Setting it to either "Alsa" or "SDL2" will have it not hang after closing content.

@DarkSide1305
Copy link
Author

I can verify that that is exactly the case, exact same behaviour, "alsathread" hangs, "alsa" and "sdl2" dont.

@JesseTG
Copy link
Owner

JesseTG commented Jan 13, 2024

Interesting. Could you open a ticket in RetroArch itself about this, and cite this ticket too? I don't know if any other core uses the microphone API right now, but if any do I'd test them to see if the behavior persists.

I haven't gotten a chance to look into this yet, but I still intend to; once I reproduce this issue, I'll figure out what to do about the ticket. It's possible I may not be able to fix this issue within the core itself.

@DarkSide1305
Copy link
Author

Since you discovered it @ds22x do you want to report it? I could too and link to this Issue, but id rather ask first

@ds22x
Copy link

ds22x commented Jan 14, 2024

Went ahead and created a ticket:
libretro/RetroArch#16118

@ThisByzantineConduit
Copy link

Seconded. There is just an all-around sense of instability in Retroarch that isn't there when using other cores. Lots of hanging and crashes when using menu functions.

It's understandable since it's a very new core but just wanted to chime in to say I've noticed this as well (especially when using "Close Content" or changing some Core Options).

@JesseTG
Copy link
Owner

JesseTG commented Mar 22, 2024

Seconded. There is just an all-around sense of instability in Retroarch that isn't there when using other cores. Lots of hanging and crashes when using menu functions.

It's understandable since it's a very new core but just wanted to chime in to say I've noticed this as well (especially when using "Close Content" or changing some Core Options).

I'm working on a new testing tool and accompanying suite that'll help mitigate this instability. Other cores will benefit from this work too, should their authors choose to use it.

I appreciate your patience as I get this all under control.

@ThisByzantineConduit
Copy link

I appreciate your patience as I get this all under control.

I'm sure you know this but I just wanna say I've only been raising these issues so the core can improve, not to criticize your work. You don't owe us anything, as I know this is totally a volunteer dev effort on your part, and I really appreciate all the time and effort you're putting in for the emulation community. Thank you!

@JesseTG
Copy link
Owner

JesseTG commented Mar 24, 2024

I'm sure you know this but I just wanna say I've only been raising these issues so the core can improve, not to criticize your work. You don't owe us anything, as I know this is totally a volunteer dev effort on your part, and I really appreciate all the time and effort you're putting in for the emulation community. Thank you!

I never got the impression that you were offering unwarranted criticism, but I appreciate the clarification. I'm glad you all are largely having a good time! I'm doing what I can to keep it that way.

@JesseTG JesseTG mentioned this issue Apr 21, 2024
11 tasks
@JesseTG JesseTG pinned this issue Jun 27, 2024
@JesseTG JesseTG mentioned this issue Jun 28, 2024
11 tasks
@diazbastian
Copy link

After a bit more testing, the hang only seems to happen when the microphone driver is set to "Alsathread" (which is the default for the Flatpak at least).
Setting it to either "Alsa" or "SDL2" will have it not hang after closing content.

Oh, thank you very much. I appreciate having read the whole thread. Thanks to this change I was able to avoid this bug.

In short, I was able to replicate this problem using Retroarch 1.19.1 in Flatpak format (flathub) on Fedora Workstation 40 and Fedora Workstation 41 beta (Gnome). What strikes me is that I have been using the same configuration and had not had any problems with MelonDS DS, but with an update of the KDE Platform runtime this issue started.

However, when changing the microphone configuration to Alsa or SDL2 on some occasions, I can close core content and then close RetroArch (apparently), but the microphone indicator remains active in the system tray and Retroarch appears as background apps. Unfortunately I cannot always replicate this to open a new ticket, and it is something that is apparently specific to RetroArch in flatpak format. Anyway, RetroArch no longer freezes when closing content using MelonDS DS and that's already very good for me.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot reproduce This issue cannot be reliably reproduced. microphone
Projects
Status: No status
Development

No branches or pull requests

5 participants