Dominique Pellé wrote:

> > > After 7.4.1826, GVim freezes if use channel/job feature.
> > > I have detected it using "git bisect" command.
> > > It cannot reproduce on console Vim.
> > > I can reproduce it in Vim 7.4.1848.
> > >
> > > I think it is the same issue with it.
> > > https://groups.google.com/d/msg/vim_dev/LlSrz0w8xzk/tQ4ph8OnHwAJ
> >
> > Is there a simple way to reproduce this?
> 
> I can reproduce it when running tests after changing the
> vim/src/testdir/Makefile so that all tests run gvim as follows:
> 
> 
> diff --git a/src/testdir/Makefile b/src/testdir/Makefile
> index 49a817a..6198ccd 100644
> --- a/src/testdir/Makefile
> +++ b/src/testdir/Makefile
> @@ -52,7 +52,7 @@ $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
> 
>  RM_ON_RUN = test.out X* viminfo
>  RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim
> test.ok benchmark.out
> -RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND)
> $(VIMPROG) -f -u unix.vim $(NO_PLUGIN) -s dotest.in
> +RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND)
> $(VIMPROG) -f -g -u unix.vim $(NO_PLUGIN) -s dotest.in
> 
>  clean:
>         -rm -rf *.out *.failed *.res *.rej *.orig test.log messages
> $(RM_ON_RUN) $(RM_ON_START) valgrind.*
> @@ -118,7 +118,7 @@ nolog:
>  # New style of tests uses Vim script with assert calls.  These are easier
>  # to write and a lot easier to read and debug.
>  # Limitation: Only works with the +eval feature.
> -RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME;
> $(VALGRIND) $(VIMPROG) -f -u unix.vim $(NO_PLUGIN)
> +RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME;
> $(VALGRIND) $(VIMPROG) -f -g -u unix.vim $(NO_PLUGIN)
> 
>  newtests: newtestssilent
>         @/bin/sh -c "if test -f messages && grep -q 'FAILED' messages;
> then cat messages && cat test.log; fi"
> 
> 
> The this hangs and shows:
> 
> "test_channel.vim" 1311 lines, 36597 characters
> Executing Test_call()
> Executing Test_channel_handler()
> 
> 
> I tried vim-7.4.1748 and vim-7.4.1449 (gtk2) and both hang.
> 
> 
> > I sent out 7.4.1849, but I don't know if this fixes the problem.
> 
> It does not fix it.
> 
> 
> > Another thing, since this apparently only fails in the GUI,
> > would be to call channel_gui_unregister() right away, when setting
> > ch_to_be_closed. Perhaps you can try this patch:
> >
> > *** ../vim-7.4.1849/src/channel.c 2016-05-27 19:59:43.823519882 +0200
> > --- src/channel.c 2016-05-27 21:34:17.451441836 +0200
> > ***************
> > *** 2868,2873 ****
> > --- 2868,2878 ----
> > * died. Don't close the channel right away, it may be the wrong moment
> > * to invoke callbacks. */
> > channel->ch_to_be_closed = TRUE;
> > +
> > + /* Stop listening to GUI events right away. */
> > + #ifdef FEAT_GUI
> > + channel_gui_unregister(channel);
> > + #endif
> > }
> >
> > static void
> 
> With that patch, the test no longer hang.

I'm glad I could guess the problem.  I'll send out that patch.

> However, when I run all tests, I see this (using
> modified src/testdir/Makefile to run all tests with gvim):
> 
> === BEGIN QUOTE ===
> >From test_alot.vim:
> Found errors in Test_missing_attr():
> Caught exception in Test_missing_attr(): Vim(highlight):E416: missing
> equal sign: 10 @ function RunTheTest[9]..Test_missing_attr, line 27
> TEST FAILURE
> make: *** [report] Error 1
> === END QUOTE ===
> 
> If I run tests in the terminal  (canceling my change to
> src/testdir/Makefile) then all test pass.

That's a separate problem.  Escaping the font name isn't done properly.

-- 
Don't Panic!
                -- The Hitchhiker's Guide to the Galaxy

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui