2008/12/6 Bram Moolenaar wrote:

> Dominique Pelle wrote:
[...]
>> I've never used SNiFF+, but I'm curious about it.  I searched for it on
>> Google.  It seems that this product was taken over by Windriver, but
>> there is nothing about SNiFF+ on Windriver's website.
>>
>> - Is SNiFF+ dead?
>> - Is there any free version available?
>
> I would consider it dead.  Some people might still be using it though.
>
>> Also, I would also expect to get an error message when doing ":sniff
>> connect" in gvim, since I don't have SNiFF+ installed.  But gvim does
>> not detect that the connection fails, and hangs after a few seconds
>> (100% CPU usage and I need to kill -9 vim).
>
> Do you know where it hangs?


Doing this with gvim-7.2.65 (huge, GTK2-GNOME GUI, Linux x86) is
enough to cause 100% CPU usage:

  vim -f -g -u NONE -U NONE -c 'sniff connect'

Attaching to the runaway process with gdb, I see the
following stack traces when CPU usage is 100%  (I
tried several times):

(gdb) bt
#0  0xb80d7430 in __kernel_vsyscall ()
#1  0xb6f72f77 in poll () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7953c32 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb7954060 in g_main_context_pending () from /usr/lib/libglib-2.0.so.0
#4  0xb7e2d271 in gtk_events_pending () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x08237072 in gui_mch_update () at gui_gtk_x11.c:6383
#6  0x0810bfed in vgetorpeek (advance=1) at getchar.c:1984
#7  0x0810dbed in vgetc () at getchar.c:1571
#8  0x0810e05b in safe_vgetc () at getchar.c:1757
#9  0x08178310 in normal_cmd (oap=0xbfdd88dc, toplevel=1) at normal.c:653
#10 0x08123357 in main_loop (cmdwin=0, noexmode=0) at main.c:1180
#11 0x0812aa13 in main (argc=Cannot access memory at address 0x7


(gdb) bt
#0  vgetc () at getchar.c:1571
#1  0x0810e05b in safe_vgetc () at getchar.c:1757
#2  0x08178310 in normal_cmd (oap=0xbfdd88dc, toplevel=1) at normal.c:653
#3  0x08123357 in main_loop (cmdwin=0, noexmode=0) at main.c:1180
#4  0x0812aa13 in main (argc=Cannot access memory at address 0x4c
) at main.c:939


Using vim-7.2.65 (huge) in a terminal, instead of gvim, i.e...

  vim -u NONE -c 'sniff connect'

Vim then does not hog the CPU, but I see this on
the terminal...

ff<9b>sniff<9b>sniff<9b>sniff

,.. then whenever I press <Esc> more messages
"niff<9b>sniff<9b>sniff" appear on the screen.  And
the only way to exit vim is the kill it.

I will try to find time to investigate it later.  But
considering that it  may only happen when using
sniff while sniff is not installed, and that sniff is dead,
it's a low priority bug.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui