git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* bug report: gitk crashes on git commit with emoji (utf-8)
@ 2020-10-05 11:33 Tomek Mrugalski
  2020-10-11 11:47 ` Peter Oberndorfer
  2020-10-11 12:32 ` Đoàn Trần Công Danh
  0 siblings, 2 replies; 4+ messages in thread
From: Tomek Mrugalski @ 2020-10-05 11:33 UTC (permalink / raw)
  To: git

Hi there,

I'd like to report a bug in gitk. gitk crashes when trying to view a
repository that has utf-8 chars in the commit comments.

System: Ubuntu 20.04
Tested gitk versions:
- 2.25 (the default in ubuntu 20.04),
- 2.28 (installed from ppa:git-core/ppa),
- latest (next branch, commit fdf196b9972337a0285dae59f904f62f989fbca8)

Steps to reproduce the issue:

I've isolated the commit in our repo that causes this problem and pushed
it here: https://github.com/tomaszmrugalski/gitk-bug-emoji
The repo is small (only 3 commits). The offending commit that seems to
trigger this bug seems to be 3ad99781c449da3b1b42a098c4a820455050eb44.

git clone https://github.com/tomaszmrugalski/gitk-bug-emoji
cd gitk-bug-emoji
gitk

Actual behavior:

$ ~/devel-ssd/git/gitk-git/gitk
X Error of failed request:  BadLength (poly request too large or
internal Xlib length error)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  3065
  Current serial number in output stream:  3148

There is a window showing up for a split second (too fast to even
notice its content), then it disappears and the aforementioned
X Error is shown in the console.

I've tried removing ~/.config/git/gitk, but that didn't help.

Expected behavior:

gitk should not crash. The window should show the git history.

It's very much ok if gitk doesn't show the emoji, but it shouldn't
crash. I've tried to look for existing bug reports, but couldn't find
anything useful.

System info (as produced by git bugreport)
git version:
git version 2.28.0.1022.gfdf196b997
cpu: x86_64
built from commit: fdf196b9972337a0285dae59f904f62f989fbca8
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC
2020 x86_64
compiler info: gnuc: 9.3
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash

The same error happens on earlier versions 2.25 and 2.28. Here's output
from 2.28:

git version:
git version 2.28.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC
2020 x86_64
compiler info: gnuc: 9.3
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash

Is there a workaround I could try?

I'm willing to help with debugging the problem or testing patches.
I'm not sure how long I'll be able to remain subscribed to this list
due to the traffic volume.

Other than that, gitk has been rock solid stable for me and I've been
using it for years. Thanks a lot for providing this great tool.

Tomek Mrugalski

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug report: gitk crashes on git commit with emoji (utf-8)
  2020-10-05 11:33 bug report: gitk crashes on git commit with emoji (utf-8) Tomek Mrugalski
@ 2020-10-11 11:47 ` Peter Oberndorfer
  2020-10-13  8:00   ` Tomek Mrugalski
  2020-10-11 12:32 ` Đoàn Trần Công Danh
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Oberndorfer @ 2020-10-11 11:47 UTC (permalink / raw)
  To: Tomek Mrugalski, git

On 05.10.20 13:33, Tomek Mrugalski wrote:
> Hi there,
> 
Hi Tomek,

> $ ~/devel-ssd/git/gitk-git/gitk
> X Error of failed request:  BadLength (poly request too large or
> internal Xlib length error)
>   Major opcode of failed request:  139 (RENDER)
>   Minor opcode of failed request:  20 (RenderAddGlyphs)
>   Serial number of failed request:  3065
>   Current serial number in output stream:  3148

> 
> Is there a workaround I could try?
> 
I managed to work around this problem
by installing the Ubuntu package 'fonts-symbola'.

Testing with your repository, the Emoji is still not displayed correctly
but gitk does not crash anymore.

This issue (and the workaround) seems to be tracked at
https://bugs.launchpad.net/ubuntu/+source/git/+bug/1852985

> I'm willing to help with debugging the problem or testing patches.
> I'm not sure how long I'll be able to remain subscribed to this list
> due to the traffic volume.
> 
> Other than that, gitk has been rock solid stable for me and I've been
> using it for years. Thanks a lot for providing this great tool.
> 
> Tomek Mrugalski
> 
Greetings Peter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug report: gitk crashes on git commit with emoji (utf-8)
  2020-10-05 11:33 bug report: gitk crashes on git commit with emoji (utf-8) Tomek Mrugalski
  2020-10-11 11:47 ` Peter Oberndorfer
