| View previous topic :: View next topic |
| Author |
Message |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Wed May 13, 2009 4:45 pm Post subject: understanding the error code returned by sce* functions...? |
|
|
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 |
|
 |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Thu May 14, 2009 2:11 pm Post subject: |
|
|
| nothing? these forums aren't as active as they used to be :( |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Thu May 14, 2009 3:11 pm Post subject: |
|
|
| 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 |
|
 |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Thu May 14, 2009 3:19 pm Post subject: |
|
|
| 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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Thu May 14, 2009 8:37 pm Post subject: |
|
|
| 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 |
|
 |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Fri May 15, 2009 2:22 pm Post subject: |
|
|
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 |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri May 15, 2009 2:28 pm Post subject: |
|
|
| 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 |
|
 |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Fri May 15, 2009 2:31 pm Post subject: |
|
|
| 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 |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Fri May 15, 2009 3:51 pm Post subject: |
|
|
| 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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Fri May 15, 2009 4:03 pm Post subject: |
|
|
| 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 |
|
 |
smartie_on_computer
Joined: 09 May 2007 Posts: 28
|
Posted: Fri May 15, 2009 4:11 pm Post subject: |
|
|
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 |
|
 |
SilverSpring
Joined: 27 Feb 2007 Posts: 115
|
Posted: Fri May 15, 2009 5:44 pm Post subject: |
|
|
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 |
|
 |
|