The following caused Vim to hang:
1. Create /tmp/vimrc with the following lines:
set nocp
set mouse=a
2. Run screen, and then do
$ vim -u /tmp/vimrc
Vim hangs before starting up.
GI
PS: Note -- doing "env TERM=rxvt vim -u /tmp/vimrc" works perfectly even
under screen.
--
All wiyht. Rho sritched mg kegtops awound?
But it does finish starting? Sounds like you have a $DISPLAY
environment variable which is incorrect and Vim is (unsuccessfully)
attempting to connect to the X server.
James
> > The following caused Vim to hang:
> >
> > 1. Create /tmp/vimrc with the following lines:
> >
> > set nocp
> > set mouse=a
> >
> > 2. Run screen, and then do
> >
> > $ vim -u /tmp/vimrc
> >
> > Vim hangs before starting up.
>
> But it does finish starting?
Nope! Just hangs for ever. However when I kill it (using "kill" --
Ctrl-C is ignored), it leaves the intro message drawn on the screen.
> Sounds like you have a $DISPLAY environment variable which is
> incorrect and Vim is (unsuccessfully) attempting to connect to the X
> server.
Well, the same problem is caused when I do "vim -X". Also, "env
TERM=rxvt vim" connects to the X server just fine (in fact, even gvim
runs).
Can anyone else reproduce this?
GI
PS: The target host system is Scientific Linux, and I'm running Vim-7.1
with patches 1--215.
--
The Geek shall inherit the earth. - Linus 5:5
> -----Original Message-----
> From: vim...@googlegroups.com [mailto:vim...@googlegroups.com] On
> Behalf Of Gautam Iyer
> Sent: 12 January 2008 03:47
> To: vim...@googlegroups.com; vim...@vim.org
> Subject: Re: Set mouse=a causes Vim to hang in screen.
>
>
> On Fri, Jan 11, 2008 at 08:51:56PM -0500, James Vega wrote:
>
> > > The following caused Vim to hang:
> > >
> > > 1. Create /tmp/vimrc with the following lines:
> > >
> > > set nocp
> > > set mouse=a
> > >
> > > 2. Run screen, and then do
> > >
> > > $ vim -u /tmp/vimrc
> > >
> > > Vim hangs before starting up.
> >
> > But it does finish starting?
>
> Nope! Just hangs for ever. However when I kill it (using "kill" --
> Ctrl-C is ignored), it leaves the intro message drawn on the screen.
>
> > Sounds like you have a $DISPLAY environment variable which is
> > incorrect and Vim is (unsuccessfully) attempting to connect to the X
> > server.
>
> Well, the same problem is caused when I do "vim -X". Also, "env
> TERM=rxvt vim" connects to the X server just fine (in fact, even gvim
> runs).
>
> Can anyone else reproduce this?
I tried and I can't reproduce it.
This is on Linux RH server v 4, vim 7.1.211.
---Zdenek
> [...]
>
> > Can anyone else reproduce this?
>
> Nope. Solaris, x86, vim 7.1
Ok. I tried reproducing this on a few other systems too. I can't
reproduce it on Fedora, Gentoo and Mac OS X (Leo). But the above causes
Vim to hang every time on Scientific Linux release 5.0 (Boron).
Would anyone have any idea as to why? I've currently just aliased "vim"
to "env TERM=rxvt vim" under screen, which causes the problem to go
away. So it's not "critical"...
GI
--
The 10 Commandments of DOS:
3. Thy hard disk shall never have more than 1024 sectors. You don't need
that much space anyway.
> -----Original Message-----
> From: vim...@googlegroups.com [mailto:vim...@googlegroups.com] On
> Behalf Of Gautam Iyer
> Sent: 14 January 2008 20:13
> To: vim...@vim.org
> Subject: Re: Set mouse=a causes Vim to hang in screen.
>
>
> On Mon, Jan 14, 2008 at 05:59:24PM +0100, Vladimir Marek wrote:
>
> > [...]
> >
> > > Can anyone else reproduce this?
> >
> > Nope. Solaris, x86, vim 7.1
>
> Ok. I tried reproducing this on a few other systems too. I can't
> reproduce it on Fedora, Gentoo and Mac OS X (Leo). But the above causes
> Vim to hang every time on Scientific Linux release 5.0 (Boron).
>
Just another data point: it doesn't hang on Scientific Linux 4.0.
---Zdenek
Not sure whether this explains it, but recent patch 7.1.215 fixes
access to uninitialized value in the code that handles the mouse:
Patch 7.1.225
Problem: Using unitialized value when XGetWMNormalHints() fails.
Solution: Check the return value. (Dominique Pelle)
Files: src/os_unix.c
-- Dominique
Interesting. My vim is 7.1.228 so your explanation holds but I have
no means to check. Maybe Gautam should try on version > 7.225
(don't know on which one he's found the problem).
---Zdenek
> > > > > > Can anyone else reproduce this?
> > > > >
> > > > > Nope. Solaris, x86, vim 7.1
> > > >
> > > > Ok. I tried reproducing this on a few other systems too. I can't
> > > > reproduce it on Fedora, Gentoo and Mac OS X (Leo). But the above
> > > > causes Vim to hang every time on Scientific Linux release 5.0
> > > > (Boron).
> > >
> > > Just another data point: it doesn't hang on Scientific Linux 4.0.
> >
> > Not sure whether this explains it, but recent patch 7.1.215 fixes
> > access to uninitialized value in the code that handles the mouse:
> >
> > Patch 7.1.225
> > Problem: Using unitialized value when XGetWMNormalHints() fails.
> > Solution: Check the return value. (Dominique Pelle)
> > Files: src/os_unix.c
>
> Interesting. My vim is 7.1.228 so your explanation holds but I have
> no means to check. Maybe Gautam should try on version > 7.225
> (don't know on which one he's found the problem).
Ok. Tested. Vim-7.1.229 still hangs on Scientific Linux 5:
/tmp/vimrc has:
set nocp
set mouse=a
Then "vim -u /tmp/vimrc -X" hangs when run under screen. It does not
display anything, or respond to terminal input (including Ctrl-C). When
killed (SIGTERM), it draws the intro screen and prints a message saying
"Received TERM signal, exiting."
The same happens with -X / without -X, independent of the DISPLAY
variable. But "env TERM=rxvt vim" runs fine.
GI
--
Experience is what a comb gives you after you lose your hair.
> Ok. Tested. Vim-7.1.229 still hangs on Scientific Linux 5:
What are your screen settings? Perhaps they have an influence?
Richard
I can't reproduce that. A couple of questions/suggestions:
When it "hangs", does it take 100% of the CPU (endless loop)
or is the vim process blocked (0% of CPU).
You can check the CPU usage with the "top" command.
You can also try to run vim with strace (useful in case it
blocks in a system call?):
$ strace vim 2> trace.log
... then look at trace.log
You can also try to attach with gdb to the running process.
You will first need to build vim with DEBUG information (-g -O0).
Just put the following line in vim7/src/Makefile:
CFLAGS = -g -O0
Then recompile vim and run it. When vim hangs, attach to the
process with gdb as follows:
$ gdb /usr/local/bin/vim process_id
(replace /usr/local/bin/vim with actual location of your vim program
and replace process_id with the process ID of vim).
Then in gdb, type "bt" command to get a stack trace.
It should help to debug.
-- Dominique
> >
> > Then "vim -u /tmp/vimrc -X" hangs when run under screen. It does not
> > display anything, or respond to terminal input (including Ctrl-C).
> > When killed (SIGTERM), it draws the intro screen and prints a
> > message saying "Received TERM signal, exiting."
Hmm. My sysadmin ran a system update, and now I can't reproduce the
problem either.
If I ever can, I'll be sure to send a GDB backtrace, or at least an
strace output. Thanks for all your suggestions,
GI
--
Time is not wasted if you are wasted all the time.