Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Favoriting games triggers known simplemenu boot loop issue #289

Closed
phillipprado opened this issue Aug 10, 2022 · 6 comments
Closed

Favoriting games triggers known simplemenu boot loop issue #289

phillipprado opened this issue Aug 10, 2022 · 6 comments
Assignees

Comments

@phillipprado
Copy link

What happened?

Favoriting games triggers boot loop issue upon reboot. Following the steps to fix the boot loop in the FAQ provided reveals that in my case there is no last_save.sav file. Instead, I must delete the favorites.sav file to allow the device to boot into simplemenu, but it then has a "favorites file not found" error on boot every time (which I can get to go away by just adding an empty favorites.sav file where the old one was. I think a better fix would be just to delete the contents of the favorites.sav file causing the issue, rather than deleting the whole file). I've tried favoriting games from many consoles and handhelds, including the pico-8, and I get the same result each time.

I don't think I am doing anything wrong here. I am just doing exactly what I use to do on my rg350m on an older version of Adam. I sold the m for the p, which I just got yesterday, and the issue was not present on my last device, so I can assume this is a bug.

Device

RG350P

Version

v2.1

@eduardofilo
Copy link
Owner

eduardofilo commented Aug 10, 2022

It is weird. I have no problem adding games to Favorites in v2.1. The last_state.sav file must be in the SimpleMenu home, as it is part of the image and is never deleted as a result of program operations. That is the strangest thing you are telling. It sounds like you have some sort of corruption either physically of the SD card or the file system on it. Notice that the favorites.sav file is not on the internal card next to the other. What is there is a symbolic link to the file being used that is on the external card in the path simplemenu/favorites.sav.

rg280v:~/.simplemenu $ pwd
/media/data/local/home/.simplemenu
rg280v:~/.simplemenu $ ls -l
-rw-r--r--    1 od       users       257842 Jul 16  2022 alias.txt
-rw-r--r--    1 od       users       314092 Jul 16  2022 alias_PICO-8.txt
drwxr-xr-x    3 od       users         4096 Jul 16  2022 apps
-rw-r--r--    1 od       users          456 Jul 16  2022 config.ini
lrwxrwxrwx    1 od       users           38 Jul 16  2022 favorites.sav -> /media/sdcard/simplemenu/favorites.sav
drwxr-xr-x    3 od       users         4096 Jul 16  2022 games
-rw-r--r--    1 od       users          688 Dec 19 09:39 last_state.sav
lrwxrwxrwx    1 od       users           40 Jul 16  2022 rom_preferences -> /media/sdcard/simplemenu/rom_preferences
drwxr-xr-x    2 od       users         4096 Aug  7  2022 section_groups
drwxr-xr-x    4 od       users         4096 Jul 16  2022 themes
drwxr-xr-x    2 od       users         4096 Jul 16  2022 tmp
rg280v:~/.simplemenu $ cd /media/sdcard/simplemenu/
rg280v:/media/sdcard/simplemenu $ pwd
/media/sdcard/simplemenu
rg280v:/media/sdcard/simplemenu $ ls -l
-rwxr-xr-x    1 od       users          111 Jan  1  1980 favorites.sav
drwxr-xr-x   50 od       users        32768 Jan  1  1980 rom_preferences
rg280v:/media/sdcard/simplemenu $ cat favorites.sav 
Apps;-m|default.gcw0.desktop|/media/data/apps/commander-rg350-new-od.opk;Commander;#/;#;0;/media/data/apps/;996

@phillipprado
Copy link
Author

I am aware the favorites are saved on the external sd card. That's why I thought it was weird I was be seeing this issue and why I decided to submit it. I just tried again a bit ago and was able to replicate it. Then, I went to record a video of me going through the exact steps so I could show you what I am seeing, but it isn't doing it at the moment. And reading over what I wrote earlier, I realized I was not as clear as I thought I was. What I meant to say when I wrote "in my case there is no last_save.sav file" was "in my case, deleting the last_save.sav file doesn't fix the issue." For clarity's sake, I will rewrite out my exact steps below.

Steps to replicate:

  1. Boot into the OS
  2. Go to any console or handheld categories
  3. Favorite a few games
  4. Eventually, shutdown handheld via start menu.
  5. Turn device back on
  6. Boot loop issue occurs exactly like what we see in the video on the FAQ page

Steps to temporarily mitigate issue:

  1. Turn on device while holding the B button to get into open dingux without simplemenu
  2. Navigate to the Commander file manager and open it
  3. In Commander, navigate to /media/sdcard/simplemenu (NOT /media/data/local/home/.simplemenu)
  4. Delete the favorites.sav file
  5. Close commander, navigate to simplemenu, and set it as default launcher again
  6. Reboot device, see the "favorites file not found", close it, and use the device normally.

If I put the sd card into my computer to either clear the content of that favorites.sav file or delete it entirely and create a new one instead of following the mitigation steps above, the device boots normally once it's back in the device, but always into the MAME games list. The error only occurs if that file is not replaced.

My only guess is that the favorites.sav sym link was corrupted somehow, so when the device tried to boot into the menu be default, it couldn't. I installed Adam initially on a 32gb sd card when I first experienced the issue. I figured it was my sd card, so I did it again with a 4gb one I would've rather used anyway, but I had the same issue.

This could absolutely be down to user error. But again, I'm not sure how that could be since I am doing nothing different than what I've done before. It also could be something with my particular device, but who knows. I will submit more info if I can with further testing, but if I am the only one with this issue, then I think it is safe to assume it is either a quirk with my device or with my device's user lol

@eduardofilo
Copy link
Owner

OK, now I understand. So your problem is with the content of the favorites file. Something similar was recently commented in this discussion.

It is one of the SimpleMenu bugs. I can't fix it.

I am going to close the issue because the image is not a development project and contains homebrew software that sometimes crashes. The bugs that I can take into account are the related to configuration problems, and this is not one of them. The only thing I can recommend is to learn how to avoid its weaknesses.

But we can keep talking here to find a workaround for you. Please, generate one of those offending favorites file and send to me attaching to this issue. I suspect that some of your ROMs have some dangerous character in the name and are not well managed inside the favorites file. Maybe the solution is to rename that ROM.

@sam1am
Copy link

sam1am commented Dec 26, 2022

I have run into this issue as well.

FYI renaming the favorites file in SimpleMenu to xxx.bak fixed it for me.

It would be nice if it at least could clear the boot default if the last boot failed or something, which would make the source of the error immediately apparent when the user tries to launch simplemenu again.

@eduardofilo
Copy link
Owner

I have run into this issue as well.

FYI renaming the favorites file in SimpleMenu to xxx.bak fixed it for me.

It would be nice if it at least could clear the boot default if the last boot failed or something, which would make the source of the error immediately apparent when the user tries to launch simplemenu again.

As I said in the closing comment, this is an issue with SimpleMenu, not Adam, which is not a development project. But if you send me the favorites.sav file that generates your problem (that one .bak), I can try to analyse the problem to see if could exist a workaround.

@sam1am
Copy link

sam1am commented Dec 28, 2022

By the way I have reported the issue on the simplemenu project as well here: fgl82/simplemenu#211

For other people arriving here from search, might be a good idea to go star that issue so it gets seen.

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

No branches or pull requests

3 participants