hello

now i have a problem when i use directfb to develop applications

my source like this :

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>

#include <pthread.h>

#include <directfb.h>

static IDirectFB *dfb = NULL;
static IDirectFBSurface *primary = NULL;
static const char *filename = NULL;
static int screen_width, screen_height;

int main( int argc, char **argv)
{
DFBResult ret;
DFBSurfaceDescription sdsc;
DFBDataBufferDescription ddsc;
IDirectFBDataBuffer *buffer;
IDirectFBVideoProvider *videoprovider;
IDirectFBImageProvider *imageprovider;


DirectFBInit( &argc, &argv );
if (argc < 2) {
fprintf( stderr, "\nUsage: databuffer <filename>\n\n" );
exit(1);
}

/* use this file */
filename = argv[1];

/* create the super interface */
DirectFBCreate( &dfb );

/* switch to fullscreen */

dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN );

sdsc.flags = DSDESC_CAPS;
sdsc.caps = DSCAPS_PRIMARY;

dfb->CreateSurface( dfb, &sdsc, &primary );

primary->Clear( primary, 0, 0, 0, 0 );

ddsc.flags = DBDESC_FILE;
ddsc.file = filename;

printf( "\n #######Create DataBuffer######");

dfb->CreateDataBuffer( dfb, &ddsc, &buffer );
sleep(10);
printf( "\n #######Release DataBuffer######\n");
buffer->Release( buffer );

}

when run the application there will be a information like this

!) [ 2590: 0.000] --> Caught signal 11 (at 0x1, invalid address) <--,強
制終了

why? what should i do?

thanks



_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to