The documentation states it should load my bmp fine.
It did in QNX4.x And it should do in QNX6.x.
I already looked out for similar topics, but they all just have compiler/linker warnings.
The app compiles and links very nice, no warning/errors at all,
but the PxLoadImage() just SIGSEGV´s at find_object_stat() 0x08244764 in PxLoadImage().
The file is present, has right now rights of 777 (…), can be viewed with pv, is not on a linked dir ;P, the #defines are set for the image support (where i do not see them any more needed) …
typedef struct pxmethods
{
int flags;
void *(*px_alloc)( long nbytes, int type );
void *(*px_free)( void *memory, int type );
void *(*px_error)( char *msg );
void *(*px_warning)( char *msg );
void *(*px_progress)( int percent );
PhDim_t scale;
void *colors;
int ncolors;
} PxMethods_t;
So… if you want load image, you must at all fill void *(px_alloc)( long nbytes, int type ) member of this struct (for example this function must be: return(malloc(nbytesf(type))) ).
If You set this struct pointer to NULL, function try to place loaded image to NULL so SIGSEGV.
–
methods
A pointer to a PxMethods_t structure that lets you modify the behavior of the function; see below.
If this argument is NULL, the function loads the graphic file specified by filename.
I also tried a mini-app and it loads fine
edit:
I´ll try putting a loadfunction, just for the case
What is mean?
“If this argument is NULL, the function loads the graphic file specified
by filename.”
Where PxLoadImage() store loaded data?
Maybe you need to increasing the draw buffer size?
I checked up on a lot of things. The file is readable, in a sample app with the same call to pxloadimage.
Somehow in the big App it just won´t work.
PxLoadImage() calls
px_load_pi_lib() calls
dlopen() ??? y ever this is called, calls
find_object() calls
find_object_stat() and SIGSEGV