Hi
i've just re-installed a "sarge" debian (2.4.27 kernel, gcc 3.3.4) for
testing purposes and i was back again able to run and test DFB apps
(still to understand why DFB doens't work on "etch" beta1 debian).
Before testing further patches to DFB's signal handling system i made
some test using the "simple" app from DFBTutorials and clean DFB
libraries (0.9.25 from CVS): when i do VT switching while "simple" is
sleeping on "sleep(5)" i get this error message
(!) Direct/Thread: Killing 'X' (134547904)!
free(): invalid pointer 0x8054f90!
and, as expected, the app ends with a crash.
I then modified the "simple" app to make it draw a triangle
("dfbtest_timer" source code below), and after launching it i could do
VT switching without crashes except this warning message
(!!!) *** ONCE [accessing video memory during suspend] ***
[surfaces.c:804 in dfb_surface_software_lock()]
this doesn't cause the app to crash, but only to draw on top of the
current terminal instead on its own allocated terminal.
Note that "simple" still crashes at VT switch even if i tell DFB not to
alocate a new terminal to DFB apps by adding "no-vt-switch" to
"/etc/directfb".
Instead the dfbtest_timer app tells me
(!) DirectFB/PS2Mouse: timeout waiting for ack!!
(!) DirectFB/PS2Mouse: error @byte 0
(!) DirectFB/PS2Mouse: missed 1 ack's!
(*) Direct/Thread: Running 'PS/2 Input' (INPUT, 1525)...
(*) Direct/Thread: Running 'Keyboard Input' (INPUT, 1526)...
(!) DirectFB/FBDev: Panning display failed!
--> Invalid argument
if i do VT switch while it runs and "no-vt-switch" is activated
is this normal? the two apps are almost identical, i'm puzzled because f
their different behaviour..
ciao
Attilio
[EMAIL PROTECTED]:~$ cat dfbtest_timer.c
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <directfb.h>
static IDirectFB *dfb = NULL;
static IDirectFBSurface *primary = NULL;
DFBSurfaceDescription dsc;
static int screen_width = 0;
static int screen_height = 0;
static int count = 0;
#define DFBCHECK(x...) \
{ \
DFBResult err = x; \
\
if (err != DFB_OK) \
{ \
fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
DirectFBErrorFatal( #x, err ); \
} \
}
int main (int argc, char **argv)
{
DFBCHECK (DirectFBInit (&argc, &argv));
DFBCHECK (DirectFBCreate (&dfb));
DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
dsc.flags = DSDESC_CAPS;
dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING;
DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
DFBCHECK (primary->GetSize (primary, &screen_width, &screen_height));
DFBCHECK (primary->FillRectangle (primary, 0, 0, screen_width,
screen_height));
DFBCHECK (primary->SetColor (primary, 0x80, 0x80, 0xff, 0xff));
while (count<100) {
sleep (1);
count = count +1;
DFBCHECK (primary->DrawLine (primary,0, count,count,count
));
DFBCHECK (primary->Flip (primary, NULL, 0));
}
primary->Release( primary );
dfb->Release( dfb );
return 23;
}
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev