Hi,

I'm using directfb v1.4.11 with an embedded device.
When I try to run a program I get signal 4 & 11 and the program is in a blocking state. I can't even kill it with 'kill -9'.

I saw on the mailing list some people getting the same issue and trying to disable the keyboard and mouse modules but in my program I don't call any functions regarding input devices.

I attach my source code.

I get the same issue with all the directfb programs (df_dok, df_andi,...).
If I run one those program (or mine) using gdb, everything works fine and then I can run my program without using gdb after.

Here is the output when I run my program:

root@192.168.1.111:/home# ./test1

~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.11+STM2010.12.15 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-01-06 13:07)
(!) [ 1400:    0.000] --> Caught signal 4 (sent by the kernel) <--
Illegal instruction
root@192.168.1.111:/home# ./test1

~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.11+STM2010.12.15 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-01-06 13:07)
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>... (*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>... (*) DirectFB/FBDev: Found 'STi7105-main' (ID 102) with frame buffer at 0x41022000, 10240k (MMIO 0xfe20b000, 4k)
(!) [ 1401:    0.000] --> Caught signal 4 (sent by the kernel) <--
(!) [ 1401:    0.000] --> Caught signal 11 (at 0x20, invalid address) <--

Message from syslogd@192 at Sat Jan  1 00:00:28 2000 ...
192 kernel: last sysfs file: /sys/devices/virtual/vc/vcsa2/uevent


here is the output of the kernel:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pc = 80862824
*pde = 00000000
Oops: 0000 [#1]
last sysfs file: /sys/devices/virtual/vc/vcsa2/uevent
Modules linked in: stmfb stmcore_display_sti7105

Pid : 1401, Comm:               test1
CPU : 0                 Not tainted  (2.6.32.28_stm24_0206-mb680 #19)

PC is at do_coredump+0x724/0x7e8
PR is at do_coredump+0x714/0x7e8
PC  : 80862824 SP  : 8798ddc0 SR  : 40008100 TEA : c1119a70
R0  : 0000018c R1  : fffffffc R2  : 8798e4e0 R3  : 00000000
R4  : 00000009 R5  : 000000f0 R6  : 80b2d568 R7  : 00000003
R8  : 8080e238 R9  : 00000000 R10 : 80b2e81c R11 : 8798de6c
R12 : 00000000 R13 : 00000000 R14 : 80b2e81c
MACH: 00000006 MACL: 85e23c00 GBR : 29835da8 PR  : 80862814

Call trace:
 [<80858cd8>] kfree+0x90/0xd0
 [<809f7b9e>] sock_queue_rcv_skb+0x4e/0xec
 [<809f7c10>] sock_queue_rcv_skb+0xc0/0xec
 [<80a30806>] __udp_queue_rcv_skb+0x16/0x88
 [<80a325d4>] udp_queue_rcv_skb+0x138/0x198
 [<80838354>] filemap_fault+0x80/0x388
 [<8080cdfe>] check_preempt_wakeup+0x22/0xf0
 [<8081ad82>] free_uid+0x22/0xbc
 [<8081b7ea>] dequeue_signal+0x1e/0x14c
 [<8081b874>] dequeue_signal+0xa8/0x14c
 [<8081d1da>] get_signal_to_deliver+0x332/0x3bc
 [<80803d8c>] do_signal+0x5c/0x618
 [<8091d352>] tty_write+0x15a/0x1b8
 [<8085cdb6>] vfs_write+0xca/0x100
 [<8085cf92>] sys_write+0x3a/0x6c
 [<808046d4>] do_notify_resume+0x14/0x40
 [<808066e0>] tlb_miss_load+0x0/0x4
 [<80806860>] resume_userspace+0x0/0xe

Process: test1 (pid: 1401, stack limit = 8798c001)
Stack: (0x8798ddc0 to 0x8798e000)
ddc0: 80858cd8 00000b69 8798e4e0 00000000 00000000 879b0d20 879a9000 00000000 dde0: 0000000b 86c3a120 8798dfa4 65726f63 86cef900 00000000 809f7b9e 809f7c10 de00: 86cef9dc 00000b08 00000000 86cef960 879a9000 80a30806 86cef9a0 00000b08 de20: 879a9000 00000000 86cef960 80a325d4 874eec20 80838354 874eeb80 8798de94 de40: 87ab76c0 874eec1c 0000001b 87ab7680 00000000 00000002 8080cdfe 8798de78 de60: 00000000 87839180 00000001 8081ad82 00000000 87839180 fffffffc 00000000 de80: 8798de80 8798de80 8081b7ea 87839180 86c27540 00000000 8081b874 8081d1da dea0: 86c44b0c 86c44b08 fffffff6 ffffff0f 86c27540 000000fc 8798dee8 8798dfa4 dec0: 86c44a40 8798df68 80803d8c 0041bc30 297f9504 29631768 00000020 29631768 dee0: 87839434 8798dfa4 0000000b 00000000 00030001 00000020 86c38c00 00000000 df00: 874e7040 00000000 00000000 00030001 00000020 86c38c00 00000000 874e7040 df20: 00000000 00000000 8091d352 00000020 879af000 87850700 874e7000 00000002 df40: 8085cdb6 00000020 297f9598 00000594 00000000 874dbc00 874e7000 00000002 df60: 00000000 00000000 00000020 8085cf92 fffffff7 7bb0cdd4 8798df50 808046d4 df80: 0041bc30 297f9504 29631768 00000020 2957dec0 808066e0 00000002 80806860 dfa0: 8798c000 2959b144 00000000 ffff6c68 00000000 00000000 fff68eb8 00000000 dfc0: 00000000 00000000 7bb0cf38 2957dec0 00000020 29631768 297f9504 0041bc30 dfe0: 7bb0cf74 2959b10a 2959b18a 00000100 29835da8 00000000 00000000 ffffffff HandleVSYNCInterrupt: - time discontinuity detected, vsync interval = 254787 field duration = 16683
---[ end trace ef69ff732e20110d ]---

Thanks for your help.
#include <stdio.h>
#include <unistd.h>
#include <directfb.h>

static IDirectFB *dfb = NULL;
static IDirectFBSurface *primary = NULL;
static int screen_width  = 0;
static int screen_height = 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)
{
        DFBSurfaceDescription dsc;
        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));
        
        
        printf( "Height=%d Witdh=%d\n", screen_height, screen_width );
        
        DFBCHECK (primary->DrawLine (primary,
                                                                 0, 
screen_height / 2,
                                                                 screen_width - 
1, screen_height / 2));
        DFBCHECK (primary->DrawLine (primary,
                                                                 0, 0,
                                                                 screen_width - 
1, screen_height -1));
        DFBCHECK (primary->DrawLine (primary,
                                                                 screen_width - 
1, 0,
                                                                 0, 
screen_height -1));
        DFBCHECK (primary->DrawLine (primary,
                                                                 screen_width / 
2, 0,
                                                                 screen_width / 
2, screen_height -1));
        
        DFBCHECK (primary->DrawLine (primary,
                                                                 0, 18,
                                                                 screen_width, 
18));
        
        DFBCHECK (primary->DrawLine (primary,
                                                                 0, 
screen_height - 19,
                                                                 screen_width, 
screen_height - 19));
        
        DFBCHECK (primary->DrawLine (primary,
                                                                 32, 0,
                                                                 32, 
screen_height -1));
        DFBCHECK (primary->DrawLine (primary,
                                                                 screen_width - 
33, 0,
                                                                 screen_width - 
33, screen_height -1));
        DFBCHECK (primary->Flip (primary, NULL, 0));
        
        sleep (10);
        
        primary->Release( primary );
        dfb->Release( dfb );
        
        return 0;
}
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to