forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

understanding the error code returned by sce* functions...?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Wed May 13, 2009 4:45 pm    Post subject: understanding the error code returned by sce* functions...? Reply with quote

Hey Devs,

i need a little help, i know that some of the higher, more experienced devs here can understand an error code that is produced by sce based functions.

im just trying out some code and when i call this function
Code:
result = sceUsbCamSetupVideo(&videoparam, work, sizeof(work));   
   if (result < 0)
   {
      printf("Error 0x%08X in sceUsbCamSetupVideo.\n", result);
      return result;
   }

it fails and returns:
Code:

Error 0x80243903 in sceUsbCamSetupVideo.


what does that error code mean?
Back to top
View user's profile Send private message
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Thu May 14, 2009 2:11 pm    Post subject: Reply with quote

nothing? these forums aren't as active as they used to be :(
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Thu May 14, 2009 3:11 pm    Post subject: Reply with quote

Well that error code isn't in the ones which came from puzzle bobble's debug symbols so there is really little way to tell what it means :)
Back to top
View user's profile Send private message
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Thu May 14, 2009 3:19 pm    Post subject: Reply with quote

TyRaNiD wrote:
Well that error code isn't in the ones which came from puzzle bobble's debug symbols so there is really little way to tell what it means :)


so pretty much, sony have a whole list of error codes or probably a debug function that looks up error codes and prints out a error stating whats wrong?
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu May 14, 2009 8:37 pm    Post subject: Reply with quote

The SDK hardware is probably connected to a PC for realtime remote debugging or something like that. Hence it would be compiled with debug info while testing (which the release build shouldn't but apparently they screwed up on that part with Puzzle Bobble.)
Back to top
View user's profile Send private message
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Fri May 15, 2009 2:22 pm    Post subject: Reply with quote

ok i guess that would make sense too...

i solved the problem by the way, i replaced "sizeof(work)" with "(68*1024)"

'work' is a pointer to a byte array and i guess sizeof was unable to figure out how big it was
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri May 15, 2009 2:28 pm    Post subject: Reply with quote

smartie_on_computer wrote:
ok i guess that would make sense too...

i solved the problem by the way, i replaced "sizeof(work)" with "(68*1024)"

'work' is a pointer to a byte array and i guess sizeof was unable to figure out how big it was


The size of a pointer is the size of the pointer, not what it points to. :)
Back to top
View user's profile Send private message AIM Address
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Fri May 15, 2009 2:31 pm    Post subject: Reply with quote

J.F. wrote:


The size of a pointer is the size of the pointer, not what it points to. :)


Yeah, i figured that. how would i figure out the size of what the pointer points to?
Back to top
View user's profile Send private message
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Fri May 15, 2009 3:51 pm    Post subject: Reply with quote

smartie_on_computer wrote:
J.F. wrote:


The size of a pointer is the size of the pointer, not what it points to. :)


Yeah, i figured that. how would i figure out the size of what the pointer points to?


Assuming "struct foo *work;"

I usually use sizeof(struct foo) ie, taking the size of the type rather than the variable.

Although increasingly I'm liking sizeof(*work) which does the same thing, and allows you to change the name of the struct that 'work' is without having to find all the sizeof's in your codebase.

I'm not sure which is 'better' in any way, shape or form, others here may have better arguments for or against ...
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Fri May 15, 2009 4:03 pm    Post subject: Reply with quote

sizeof(*pointer) should return the correct size assuming that its pointing to a statically declared thing (or size of array if it points to the first element).
Back to top
View user's profile Send private message
smartie_on_computer



Joined: 09 May 2007
Posts: 28

PostPosted: Fri May 15, 2009 4:11 pm    Post subject: Reply with quote

yeah, i cant do that because i've declared a byte away globally and passed a pointer to it to a class, so when it compiles, its unable to determine the size of the byte array, instead i'll just use a #define WORK_SIZE 64*1024

Thanks for all your guys help
Cheers
Roman
Back to top
View user's profile Send private message
SilverSpring



Joined: 27 Feb 2007
Posts: 115

PostPosted: Fri May 15, 2009 5:44 pm    Post subject: Reply with quote

The work size has to be a multiple of 64. That error means the size arg is incorrect, ie. not a multiple of 64 (I just checked the function).

A lot of error codes are not documented so you have to check the function yourself to see what the error means.
_________________
PSP PRX LibDocs
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group