Summary: | app-editors/mousepad-0.5.2 "select all" broken on some arch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | David Duchesne <aether> |
Component: | Current packages | Assignee: | XFCE Team <xfce> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | gael, jstein, leio, mgorny, sam, xfce |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | https://gitlab.xfce.org/apps/mousepad/-/merge_requests/79 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge --info on core2/GCC9 system |
Description
David Duchesne
2021-02-23 14:36:00 UTC
Created attachment 688143 [details]
emerge --info on core2/GCC9 system
I have checked this on a core2 system, I have checked my aarch64 machines an a i686 machine. All work as expected, which would suggest a permissions issue with ~/.config/Mousepad (In reply to Jory A. Pratt from comment #2) > I have checked this on a core2 system, I have checked my aarch64 machines an > a i686 machine. All work as expected, which would suggest a permissions > issue with ~/.config/Mousepad Permissions were fine but I deleted ~/.config/Mousepad to start fresh anyway -> Issue persists. I tried also to create a new user with a fresh xfce profile, same issue. Then I put mousepad-0.5.1 in my localrepo and compiled it and it works fine again. So it seems mousepad-0.5.2, at least on my system and figueroa's system on the forum. (In reply to David Duchesne from comment #3) > (In reply to Jory A. Pratt from comment #2) > > I have checked this on a core2 system, I have checked my aarch64 machines an > > a i686 machine. All work as expected, which would suggest a permissions > > issue with ~/.config/Mousepad > > Permissions were fine but I deleted ~/.config/Mousepad to start fresh anyway > -> Issue persists. > I tried also to create a new user with a fresh xfce profile, same issue. > > Then I put mousepad-0.5.1 in my localrepo and compiled it and it works fine > again. So it seems mousepad-0.5.2, at least on my system and figueroa's > system on the forum. *So it seems mousepad-0.5.2 has an issue I confirm the existence of this bug. Newly installed Mousepad-0.5.2 no select-all. Downgraded to 0.5.1 via local repo, select-all works as normal. I'm on a stable, up-to-date, amd64 system. After some compile test, I found that the following commit is causing the issue on my amd64 / core2 system. https://gitlab.xfce.org/apps/mousepad/-/commit/5b3baf90cc6934d623042525e00f2648f6d3c6f4 The previous commit doesn't cause any issue (select all works) I reproduced this and narrowed it down to having glib-2.66.7 compiled with gcc-9.3.0 while gcc-10.2.0 produces a working library. The aforementioned commit switches to signalling glib for this bit of buffer management instead of doing it in-house. The symptom is such that if you first select any amount of text and then hit Ctrl+A, it deselects everything, as if glib is using null or only one position for both the beginning and end of the new selection, instead of using the beginning and end of the text. P.S. Normally, CFLAGS="-march=amdfam10 -O2 -pipe" so I tried the others: -O, -O1, -O2, -O3, -Ofast, -Og -> fail -Os, -O0 -> pass Thank you for your detailed research! Let's see what glib maintainers think of it. CC-ing toolchain in case they have any idea what could go wrong here. I think the code behaviour in that mousepad commit is just undefined behaviour. select-all signal takes a boolean parameter, that says if to select all or unselect all. If you don't pass it, it's probably undefined behaviour and it does whatever happens to be in some next bytes on signal emission data or something. https://developer.gnome.org/gtk3/stable/GtkTextView.html#GtkTextView-select-all They need to do g_signal_emit_by_name (window->active->textview, "select-all", TRUE); not g_signal_emit_by_name (window->active->textview, "select-all"); Thanks for the reply. I'll send a patch upstream. Let's wait if upstream replies, and then I'll backport it. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47ca700313a5a01e042d1308598b10e2fdc24af4 commit 47ca700313a5a01e042d1308598b10e2fdc24af4 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2021-03-01 13:12:55 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2021-03-01 13:15:09 +0000 app-editors/mousepad: Backport select-all fix Closes: https://bugs.gentoo.org/772245 Signed-off-by: Michał Górny <mgorny@gentoo.org> .../mousepad/files/mousepad-0.5.2-select-all.patch | 28 ++++++++++++++++++++++ ...sepad-0.5.2.ebuild => mousepad-0.5.2-r1.ebuild} | 4 ++++ ...sepad-0.5.3.ebuild => mousepad-0.5.3-r1.ebuild} | 4 ++++ 3 files changed, 36 insertions(+) oh, that is funny. Obviously I never expected 'select-all' handler to have its own power to select none. TIL:RTFD. Thanks! |