Bug#292397: vim freezes on swap file prompt

2006-11-10 Thread Bas Zoetekouw
Hi!

As far as I know, this bug was fixed in one of the final rc releases of
vim7.  Shouldn't it be closed?

Regards,
Bas.

-- 
Kind regards,
++
| Bas Zoetekouw  | GPG key: 0644fab7 |
|| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| [EMAIL PROTECTED], [EMAIL PROTECTED] |  a2b1 2bae e41f 0644 fab7 |
++ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#292397: vim freezes on swap file prompt

2006-04-13 Thread Bas Zoetekouw
package vim
tag 292397 + upstream
tag 292397 + patch
thansk

Hi!

I've done some more debugging on this problem, and it seems only a few
of the vim variants are affected.  Specifically, I can reprocude the
problem using vim.gnome, vim.python and vim.perl, but vim.basic,
vim.gtk, vim.tiny, vim.lesstif, vim.ruby, vi.tcl and vim.full work fine.

Also, I've build a version of vim.perl with -ggdb3, and can reproduce
the problem there.  GDB gives the following backtrace after the freeze:

 | (gdb) bt
 | #0  0xe410 in __kernel_vsyscall ()
 | #1  0xb77fed6d in ___newselect_nocancel () from /lib/tls/i686/cmov/libc.so.6
 | #2  0x0815887b in RealWaitForChar (fd=0, msec=100, check_for_gpm=0xbfcd399c) 
at os_unix.c:4743
 | #3  0x081585c1 in WaitForChar (msec=100) at os_unix.c:4445
 | #4  0x08154b75 in mch_inchar (buf=0xbfcd3a4a , maxlen=46, wtime=100, 
tb_change_cnt=0) at os_unix.c:328
 | #5  0x081b950f in ui_inchar (buf=0xbfcd3a4a , maxlen=46, wtime=100, 
tb_change_cnt=0) at ui.c:189
 | #6  0x081185dd in get_keystroke () at misc1.c:3025
 | #7  0x08111f63 in do_dialog (type=2, title=0x81fb014 VIM - ATTENTION, 
message=0x82fa060 Swap file \/tmp//%tmp%test.swp\ already exists!, 
buttons=0x81faf88 Open Read-Only\nEdit anyway\nRecover\nQuit\nAbort, 
dfltbutton=1, textfield=0x0) at message.c:3298
 | #8  0x0810971d in findswapname (buf=0x8234428, dirp=0xbfcd404c, 
old_fname=0x0) at memline.c:4107
 | #9  0x081039a2 in ml_open_file (buf=0x8234428) at memline.c:552
 | #10 0x08103ac4 in check_need_swap (newfile=1) at memline.c:604
 | #11 0x080d27d0 in readfile (fname=0x8235848 /tmp/test, sfname=0x8235848 
/tmp/test, from=0, lines_to_skip=0, lines_to_read=2147483647, eap=0x0, 
flags=1) at fileio.c:642
 | #12 0x0806c4a2 in open_buffer (read_stdin=0, eap=0x0) at buffer.c:130
 | #13 0x080f770a in create_windows (parmp=0xbfcd43f0) at main.c:2378
 | #14 0x080f5589 in main (argc=2, argv=0xbfcd4534) at main.c:794

If I set a breakpoint on line 3026 of misc1.c (just after the
ui_inchar() call), I can verify that indeed a special key code is
returned (i.e. the cursor I pressed).  Specifically, the key code
returned is 0x80 0x8a 0x95 (\eku, which I guess means the uparrow).
However, this key is not handled at all:  in the FEAT_MBYTE ifdef on
line 3084, the continue is called, and the loop progresses to the next
iteration, after which the key is never returned anymore by
get_keystroke().

So, the problem seems to be that the special sequences that are
generated by the cursor keys are mistaken for an incomplete multibyte
sequence; the check for such a special sequence is only done in
do_diaglog(), after get_keystroke() has returned.  

The following patch solves this, and works fine here.  Please include it
in the debian packages and also send it upstream.

--- vim/src/misc1.eerst 2006-04-13 13:45:37.0 +0200
+++ vim/src/misc1.c 2006-04-13 13:48:10.0 +0200
@@ -3082,7 +3082,9 @@
}
}
 #ifdef FEAT_MBYTE
-   if (has_mbyte)
+   /* if n0, this is a special key (eg cursor) which should 
+* not be mistaken for an incomplete multibyte sequence */
+   if (has_mbyte  n=0) 
{
if (MB_BYTE2LEN(n)  len)
continue;   /* more bytes to get */

Happy Vimming!

Bas.


PS: this was all tested using the 6.4+7.0c05-1 versions from
experimental.

-- 
Kind regards,
++
| Bas Zoetekouw  | GPG key: 0644fab7 |
|| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| [EMAIL PROTECTED], [EMAIL PROTECTED] |  a2b1 2bae e41f 0644 fab7 |
++ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#292397: vim freezes on swap file prompt

2006-04-13 Thread Pierre Habouzit
forwarded 292397 vim-dev@vim.org
thanks

Thanks a lot for that long standing bug fix !
I've forwarded it to vim-dev ML, I suppose it'll be merged into vim 
7.0e :)
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpcN1l5Rhhds.pgp
Description: PGP signature


Bug#292397: vim freezes on swap file prompt

2006-04-12 Thread Matthijs Mohlmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Now that vim 7.0 is in experimental I tried to reproduce this bug again
but it doesn't seem to be reproducible anymore. Can somebody else check
this bug too ?

Regards,

Matthijs Mohlmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEPS6B2n1ROIkXqbARAjDLAJwKz/6xnUm0wHkDBlVxNRtkPwIdmACfXMFK
715JMlBi71J3MEdIgCxsRvE=
=a383
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#292397: vim freezes on swap file prompt

2006-04-12 Thread Bas Zoetekouw
Hi Matthijs!

You wrote:

 Now that vim 7.0 is in experimental I tried to reproduce this bug again
 but it doesn't seem to be reproducible anymore. Can somebody else check
 this bug too ?

I can still reproduce it here.

[EMAIL PROTECTED]/tmp locale
LANG=en_GB.UTF-8
LC_CTYPE=en_GB.UTF-8

ii  libc6   2.3.6-3 GNU C Library: Shared libraries and 
ii  vim 6.4+7.0c05-1Vi IMproved - enhanced vi editor


-- 
Kind regards,
++
| Bas Zoetekouw  | GPG key: 0644fab7 |
|| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| [EMAIL PROTECTED], [EMAIL PROTECTED] |  a2b1 2bae e41f 0644 fab7 |
++ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#292397: vim freezes on swap file prompt

2006-04-12 Thread Pierre Habouzit
Le Mer 12 Avril 2006 19:04, Bas Zoetekouw a écrit :
 Hi Matthijs!

 You wrote:
  Now that vim 7.0 is in experimental I tried to reproduce this bug
  again but it doesn't seem to be reproducible anymore. Can somebody
  else check this bug too ?

 I can still reproduce it here.

 [EMAIL PROTECTED]/tmp locale
 LANG=en_GB.UTF-8
 LC_CTYPE=en_GB.UTF-8

 ii  libc6   2.3.6-3 GNU C Library: Shared libraries
 and ii  vim 6.4+7.0c05-1Vi IMproved - enhanced vi
 editor

works for me with a vim 7.0d...
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpKGX2qffyzu.pgp
Description: PGP signature


Bug#292397: vim freezes on swap file prompt

2006-04-12 Thread Stefano Zacchiroli
On Wed, Apr 12, 2006 at 07:04:11PM +0200, Bas Zoetekouw wrote:
 I can still reproduce it here.

Me too (vim 6.4+7.0d01-1):

[EMAIL PROTECTED]:~$ locale
LANG=it_IT.UTF-8
LC_CTYPE=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LC_COLLATE=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_ALL=

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-


signature.asc
Description: Digital signature


Bug#292397: vim freezes on swap file prompt

2006-03-17 Thread Bas Zoetekouw
Hi!

Matthijs wrote:

 It seems that I can reproduce it again. Is your system up to date ?
 I think that it something has to do with glibc, but I have to
 investigate that. I will do that in the upcoming days.

Any update on this?  This bug has been annoying me for quite a while
now, but I don't really have an idea on how to debug it.

-- 
Kind regards,
++
| Bas Zoetekouw  | GPG key: 0644fab7 |
|| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| [EMAIL PROTECTED], [EMAIL PROTECTED] |  a2b1 2bae e41f 0644 fab7 |
++ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#292397: vim freezes on swap file prompt

2005-09-18 Thread Stefano Zacchiroli
I can't reproduce the bug either, I thus propose to close this bug
report.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-


signature.asc
Description: Digital signature


Bug#292397: vim freezes on swap file prompt

2005-09-18 Thread Matthijs Mohlmann
It seems that I can reproduce it again. Is your system up to date ?

I think that it something has to do with glibc, but I have to
investigate that. I will do that in the upcoming days.

