On Tue, 12 Oct 2010, Nazri Ramliy wrote:

On Tue, Oct 12, 2010 at 8:23 AM, Pablo Contreras wrote:
The program will start iterating, and you will notice a counter whizzing up at the bottom of the screen.  The editor's colors will turn a glaring yellow background, which is normal - not pretty but we're just testing here. Everything will look ok, apart from the glaring background yellow.  Then, after a while you should notice that you can't read the text on the editor any more.  This is what I'm talking about.  All you will see is the glaring yellow background.

My eyes! My eyes!

I tried you script and it works fine here (nvidia card).

$ gvim bug.vim
:so %<cr>

I ran the script twice, once with a maximized gvim (slow), and another with a smaller sized gvim (faster).

Both works fine.

nazri.

Also fine here, using Gvim 7.3.14 under Gentoo Linux, after bumping the number of iterations to 10,000.

But, running the test under Win7 showed the bug. There, under Vim 7.3e beta, after approximately 2500 iterations, I started seeing:

E235: Unknown font: Fixedsys:h9:cDEFAULT

So, maybe some kind of font structure is getting allocated and not freed when unused? (Possibly because there's no way to know it's unused?)

Either way, this script triggers the same error, but I'm not sure it's the whole cause:

==> minimal.highlight.bug.vim <==
for i in range(50000)
        highlight Normal guifg=#ffffff
endfor
=================================

Doesn't look nearly as dramatic. Adding the redraw at the end of the loop is what causes the flashes.

Run via:

gvim.exe -u NONE -N +'syntax on' +'source %' /path/to/minimal.highlight.bug.vim

Or, if you want to see the message (since the GUI becomes unreadable after the font goes missing -- though it seems to gradually return to near-normal):

gvim.exe -u NONE -N +'syntax on' +'source %' +'redir! > ~/vim.error.msg' 
+'silent! messages' +'redir END' +'q!' /path/to/minimal.highlight.bug.vim

--
Best,
Ben

--
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

Raspunde prin e-mail lui