{"thread":{"id":"54348","subject":"bug report: gitk crashes on git commit with emoji (utf-8)","startedAt":"2020-10-05T11:33:09Z","lastAt":"2020-10-13T08:00:49Z","messageCount":4,"participants":["Tomek Mrugalski","Peter Oberndorfer","Đoàn Trần Công Danh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"406926","messageId":"1e06bde8-ae70-2653-5112-c97c9ee021da@gmail.com","threadId":"54348","inReplyTo":null,"subject":"bug report: gitk crashes on git commit with emoji (utf-8)","fromName":"Tomek Mrugalski","fromEmail":"tomasz.mrugalski@gmail.com","sentAt":"2020-10-05T11:33:02Z","receivedAt":"2020-10-05T11:33:09Z","isPatch":false,"sender":{"key":"tomasz.mrugalski@gmail.com","avatar":null},"body":"Hi there,\n\nI'd like to report a bug in gitk. gitk crashes when trying to view a\nrepository that has utf-8 chars in the commit comments.\n\nSystem: Ubuntu 20.04\nTested gitk versions:\n- 2.25 (the default in ubuntu 20.04),\n- 2.28 (installed from ppa:git-core/ppa),\n- latest (next branch, commit fdf196b9972337a0285dae59f904f62f989fbca8)\n\nSteps to reproduce the issue:\n\nI've isolated the commit in our repo that causes this problem and pushed\nit here: https://github.com/tomaszmrugalski/gitk-bug-emoji\nThe repo is small (only 3 commits). The offending commit that seems to\ntrigger this bug seems to be 3ad99781c449da3b1b42a098c4a820455050eb44.\n\ngit clone https://github.com/tomaszmrugalski/gitk-bug-emoji\ncd gitk-bug-emoji\ngitk\n\nActual behavior:\n\n$ ~/devel-ssd/git/gitk-git/gitk\nX Error of failed request:  BadLength (poly request too large or\ninternal Xlib length error)\n  Major opcode of failed request:  139 (RENDER)\n  Minor opcode of failed request:  20 (RenderAddGlyphs)\n  Serial number of failed request:  3065\n  Current serial number in output stream:  3148\n\nThere is a window showing up for a split second (too fast to even\nnotice its content), then it disappears and the aforementioned\nX Error is shown in the console.\n\nI've tried removing ~/.config/git/gitk, but that didn't help.\n\nExpected behavior:\n\ngitk should not crash. The window should show the git history.\n\nIt's very much ok if gitk doesn't show the emoji, but it shouldn't\ncrash. I've tried to look for existing bug reports, but couldn't find\nanything useful.\n\nSystem info (as produced by git bugreport)\ngit version:\ngit version 2.28.0.1022.gfdf196b997\ncpu: x86_64\nbuilt from commit: fdf196b9972337a0285dae59f904f62f989fbca8\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC\n2020 x86_64\ncompiler info: gnuc: 9.3\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): /bin/bash\n\nThe same error happens on earlier versions 2.25 and 2.28. Here's output\nfrom 2.28:\n\ngit version:\ngit version 2.28.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC\n2020 x86_64\ncompiler info: gnuc: 9.3\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): /bin/bash\n\nIs there a workaround I could try?\n\nI'm willing to help with debugging the problem or testing patches.\nI'm not sure how long I'll be able to remain subscribed to this list\ndue to the traffic volume.\n\nOther than that, gitk has been rock solid stable for me and I've been\nusing it for years. Thanks a lot for providing this great tool.\n\nTomek Mrugalski\n"},{"id":"407300","messageId":"3318fdd6-5709-1d3c-64d8-01d029803635@arcor.de","threadId":"54348","inReplyTo":"1e06bde8-ae70-2653-5112-c97c9ee021da@gmail.com","subject":"Re: bug report: gitk crashes on git commit with emoji (utf-8)","fromName":"Peter Oberndorfer","fromEmail":"kumbayo84@arcor.de","sentAt":"2020-10-11T11:47:17Z","receivedAt":"2020-10-11T11:56:34Z","isPatch":false,"sender":{"key":"kumbayo84@arcor.de","avatar":"https://avatars.githubusercontent.com/u/1041267?v=4"},"body":"On 05.10.20 13:33, Tomek Mrugalski wrote:\n> Hi there,\n> \nHi Tomek,\n\n> $ ~/devel-ssd/git/gitk-git/gitk\n> X Error of failed request:  BadLength (poly request too large or\n> internal Xlib length error)\n>   Major opcode of failed request:  139 (RENDER)\n>   Minor opcode of failed request:  20 (RenderAddGlyphs)\n>   Serial number of failed request:  3065\n>   Current serial number in output stream:  3148\n\n> \n> Is there a workaround I could try?\n> \nI managed to work around this problem\nby installing the Ubuntu package 'fonts-symbola'.\n\nTesting with your repository, the Emoji is still not displayed correctly\nbut gitk does not crash anymore.\n\nThis issue (and the workaround) seems to be tracked at\nhttps://bugs.launchpad.net/ubuntu/+source/git/+bug/1852985\n\n> I'm willing to help with debugging the problem or testing patches.\n> I'm not sure how long I'll be able to remain subscribed to this list\n> due to the traffic volume.\n> \n> Other than that, gitk has been rock solid stable for me and I've been\n> using it for years. Thanks a lot for providing this great tool.\n> \n> Tomek Mrugalski\n> \nGreetings Peter\n\n"},{"id":"407301","messageId":"20201011123251.GA26193@danh.dev","threadId":"54348","inReplyTo":"1e06bde8-ae70-2653-5112-c97c9ee021da@gmail.com","subject":"Re: bug report: gitk crashes on git commit with emoji (utf-8)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-10-11T12:32:51Z","receivedAt":"2020-10-11T12:32:56Z","isPatch":false,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-10-05 13:33:02+0200, Tomek Mrugalski <tomasz.mrugalski@gmail.com> wrote:\n> Hi there,\n> \n> I'd like to report a bug in gitk. gitk crashes when trying to view a\n> repository that has utf-8 chars in the commit comments.\n> \n> System: Ubuntu 20.04\n> Tested gitk versions:\n> - 2.25 (the default in ubuntu 20.04),\n> - 2.28 (installed from ppa:git-core/ppa),\n> - latest (next branch, commit fdf196b9972337a0285dae59f904f62f989fbca8)\n> \n> Steps to reproduce the issue:\n> \n> I've isolated the commit in our repo that causes this problem and pushed\n> it here: https://github.com/tomaszmrugalski/gitk-bug-emoji\n> The repo is small (only 3 commits). The offending commit that seems to\n> trigger this bug seems to be 3ad99781c449da3b1b42a098c4a820455050eb44.\n> \n> git clone https://github.com/tomaszmrugalski/gitk-bug-emoji\n> cd gitk-bug-emoji\n> gitk\n> \n> Actual behavior:\n> \n> $ ~/devel-ssd/git/gitk-git/gitk\n> X Error of failed request:  BadLength (poly request too large or\n> internal Xlib length error)\n>   Major opcode of failed request:  139 (RENDER)\n>   Minor opcode of failed request:  20 (RenderAddGlyphs)\n>   Serial number of failed request:  3065\n>   Current serial number in output stream:  3148\n\nThis looks like a bug in libXft, multiple projects see this problem.\nAs far as I understand, gitk uses tk to render graphic, we couldn't do\nanything with this problem.\n\nWorkaround: Don't install coloured-emoji font.\n\nThanks,\n-- Danh\n\n> \n> There is a window showing up for a split second (too fast to even\n> notice its content), then it disappears and the aforementioned\n> X Error is shown in the console.\n> \n> I've tried removing ~/.config/git/gitk, but that didn't help.\n> \n> Expected behavior:\n> \n> gitk should not crash. The window should show the git history.\n> \n> It's very much ok if gitk doesn't show the emoji, but it shouldn't\n> crash. I've tried to look for existing bug reports, but couldn't find\n> anything useful.\n> \n> System info (as produced by git bugreport)\n> git version:\n> git version 2.28.0.1022.gfdf196b997\n> cpu: x86_64\n> built from commit: fdf196b9972337a0285dae59f904f62f989fbca8\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC\n> 2020 x86_64\n> compiler info: gnuc: 9.3\n> libc info: glibc: 2.31\n> $SHELL (typically, interactive shell): /bin/bash\n> \n> The same error happens on earlier versions 2.25 and 2.28. Here's output\n> from 2.28:\n> \n> git version:\n> git version 2.28.0\n> cpu: x86_64\n> no commit associated with this build\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> uname: Linux 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC\n> 2020 x86_64\n> compiler info: gnuc: 9.3\n> libc info: glibc: 2.31\n> $SHELL (typically, interactive shell): /bin/bash\n> \n> Is there a workaround I could try?\n> \n> I'm willing to help with debugging the problem or testing patches.\n> I'm not sure how long I'll be able to remain subscribed to this list\n> due to the traffic volume.\n> \n> Other than that, gitk has been rock solid stable for me and I've been\n> using it for years. Thanks a lot for providing this great tool.\n> \n> Tomek Mrugalski\n\n-- \nDanh\n"},{"id":"407433","messageId":"13bc5c41-8989-5551-51ba-eec30b59900c@gmail.com","threadId":"54348","inReplyTo":"3318fdd6-5709-1d3c-64d8-01d029803635@arcor.de","subject":"Re: bug report: gitk crashes on git commit with emoji (utf-8)","fromName":"Tomek Mrugalski","fromEmail":"tomasz.mrugalski@gmail.com","sentAt":"2020-10-13T08:00:43Z","receivedAt":"2020-10-13T08:00:49Z","isPatch":false,"sender":{"key":"tomasz.mrugalski@gmail.com","avatar":null},"body":"On 11.10.2020 13:47, Peter Oberndorfer wrote:\n>> $ ~/devel-ssd/git/gitk-git/gitk X Error of failed request:\n>> BadLength (poly request too large or internal Xlib length error) \n>> Major opcode of failed request:  139 (RENDER) Minor opcode of\n>> failed request:  20 (RenderAddGlyphs) Serial number of failed\n>> request:  3065 Current serial number in output stream:  3148\n> \n>> Is there a workaround I could try?\n>> \n> I managed to work around this problem by installing the Ubuntu\n> package 'fonts-symbola'.\nHi Peter,\n\nYes, the workaround works on 2.28 on ubuntu 20.04.\n\n> Testing with your repository, the Emoji is still not displayed\n> correctly but gitk does not crash anymore.\n> \n> This issue (and the workaround) seems to be tracked at \n> https://bugs.launchpad.net/ubuntu/+source/git/+bug/1852985\nUh, missed that. Thanks for the pointer.\n\nHmm. It seems this is very dependent on what kind of fonts are in the\nsystem and the lib could crash. You may possibly consider implementing\nsome sort of --dont-display-utf8 option. Or perhaps waiting for the\nxlib bug to be fixed is less involving option.\n\nAnyway, I can again use gitk.\n\nThanks again for this great software.\n\nTomek\n"}]}