After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 429278 - Cursor drawn strangely in joe
Cursor drawn strangely in joe
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.16.x
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-13 10:15 UTC by Sven Arvidsson
Modified: 2008-12-07 02:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sven Arvidsson 2007-04-13 10:15:25 UTC
[ Forwarded from http://bugs.debian.org/418699 ]

"When I have the editor "joe" open my caret is supposed to look like a block:

=====
=====
=====
=====
=====

Now, when I press page up/down in exactly the right moment when the blinking caret is just about to reappear, it's drawn incomplete for the first
blinking, after going away and coming back it's fine. Sometimes, it'll be
drawn like this:

=====         =====      =====
=====    or       =  or  =       or various other strange shapes.
                  =      =
                ===      =====
_____           ===      =====

This is just somewhat irritating and may point to a deeper bug with locking
drawing onto the surface, but who knows. It doesn't seem to happen when just
moving up/down so this seems to indicate that it may be due to the redraw
delay."

A screen capture of the problem is available here, http://johannes.sipsolutions.net/files/broken-cursor.ogg

This could be related to bug 424992, but I'm not sure.
Comment 1 Chris Wilson 2007-04-13 11:28:52 UTC
Please explain to a vim user how to configure and reproduce this in joe. That is can you provide a config file(?), instructions on how to run joe with that configuration and an exact sequence of steps to trigger it (do I need to have a file loaded? and how would I do that? etc)

Alternatively, you can run your session under 'script -t joe.script 2>joe.timings' which will capture all the data sent to the screen and the exact interval between outputs. Then you check that the script has captured the bug with 'scriptreplay joe.timings joe.script'

Thanks.
Comment 2 Johannes Berg 2007-04-13 11:38:25 UTC
with script it doesn't seem to reproduce.

All I do in joe is start joe (no config file necessary) with, for example, the file linux/drivers/usb/input/hid-core.c. It does seem to be slightly dependent on the file, this one usually triggers the problem easily.

Grab the file from http://git.kernel.org/?p=linux/kernel/git/linville/wireless-dev.git;a=blob_plain;f=drivers/usb/input/hid-core.c;hb=HEAD then open it in joe and move to the end of line 1025.

Then, push "page down" once and when the cursor is about to light up again, press "page up". Go down again if it didn't work and get the timing a tad different.
Comment 3 Chris Wilson 2007-04-13 12:14:37 UTC
Thanks I was able to reproduce this issue following your steps.

Watching the updates, it appears that joe only invalidates regions of the screen that have changed and the bug only occurs when that overlaps the cursor during the blink state.

Another bug that is visible within joe, is that sometimes we draw a solid white background when it should be using the default background colour, in this case an image.
Comment 4 Johannes Berg 2007-04-13 12:21:14 UTC
Good. Or maybe not so good in that there actually is a bug.

I have a black background and never see it drawing solid white, so maybe that other bug only happens with an image background?
Comment 5 Behdad Esfahbod 2007-04-13 16:22:06 UTC
Good to see this bug in Chris's hands finally..

I've been having this problem in vim and shell, but only got narrow tall cursors, not strange shapes.
Comment 6 Johannes Berg 2007-04-13 16:41:46 UTC
Benjamin pointed out that the screen capture is actually a gif since it was done with byzanz. If you have trouble playing it just rename it to .gif, I've symlinked a copy at http://johannes.sipsolutions.net/files/broken-cursor.gif
Comment 7 Chris Wilson 2007-05-22 16:23:00 UTC
Ok this is the same underlying problem as bug 440475 - whereby the regions are not cell aligned after the expansion.
Comment 8 Chris Wilson 2007-05-23 16:11:24 UTC
I spent a bit of time visualising the regions and their expanded/painted counterparts and finally found another stupid arithmetic mistake inside vte_terminal_expand_region(). I've lost count on the number I've made in there. :-(

I've commited a fix in r1899: 2007-05-23  Chris Wilson  <chris@chris-wilson.co.uk>

	Bug 429278 – Cursor drawn strangely in joe

	* src/vte.c (vte_terminal_expand_region),
	(vte_terminal_paint_area):
		Ensure the expanded regions are cell aligned.


Could you give it a whirl and see if you can spot any more rendering glitches? Thanks.
Comment 9 Loïc Minier 2007-07-29 11:04:54 UTC
Setting to NEEDINFO.
Comment 10 Behdad Esfahbod 2008-12-07 02:52:17 UTC
Pretty sure this is fixed.