#1137 [mrpeach/tcpserver] crashes when asking for a client state with a wrong id

v0.45
open
nobody
None
5
2014-02-14
2014-02-13
No

Discussion

  • Antoine Villeret

    here on Ubuntu 13.10, pd-0.45-4, [tcpserver] build from SVN rev 17264

    see patch attached

    1. click on [connect 127.0.0.1 9997(
    2. Then click on [client 2(

    here it crashes on Ubuntu with this backtrace :

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff3d78e71 in tcpserver_output_client_state (x=0x7ffff7eb0010, client=1) at tcpserver.c:710
    710         x->x_sr[client]->sr_fdbuf = tcpserver_get_socket_send_buf_size(x->x_sr[client]->sr_fd);
    
    Thread 1 (Thread 0x7ffff7fc3740 (LWP 22521)):
    #0  0x00007ffff3d78e71 in tcpserver_output_client_state (x=0x7ffff7eb0010, client=1) at tcpserver.c:710
    #1  0x0000000000467a29 in pd_typedmess ()
    #2  0x000000000046947a in outlet_anything ()
    #3  0x000000000046795b in pd_typedmess ()
    #4  0x00000000004728aa in binbuf_eval ()
    #5  0x000000000041d69f in text_click ()
    #6  0x000000000044d877 in canvas_doclick ()
    #7  0x0000000000467a69 in pd_typedmess ()
    #8  0x000000000046795b in pd_typedmess ()
    #9  0x00000000004728aa in binbuf_eval ()
    #10 0x000000000047c629 in socketreceiver_read ()
    #11 0x000000000047b17a in sys_domicrosleep.constprop.3 ()
    #12 0x0000000000476731 in m_mainloop ()
    #13 0x00007ffff6df6de5 in __libc_start_main (main=0x411800 <main>, argc=6, ubp_av=0x7fffffffe028, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe018) at libc-start.c:260
    #14 0x0000000000411831 in _start ()
    jeudi 13 février 2014, 11:50:29 (UTC+0100)
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    
    Program received signal SIGINT, Interrupt.
    0x00007ffff6ec7dc3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
    
    Thread 1 (Thread 0x7ffff7fc3740 (LWP 22534)):
    #0  0x00007ffff6ec7dc3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
    #1  0x000000000047b10f in sys_domicrosleep.constprop.3 ()
    #2  0x0000000000476731 in m_mainloop ()
    #3  0x00007ffff6df6de5 in __libc_start_main (main=0x411800 <main>, argc=6, ubp_av=0x7fffffffe028, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe018) at libc-start.c:260
    #4  0x0000000000411831 in _start ()
    

    Ok I'm trying to get status of client 2, while there is only on.
    But could it throw an error message instead of crashing pd ?

     
    Last edit: Antoine Villeret 2014-02-13
  • Martin Peach

    Martin Peach - 2014-02-13

    OK, fixed. Forgot to check if the client existed first...

     
  • Antoine Villeret

    I confirm this is fixed (tested on Ubuntu 13.10 64bit)

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks