Channel callbacks randomly fail to fire in Vim for win32

2017-01-18 Thread Kay Zheng
Hi. I've been working on a Vim plugin using the channel APIs. When testing the plugin on Windows (Windows 7 Pro. SP1 32-bit), one of my channel callbacks failed to fire sometimes. There was no error or anything. It looked like the message passing through the channel just went missing. I used Wire

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-01-22 Thread Kay Zheng
I made the callback failure happen on my Linux system too. Turned out it has something to do with the message length (or the time needed to receive the whole message?) Longer messages tend to fail more often. But I couldn't find a fixed length to trigger this problem. In my set-up, messages of aro

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-01-23 Thread Christian Brabandt
Hi Kay! On Mo, 23 Jan 2017, Kay Zheng wrote: > I made the callback failure happen on my Linux system too. Turned out > it has something to do with the message length (or the time needed to > receive the whole message?) Longer messages tend to fail more often. > > But I couldn't find a fixed leng

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-01-23 Thread Kay Zheng
Now I have these logs captured using ch_logfile(...): https://gist.github.com/anonymous/d9b00634422a69b7ea3729ca6ac21b40 The first received message failed but the second succeeded. I verified both messages, concatenated the fragments manually and parsed them with some trivial Python code. they're

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-01-23 Thread Kay Z.
Hi Christian, > > Can you show an easy way to reproduce? Something we could add into a > test? > I'll keep trying. I put up some logs from ch_logfile(...) earlier in this thread. I hope that's useful to you. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-01-24 Thread Bram Moolenaar
Kay Zheng wrote: > Now I have these logs captured using ch_logfile(...): > > https://gist.github.com/anonymous/d9b00634422a69b7ea3729ca6ac21b40 > > The first received message failed but the second succeeded. I verified > both messages, concatenated the fragments manually and parsed them > with

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-02-06 Thread Kay Zheng
Hi folks, I did some research on the channel code, and if I read it right, there's an issue in channel_fill(...). AFAIK, a channel in JSON mode works like this: 1. When a network message arrives, it tries to parse a complete JSON object. 2. If there were a complete JSON object, it saves the obje

Re: Channel callbacks randomly fail to fire in Vim for win32

2017-02-06 Thread Bram Moolenaar
Kay Zheng wrote: > I did some research on the channel code, and if I read it right, > there's an issue in channel_fill(...). > > AFAIK, a channel in JSON mode works like this: > > 1. When a network message arrives, it tries to parse a complete JSON object. > 2. If there were a complete JSON obj