Page 1 of 1

Error 0xFFFFFFFF and Lua Player Plus

Posted: Fri Aug 18, 2017 11:41 am
by big_Sakis25
I need some help for a new homebrew I'm working on written in Lua Player Plus.
I know that the error 0xFFFFFFFF means the file is corrupted and/or you have no space left. This also happens when trying to view the vita OFW system png images using vitashell and molecule.
The app I'm working on lists automatically all the apps you have installed and also loads it's title from param.sfo and also displays it's icon0.png. But if the icon0.png is from a system app it gives me the error 0xFFFFFFFF.
Do you know any way to check if the file is corrupted and then skip the file loading? or any other way around.


Thanks

Re: Error 0xFFFFFFFF and Lua Player Plus

Posted: Sat Aug 19, 2017 5:17 am
by Jazoolee ahamed
my guess is some of them are encrypted

Re: Error 0xFFFFFFFF and Lua Player Plus

Posted: Sat Aug 19, 2017 5:40 pm
by big_Sakis25
Jazoolee ahamed wrote:my guess is some of them are encrypted
Probably yes, but I want to find a way to skip loading those files instead of crashing the program.
I tried to use "pcall" to check for this errors and skip them but I can't make it work.

Re: Error 0xFFFFFFFF and Lua Player Plus

Posted: Mon Aug 21, 2017 3:26 pm
by Rinnegatamante
pcall is the way to go as you said.

If you need a sample usage, take a look at this:
https://github.com/Rinnegatamante/CHMM2 ... ua#L14-L19

Here, if Sound.init returns an error, it executes the if clause.

Re: Error 0xFFFFFFFF and Lua Player Plus

Posted: Mon Aug 21, 2017 4:16 pm
by big_Sakis25
Rinnegatamante wrote:pcall is the way to go as you said.

If you need a sample usage, take a look at this:
https://github.com/Rinnegatamante/CHMM2 ... ua#L14-L19

Here, if Sound.init returns an error, it executes the if clause.
Thanks for the reply but I can't make it work with "Graphics.loadImage".
Here is my code (I used "PCSB00204" as an example which is WRC3 game that I had purchased and it's icon0.png gives me error when I use "Graphics.loadImage" or if I try to open this image with molecularShell:

Code: Select all

if not pcall(Graphics.loadImage("ux0:/app/PCSB00204/sce_sys/icon0.png")) then
myImage = Graphics.loadImage("ux0:/app/PCSB00204/sce_sys/icon0.png")
end
the above code gives me error: "Error loading image (invalid magic)." The same happens if I use "if pcall(Graphics..."
Like it still tries to load that image. And I can't skip it.

Re: Error 0xFFFFFFFF and Lua Player Plus

Posted: Mon Aug 21, 2017 5:47 pm
by Rinnegatamante
big_Sakis25 wrote:
Rinnegatamante wrote:pcall is the way to go as you said.

If you need a sample usage, take a look at this:
https://github.com/Rinnegatamante/CHMM2 ... ua#L14-L19

Here, if Sound.init returns an error, it executes the if clause.
Thanks for the reply but I can't make it work with "Graphics.loadImage".
Here is my code (I used "PCSB00204" as an example which is WRC3 game that I had purchased and it's icon0.png gives me error when I use "Graphics.loadImage" or if I try to open this image with molecularShell:

Code: Select all

if not pcall(Graphics.loadImage("ux0:/app/PCSB00204/sce_sys/icon0.png")) then
myImage = Graphics.loadImage("ux0:/app/PCSB00204/sce_sys/icon0.png")
end
the above code gives me error: "Error loading image (invalid magic)." The same happens if I use "if pcall(Graphics..."
Like it still tries to load that image. And I can't skip it.
As you can see from what i linked you, pcall takes a function name, not a function result.