Various filesystem functions fail with latest libfat-ogc

Post Reply
InvoxiPlayGames
Posts: 1
Joined: Wed Nov 27, 2024 5:32 am

Various filesystem functions fail with latest libfat-ogc

Post by InvoxiPlayGames » Wed Nov 27, 2024 8:58 pm

Trying to compile several homebrew projects (Chadderz121/brainslug-wii, DarkMatterCore/xyzzy-mod, among others) with the latest devkitPPC, libogc and libfat-ogc updates result in the "fatMountSimple" function call to fail.

Example of the faulty code:

Code: Select all

fatMountSimple("sd", &__io_wiisd);

Additionally there seems to be instability with other FAT functions. "fatInitDefault" works but sometimes causes the homebrew to lock up / black screen and "fatUnmount" causes the homebrew to lock up. My SD card no longer mounts under Windows after doing this a couple times. (This could be bad timing of hardware failure, or could be user error, but it is concerning.) The "directory" filesystem example project seems to not work as well, with a black screen.

I've been able to reproduce the faulty "fatMountSimple" behaviour across a Windows and Linux environment after running "(dkp-)pacman -Syu" as well as a fresh macOS toolchain setup, across Wii, Wii U and Dolphin.


WinterMute
Site Admin
Posts: 2000
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Various filesystem functions fail with latest libfat-ogc

Post by WinterMute » Wed Dec 04, 2024 9:27 pm

We hadn't considered the case where people were mounting devices without first initialising the fat library. We've now updated libfat to initialise as part of the mount calls if it hasn't already been initialised which should address at least part of your issue. The rest kind of sound like a corrupted and/or failing SD card but backup/reformat/restore may help with that. If not then try with a new sd card.

I have a PR from https://github.com/WinterMute/brainslug-wii for brainslug that cleans up the buildsystem and uses our docker image for CI which still builds although latest devkitPPC reports several use after frees that probably need looking at. Bear in mind that the warning is new, not the problem so using older tools that don't warn is simply hiding the issue.

Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest