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

Windows: Downloading "Super Gameboy 2: Vaporwave Edition" from the extras menu seems to break file structure (issues with temp folder + MACOSX folder created on Windows) #374

Open
kmcquillan opened this issue Jan 3, 2025 · 8 comments · May be fixed by #375

Comments

@kmcquillan
Copy link

kmcquillan commented Jan 3, 2025

Describe the bug
When I download the Super Gameboy 2: Vaporwave Edition core from the extras menu, it seems to break some cores (getting a core load error when trying to run).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Pocket Extras'
  2. Navigate to 'Variant Cores'
  3. Download Super Gameboy 2: Vaporwave Edition
  4. Test something like Super Gameboy or SNES on Pocket

Expected behavior
If this issue is not specific to my device, you should notice broken cores. I noticed that Super Gameboy was trying to call to random ROMs as its Core locations, instead of to the correct cores/platforms. Same with SNES and Vectex.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 10.0.19045

pupdate_settings.json

Contents of settings file
See attached for the contents of pupdate_settings.json

NOTE: I have not tried to fix this yet - I've just simply deleted all of my cores/re-installed them without trying to install any of the "Pocket Extras". If the issue lies with the "Temp" or "MACOSX" folders, I may be able to simply drag & drop what is in those to the respective Assets/Cores/Settings folders,

Edit: Moving files from MacOSX/Temp folders doesn't seem to do anything (or be necessary - the files are already there). The program crashes upon installation of Extras so seems these just don't get deleted in time.

Unsure what would cause cores to change the folder/location they are using to launch though, seems odd

@kmcquillan
Copy link
Author

kmcquillan commented Jan 5, 2025

Dove into this and it seems to be an issue with https://github.com/hallem/pocket-extras/releases/tag/1.0.0 - better to just download manually with how these are zipped

Edit: I shouldn't say it's an issue with that page above - my apologies to the author.

The issue I ran into is avoided by downloading zips manually from above, as opposed to using pupdate to pull these. Pupdate seems to pull more files than it needs/the release provides more files than needed.

Interestingly, that doesn't even seem to be the issue after testing. I can keep these extra files (ex. DS Store, which I think is a system file on Mac that holds metadato on folders/files) on my SD card as long as I install the extras manually. Something else funky happens & I'm not sure what - random cores just stopped working.

If anyone else runs into this issue when adding extras via update, just install manually for now. The download is structured so that it is drag/drop onto your SD card.

@hallem
Copy link
Contributor

hallem commented Jan 6, 2025

Can you expand a little more on what you're seeing and why you think it's the release @kmcquillan? I maintain those extras and haven't seen any issues.

@kmcquillan
Copy link
Author

kmcquillan commented Jan 7, 2025

It just seems like there's an issue with the download itself, I shouldn't definitively say it's your release (I run into 0 issues when grabbing anything directly from your github). My apologies there @hallem ! I was looking at your release page and falsely assumed pupdate was downloading every version of, for example, the Super GB extras. After running some tests, I can see that's not the case.

I just went through a clean install to try finding a culprit and have no idea if it's just rate limiting, an error with the app, etc. Even looking at the file system before/after install, all seems fine aside from the "General error" when actually trying to run on the Pocket itself after updating.

Just to add info for anyone that runs into this/in case it's a larger issue for Windows users:

I'm going to lay out what's happening on my end starting with a clean install of an SD card on the Pocket. I have attempted this with pupdate on the SD card itself, and on my PC's NVME as well. I didn't see a difference with either method.

Steps:

1. Format SD card and insert into Pocket to create initial folder structure (for NVME, I'm just putting pupdate in a folder w/ the baseline Analogue file structure on my desktop.)

2. Run "Update All" on pupdate, with beta access enabled, but everything else set to default (no extras enabled).. Root after pupdating below:

  • Folder Structure after Update all

3. Test Cores:

  • All cores are working at this point.
  • I noticed that a folder titled "_none" was created under Assets, with a folder for Jailbreak inside of it. Cores were tested afterwards (including Jailbreak), and they are working.
    none folder, seems to do nothing - or at least, does not break anything
  • I'm also attaching screenshots of the SuperGB and SNES core.json files. At this stage, the cores themselves are working and the extras update has not been run. It's my understanding these files are what tell the Pocket what a cores name is, who made it, etc (along with the platform .json file). This will come up a bit later with some weirdness I saw post-update.
    super gb core file pre-extras
    snes core file pre-extras

4. After cores are confirmed working, run an extras download. I pulled SuperGB2 this time.

  • Within pupdate, I get an error "Well, something went wrong ... Object reference not set to an instance of an object. Press any key to continue"
    pupdate error
  • The app crashes after input

At this point, I test in two ways -
A. _SD card directly into Pocket after app crash
B. _SD card into Pocket after re-running the extras update and cleaning up

  • Pupdate does not crash on the 2nd attempt.
  • After the update, I go through and clean up all temp, MACOSX, and DS Store files laying around

NOTE: Both tests have the same result i.e. Core General Errors

5. Test cores:

  • For SNES and SuperGB, I get an error: "Error in core: general error"
  • I do not see SuperGB2 as its own platform, or as a core within the SuperGB platform
  • I forgot to grab screenshots of the platforms page on the Pocket (the page that comes up after hitting "Change Core"). These looked odd, like they were referencing random file/rom/core names for the Version Author. The core names themselves were just blank. The .jsons that I talked about earlier did not seem any different.

6. Check file structure:

  • Initially, I notice that "_MACOSX" and "temp" are there. The temp file is usually deleted. I would think both are harmless regardless though. I tested with and without these folders to be safe, and got the same result (error when running core)
    MACOSX Assets folder
    MACOSX Cores Folder
    Temp folder

  • [ ]SNES Core info seems okay. I checked the platform file as well and it's still the same:
    SNES Core Post-extras

  • Super GB 1 core info seems okay. Platform file did not change either:
    Super GB Core Post-Extras

  • The Assets/sgb2 folder seems okay to me. A .DS Store file is there, but I wouldn't think that would affect anything
    Assets-sgb2 folder
    spiritualized supergb2
    Common

  • Cores/Spiritualized.SuperGB2 also seems okay to me
    sgb2 cores folder

  • SuperGB2 Platform info seems okay too:
    Sgb2 Platform

So in short, I have no clue what is happening.

@hallem I was able to get everything working again by just doing a regular "Update All" in pupdate, and then going to your Github to download extras there. For Super GB, I used your single platform release, but tested a few other zips and they all worked without issue.

I can only say the issue seems to be happening somewhere during the download in pupdate. Maybe it's not pulling everything (but it seems to be). Maybe the zip it pulls down breaks something on Windows installs. No clue, but the files all seem to match what I downloaded manually. Just seems weird. Might be worth mentioning, but the extras installations are the only place I see "DS Store" and "Gitkeep" files; however, I have never had issues with those being on a Pocket SD card before.

FWIW: When I manually installed extras, I didn't test the other "combined platform" zips (only individual extra cores like the different aspect ratios etc. I then switched to the single platform - which worked great and is what I am sticking with). So on the off chance the other platform options are what pupdate pulls, and one of those platform zips have issues, then maybe it's that... but I just downloaded & checked, and they seem to have all of the necessary files/are laid out correctly.

So yeah. whether there's an issue in the app, what files it's fetching on your page, between github/the app, between myself/github, or just my device... no clue

Thank you for your work and for taking a look at this!

@hallem
Copy link
Contributor

hallem commented Jan 7, 2025

Thanks for all the details. That really helps. There's a setting called show_stack_traces in the pupdate settings file you can set to true so we can see the full details of that error.

For the extra files you mentioned, the MACOS and DS_STORE files shouldn't have any effect on things. They also shouldn't be in the zip files so I'll take a look at why that's happening on the repo for sure.

I'll see if I can get a reproduction of what you're seeing this weekend.

@GottZ
Copy link

GottZ commented Jan 10, 2025

so.. while this is being discussed for a week by now.. wouldn't it have been reasonable to temporarily disable these cores in a hotfix release?
I literally downloaded the current release today and came across this issue..
I am able to fix this but still.. other people might get angry by this.

I'd recommend a quick hotfix release to remove it temporarily.

@hallem
Copy link
Contributor

hallem commented Jan 11, 2025

Here's an update on what I've found so far.

First the macOS files (__MACOS & .DS_Store) have no effect on anything to do with the Pocket no matter the platform. At least in any way that I've been able to determine. My tests on macOS & Windows both yielded the same results, all cores were working as expected. That being said, I've updated the release binaries for the extras and removed those files as they shouldn't be there at all.

Second, the error you're seeing on the clean install was happening after the cores were installed but before the cores could be enabled to be tracked by pupdate and have the remaining assets downloaded from the archive. This means that the Super GameBoy 2 (or other extra) was missing the BIOS files and couldn't run. The reason it worked the second time you ran update all is because pupdate can self correct at this point. I have a code fix in place that I will test further to ensure there are no other issues and the work with Matt to get a new release out when it's ready.

Third, the _none directory in the Assets folder is apart of the rolandking.Jailbreak core. It gets downloaded with the core and copied. The core developer added it so only they can remove it. I didn't dig into why it's there though. It's the same reason that there will be a random README.md file in the root, it gets downloaded with a core and then just copied.

The only thing I have not been able to reproduce at all, is any effect on other cores. So it remains unclear to me what exactly is happening on your SD card and Pocket with regards to the other cores.

@GottZ I understand your perspective, however please remember that Matt and I work on this in our spare time for the community to use. Since this issue is self correcting by simply running update all a second time, I don't see a reason to remove the functionality in a hot fix. Additionally, there are no other reports of this issue happening and both of us are fairly active in the community.

@hallem hallem linked a pull request Jan 11, 2025 that will close this issue
@kmcquillan
Copy link
Author

Thanks for all of the detail and quick fix on this @hallem! Appreciate you guys.

I think I'm just going to chalk that general core error up to a dying SD card. I was adding some roms today and it completely bricked out on me... might have been failing last week when I was running through updates, and I just didn't notice the missing bios files for the extras. It was weird that I could reproduce it but who knows, I was writing a lot to the card at that point after the first error.

I had a backup so just updated the few cores that need it manually. I'll get another card setup via pupdate this weekend though and imagine it won't see issues, will update here either way though.

@hallem
Copy link
Contributor

hallem commented Jan 11, 2025

No problem @kmcquillan. I would just wait until a new release is cut with the fix or make sure to run update all twice.

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

Successfully merging a pull request may close this issue.

3 participants