Stefano Zacchiroli wrote:
 I can't reproduce the bug either, I thus propose to close this bug
 report.
 


signature.asc
Description: OpenPGP digital signature


Bug#292397: vim freezes on swap file prompt

2005-03-16 Thread Matthijs Mohlmann
Pierre Habouzit wrote:
On Tue, Mar 15, 2005 at 10:13:48AM +0100, Matthijs Mohlmann wrote:
Hi,
I'm trying to reproduce this bug but i can't reproduce it. Do you still
having this bug in the current vim ?
And what shell do you use ?
Regards,
Matthijs Mohlmann

  actually, I can reproduce it, here is the method (works under any
shell or terminal)
export LC_ALL=fr_FR.UTF-8   // use any utf8 locale here
export TERM=linux
vi some_already_opened_file
  and then you have the bug (press any cursor key, and then you'll see
the freeze).  the bug is locale + TERM related
  I suggest to forward this to upstream.

Yes now i can reproduce it too... probably i made a fault somewhere.
You say it's locale + TERM related (i think that too) then i think it's
not a upstream bug but a glibc bug...


signature.asc
Description: OpenPGP digital signature


Bug#292397: vim freezes on swap file prompt

2005-03-15 Thread Matthijs Mohlmann
Hi,
I'm trying to reproduce this bug but i can't reproduce it. Do you still
having this bug in the current vim ?
And what shell do you use ?
Regards,
Matthijs Mohlmann


signature.asc
Description: OpenPGP digital signature


Bug#292397: vim freezes on swap file prompt

2005-03-15 Thread Pierre Habouzit
On Tue, Mar 15, 2005 at 10:13:48AM +0100, Matthijs Mohlmann wrote:
 Hi,
 
 I'm trying to reproduce this bug but i can't reproduce it. Do you still
 having this bug in the current vim ?
 
 And what shell do you use ?
 
 Regards,
 
 Matthijs Mohlmann

  actually, I can reproduce it, here is the method (works under any
shell or terminal)


export LC_ALL=fr_FR.UTF-8   // use any utf8 locale here
export TERM=linux
vi some_already_opened_file

  and then you have the bug (press any cursor key, and then you'll see
the freeze).  the bug is locale + TERM related


  I suggest to forward this to upstream.


-- 
·O·  Pierre Habouzit
··O
OOOhttp://www.madism.org



Bug#292397: vim freezes on swap file prompt

2005-01-26 Thread Bas Zoetekouw
Package: vim
Version: 1:6.3-058+1
Severity: important

When I start vim to edit a file that is already being edited, vim
nicely shows me the swap file already exists prompt.  If I press any
normal (alphanumeric) key here, everything keeps working fine.
However, if I press a cursor key on this screen, vim simple freezes
and refuses to reacted to anything (including ^Z and ^C) except an
external TERM signal.

My cursor keys return the usual \e[A, \e[B, \e[C, \e[D escape
sequences.

The problem seems locale-dependent.  if I start vim with
 [EMAIL PROTECTED]/tmp env -i LC_ALL=C vim test
it works fine.  If I set LC_ALL to en_US.UTF8 or nl_NL.UTF8 instead of
C, the bug returns.  With en_US or en_US.ISO-8859-15, the bug doesn't
occur either.  I've tries this using varying terminals (xterm, aterm,
console).

An strace of the frozen process shows

| select(1, [0], NULL, [0], {0, 10})  = 0 (Timeout)
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0
| select(1, [0], NULL, [0], {0, 10})  = 0 (Timeout)
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0
| select(1, [0], NULL, [0], {0, 10})  = 0 (Timeout)
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0

etc.  When I press a key, it says:

| select(1, [0], NULL, [0], {0, 10})  = 0 (Timeout)
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0
| select(1, [0], NULL, [0], {0, 10})  = 1 (in [0], left {0, 17000})
| select(1, [0], NULL, [0], NULL) = 1 (in [0])
| read(0, q, 4096)  = 1
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0
| select(1, [0], NULL, [0], {0, 10})  = 0 (Timeout)
| ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo 
...}) = 0

(which shows vim does actually receives the key I typed)
after which it returns to the select/ioctl loop.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-ac6
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages vim depends on:
ii  dpkg1.10.26  Package maintenance system for Deb
ii  libc6   2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgpmg11.19.6-19General Purpose Mouse - shared lib
ii  libncurses5 5.4-4Shared libraries for terminal hand
ii  vim-common  1:6.3-058+1  Vi IMproved - Common files

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]