@ 2020-10-11 12:32 ` Đoàn Trần Công Danh
  1 sibling, 0 replies; 4+ messages in thread
From: Đoàn Trần Công Danh @ 2020-10-11 12:32 UTC (permalink / raw)
  To: Tomek Mrugalski; +Cc: git

On 2020-10-05 13:33:02+0200, Tomek Mrugalski <tomasz.mrugalski@gmail.com> wrote:
> Hi there,
> 
> I'd like to report a bug in gitk. gitk crashes when trying to view a
> repository that has utf-8 chars in the commit comments.
> 
> System: Ubuntu 20.04
> Tested gitk versions:
> - 2.25 (the default in ubuntu 20.04),
> - 2.28 (installed from ppa:git-core/ppa),
> - latest (next branch, commit fdf196b9972337a0285dae59f904f62f989fbca8)
> 
> Steps to reproduce the issue:
> 
> I've isolated the commit in our repo that causes this problem and pushed
> it here: https://github.com/tomaszmrugalski/gitk-bug-emoji
> The repo is small (only 3 commits). The offending commit that seems to
> trigger this bug seems to be 3ad99781c449da3b1b42a098c4a820455050eb44.
> 
> git clone https://github.com/tomaszmrugalski/gitk-bug-emoji
> cd gitk-bug-emoji
> gitk
> 
> Actual behavior:
> 
> $ ~/devel-ssd/git/gitk-git/gitk
> X Error of failed request:  BadLength (poly request too large or
> internal Xlib length error)
>   Major opcode of failed request:  139 (RENDER)
>   Minor opcode of failed request:  20 (RenderAddGlyphs)
>   Serial number of failed request:  3065
>   Current serial number in output stream:  3148

This looks like a bug in libXft, multiple projects see this problem.
As far as I understand, gitk uses tk to render graphic, we couldn't do
anything with this problem.

Workaround: Don't install coloured-emoji font.

Thanks,
-- Danh

> 
> There is a window showing up for a split second (too fast to even
> notice its content), then it disappears and the aforementioned
> X Error is shown in the console.
> 
> I've tried removing ~/.config/git/gitk, but that didn't help.
> 
> Expected behavior:
> 
> gitk should not crash. The window should show the git history.
> 
> It's very much ok if gitk doesn't show the emoji, but it shouldn't
> crash. I've tried to look for existing bug reports, but couldn't find
> anything useful.
> 
> System info (as produced by git bugreport)
> git version:
> git version 2.28.0.1022.gfdf196b997
> cpu: x86_64
> built from commit: fdf196b9972337a0285dae59f904f62f989fbca8
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC
> 2020 x86_64
> compiler info: gnuc: 9.3
> libc info: glibc: 2.31
> $SHELL (typically, interactive shell): /bin/bash
> 
> The same error happens on earlier versions 2.25 and 2.28. Here's output
> from 2.28:
> 
> git version:
> git version 2.28.0
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC
> 2020 x86_64
> compiler info: gnuc: 9.3
> libc info: glibc: 2.31
> $SHELL (typically, interactive shell): /bin/bash
> 
> Is there a workaround I could try?
> 
> I'm willing to help with debugging the problem or testing patches.
> I'm not sure how long I'll be able to remain subscribed to this list
> due to the traffic volume.
> 
> Other than that, gitk has been rock solid stable for me and I've been
> using it for years. Thanks a lot for providing this great tool.
> 
> Tomek Mrugalski

-- 
Danh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug report: gitk crashes on git commit with emoji (utf-8)
  2020-10-11 11:47 ` Peter Oberndorfer
@ 2020-10-13  8:00   ` Tomek Mrugalski
  0 siblings, 0 replies; 4+ messages in thread
From: Tomek Mrugalski @ 2020-10-13  8:00 UTC (permalink / raw)
  To: Peter Oberndorfer, git

On 11.10.2020 13:47, Peter Oberndorfer wrote:
>> $ ~/devel-ssd/git/gitk-git/gitk X Error of failed request:
>> BadLength (poly request too large or internal Xlib length error) 
>> Major opcode of failed request:  139 (RENDER) Minor opcode of
>> failed request:  20 (RenderAddGlyphs) Serial number of failed
>> request:  3065 Current serial number in output stream:  3148
> 
>> Is there a workaround I could try?
>> 
> I managed to work around this problem by installing the Ubuntu
> package 'fonts-symbola'.
Hi Peter,

Yes, the workaround works on 2.28 on ubuntu 20.04.

> Testing with your repository, the Emoji is still not displayed
> correctly but gitk does not crash anymore.
> 
> This issue (and the workaround) seems to be tracked at 
> https://bugs.launchpad.net/ubuntu/+source/git/+bug/1852985
Uh, missed that. Thanks for the pointer.

Hmm. It seems this is very dependent on what kind of fonts are in the
system and the lib could crash. You may possibly consider implementing
some sort of --dont-display-utf8 option. Or perhaps waiting for the
xlib bug to be fixed is less involving option.

Anyway, I can again use gitk.

Thanks again for this great software.

Tomek

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-13  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 11:33 bug report: gitk crashes on git commit with emoji (utf-8) Tomek Mrugalski
2020-10-11 11:47 ` Peter Oberndorfer
2020-10-13  8:00   ` Tomek Mrugalski
2020-10-11 12:32 ` Đoàn Trần Công Danh

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git