Advertising (This ad goes away for registered users. You can Login or Register)

Error 0xFFFFFFFF and Lua Player Plus

Open discussions on programming specifically for the PS Vita.
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Locked
big_Sakis25
Posts: 58
Joined: Sat Oct 20, 2012 10:52 am

Error 0xFFFFFFFF and Lua Player Plus

Post 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
Advertising
Jazoolee ahamed
Posts: 131
Joined: Thu Jul 02, 2015 5:37 am

Re: Error 0xFFFFFFFF and Lua Player Plus

Post by Jazoolee ahamed »

my guess is some of them are encrypted
Advertising
PSN-Jazoolee ahamed
Rejuvenate
Henkaku,Adrenaline
Enso
PS Vita 3.60
big_Sakis25
Posts: 58
Joined: Sat Oct 20, 2012 10:52 am

Re: Error 0xFFFFFFFF and Lua Player Plus

Post 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.
Rinnegatamante
VIP
Posts: 912
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: Error 0xFFFFFFFF and Lua Player Plus

Post 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.
If you want, visit my website: http://rinnegatamante.it :D
big_Sakis25
Posts: 58
Joined: Sat Oct 20, 2012 10:52 am

Re: Error 0xFFFFFFFF and Lua Player Plus

Post 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.
Rinnegatamante
VIP
Posts: 912
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: Error 0xFFFFFFFF and Lua Player Plus

Post 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.
If you want, visit my website: http://rinnegatamante.it :D
Locked

Return to “Programming and Security”