Description of problem: [eduardo@metalheart ~]$ gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type `show copying' for details. *** buffer overflow detected ***: gnubg terminated Abortado (`core' generado) [eduardo@metalheart ~]$ rm -f .gnubg/gnubgautorc [eduardo@metalheart ~]$ gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type `show copying' for details. (No hay juego) set gui showids on (No hay juego) save settings (No hay juego) quit The game works fine. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Open gnubg first time, it works OK 2. Abandon the game, it creates a configuration file 3. Open gnubg another time, then it crashes and core dumped
Trying to reproduce this - I cannot! After installing gnubg: $ rpm -q gnubg gnubg-1.06.002-2.mga7 $ ls -al .gnubg ls: cannot access '.gnubg': No such file or directory [No gnupg files] Using MATE desktop. Started it first time, a new match, quit: $ gnubg GNU Backgammon 1.06.002 Sep 12 2018 ... as above (No game) set gui showids on (No game) save settings (No game) save settings (No game) new match 7 (lewis) quit (lewis) [lewis@localhost ~]$ $ ls -alR .gnubg [Yes, it did create its files] .gnubg: total 84 drwx------ 3 lewis lewis 4096 Aws 16 20:37 ./ drwxr-x--- 28 lewis lewis 4096 Aws 16 20:36 ../ drwx------ 2 lewis lewis 4096 Aws 16 20:36 backup/ -rw-rw-r-- 1 lewis lewis 60279 Aws 16 20:36 gnubgautorc ***** -rw-r--r-- 1 lewis lewis 5892 Aws 16 20:36 gnubgmenurc -rw------- 1 lewis lewis 64 Aws 16 20:37 history .gnubg/backup: total 8 drwx------ 2 lewis lewis 4096 Aws 16 20:36 ./ drwx------ 3 lewis lewis 4096 Aws 16 20:37 ../ Start another new match, then quit: $ gnubg GNU Backgammon 1.06.002 Sep 12 2018 ... as above (No game) set gui showids on (No game) save settings (No game) save settings (No game) new match 7 (lewis) quit (lewis) [lewis@localhost ~]$ [NO crash!] @Eduardo Can you please say: - What Mageia 7 ISO you installed from; - What Desktop you are using. [I can try with the same one] I think the fact that I saw 'Save settings' twice was due to starting a new match after launching the program.
CC: (none) => lewyssmithWhiteboard: (none) => NEEDINFO
Thanks for your questions for Eduardo, who'll hopefully reply soon, and for having tried to reproduce it, Lewis. I'm also wondering whether the issue could depend on the used language (Spanish for the reporter). CC'ing our registered gnubg maintainer, in case this report already rings a bell.
CC: (none) => dan, marja11Summary: gnubg crash (core dumped) if exist ~/.gnubg/gnubgautorc file => gnubg crash (core dumped) if exist ~/.gnubg/gnubgautorc file (Spanish install)
(In reply to Lewis Smith from comment #1) > Trying to reproduce this - I cannot! After installing gnubg: > $ rpm -q gnubg > gnubg-1.06.002-2.mga7 > $ ls -al .gnubg > ls: cannot access '.gnubg': No such file or directory [No gnupg files] > Using MATE desktop. > > Started it first time, a new match, quit: > $ gnubg > GNU Backgammon 1.06.002 Sep 12 2018 > ... as above > (No game) set gui showids on > (No game) save settings > (No game) save settings > (No game) new match 7 > (lewis) quit > (lewis) [lewis@localhost ~]$ > > $ ls -alR .gnubg [Yes, it did create its files] > .gnubg: > total 84 > drwx------ 3 lewis lewis 4096 Aws 16 20:37 ./ > drwxr-x--- 28 lewis lewis 4096 Aws 16 20:36 ../ > drwx------ 2 lewis lewis 4096 Aws 16 20:36 backup/ > -rw-rw-r-- 1 lewis lewis 60279 Aws 16 20:36 gnubgautorc ***** > -rw-r--r-- 1 lewis lewis 5892 Aws 16 20:36 gnubgmenurc > -rw------- 1 lewis lewis 64 Aws 16 20:37 history > .gnubg/backup: > total 8 > drwx------ 2 lewis lewis 4096 Aws 16 20:36 ./ > drwx------ 3 lewis lewis 4096 Aws 16 20:37 ../ > > Start another new match, then quit: > $ gnubg > GNU Backgammon 1.06.002 Sep 12 2018 > ... as above > (No game) set gui showids on > (No game) save settings > (No game) save settings > (No game) new match 7 > (lewis) quit > (lewis) [lewis@localhost ~]$ [NO crash!] > > @Eduardo Can you please say: > - What Mageia 7 ISO you installed from; > - What Desktop you are using. [I can try with the same one] > I think the fact that I saw 'Save settings' twice was due to starting a new > match after launching the program. I upgrade online from Mageia 6 and in a virtualbox DVD classic instalation. Mate, KDE/Plasma and Gnome. I don't understand the last sentence. I need always remove .gnubg/gnubgautorc file to open gnubg.
@ danf Assigning to you, anyway, since BugSquad lacks time to try to get more details. Sorry about that!
Whiteboard: NEEDINFO => (none)Assignee: bugsquad => dan
I reproduce this bug, in MGA 7 (upgraded from MGA 6) i586 Xfce First time (works) gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type `show copying' for details. Fontconfig warning: ignoring LC_CTYPE=es_MX.UTF-8;LC_NUMERIC=es_MX.UTF-8;LC_TIME=es_MX.UTF-8;LC_COLLATE=es_MX.UTF-8;LC_MONETARY=es_MX.UTF-8;LC_MESSAGES=es_MX.utf8;LC_PAPER=es_MX.UTF-8;LC_NAME=es_MX.UTF-8;LC_ADDRESS=es_MX.UTF-8;LC_TELEPHONE=es_MX.UTF-8;LC_MEASUREMENT=es_MX.UTF-8;LC_IDENTIFICATION=es_MX.UTF-8: not a valid region tag (No hay juego) set gui showids on (No hay juego) save settings (No hay juego) Second Time (Fail) gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type `show copying' for details. Fontconfig warning: ignoring LC_CTYPE=es_MX.UTF-8;LC_NUMERIC=es_MX.UTF-8;LC_TIME=es_MX.UTF-8;LC_COLLATE=es_MX.UTF-8;LC_MONETARY=es_MX.UTF-8;LC_MESSAGES=es_MX.utf8;LC_PAPER=es_MX.UTF-8;LC_NAME=es_MX.UTF-8;LC_ADDRESS=es_MX.UTF-8;LC_TELEPHONE=es_MX.UTF-8;LC_MEASUREMENT=es_MX.UTF-8;LC_IDENTIFICATION=es_MX.UTF-8: not a valid region tag *** buffer overflow detected ***: gnubg terminated Abortado (`core' generado) Third time LC_ALL=C gnubg (Works) GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type `show copying' for details. (No game) set gui showids on (No game) save settings (No game) As the user report in blogdrake (http://blogdrake.net/node/26767) is a issue for spanish locales
This problem is fixed in gnubg-1.06.002-2.1.mga7 in updates_testing, as well as gnubg-1.06.002-6.mga8 in Cauldron. For QA testers: the crash can be seen in the old version with this command: LANGUAGE=es gnubg which will result in the program crashing with this message: *** buffer overflow detected ***: gnubg terminated Aborted (core dumped) The fixed version will run the game normally in Spanish with that command. Here's a suggested text for an update advisory: A bug that caused GNU Backgammon to crash on startup when the Spanish language was in use has been fixed.
Assignee: dan => qa-bugsWhiteboard: (none) => has_procedureStatus: NEW => ASSIGNED
Unable to reproduce this for the core release version gnubg-1.06.002-2.mga7' $ LANGUAGE=es gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. Copyright (C) 2018 by Gary Wong and the AUTHORS; for details type `show version'. .... <The backgammon board appears - looks normal> $ ls .gnubg backup/ gnubgautorc gnubgmenurc history $ LANGUAGE=es gnubg GNU Backgammon 1.06.002 Sep 12 2018 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 by Gary Wong. .... (No game) set gui showids on (No game) save settings (No game) It works every time, with or without locale specification, in an English environment. Do you have to start with a Spanish environment?
CC: (none) => tarazed25
I was able to reproduce the problem with that command-line from an English locale. However, I do have locales-es-2.29-3.mga7 installed on this system. Perhaps it's necessary to have that installed as well?
This is very strange. $ rm -rf .gnubg After installing locales-es and logging out and in: $ LANGUAGE=es gnubg OK, configuration files created. $ LANGUAGE=es gnubg Still OK. There must be some other variable as well. I am appending a copy of printenv output just in case it might be of use. Too much information really.
Created attachment 11561 [details] User environment settings - english locale
Is the UI showing in Spanish for you when you run that? The buffer overflow happens when Spanish text is copied into a too-small buffer, so if it's in Spanish, the buffer overflow will be happening. It could be that the problem is only detected at run-time in x86_64 and therefore you it doesn't result in a crash on i586. You could try installing valgrind and running "LANGUAGE=es valgrind /usr/bin/gnubg" and see if that shows the problem. valgrind shows a couple of problems on exit even on a patched gnubg, so you can ignore those; a problem would cause a crash before the UI is even displayed.
No, the UI appears in English, which was already a sign that there is more to changing the locale than I know. Running under valgrind did not expose any fault regarding buffer overrun so I shall have to look into this locale business first. Tomorrow I guess.
Tried drakconf (MCC) managing locale settings, logged out and selected European Spanish from the drop-down menu and logged in. Nada, everything in English still, including the backgammon UI. This is a tough nut to crack - googling reveals that other Mageia users have had trouble with it. It is certainly something that QA should be able to do in general. $ rpm -qa | grep -e locale -e l10n kate-l10n-common-19.04.0-1.mga7 locales-en-2.29-3.mga7 locales-2.29-3.mga7 lib64boost_locale1.68.0-1.68.0-4.mga7 locales-es-2.29-3.mga7 $ export LANGUAGE="es_ES.UTF-8" $ export LC_ALL= $ gnubg No help and nothing in the settings menu for language. The gnubgautorc file starts with 'set lang system' and recommends using gnubgrc to add settings. This has no effect on the language used: $ gnubg --lang="es_ES.UTF-8" Nor: $ gnubg --lang=es Creating a gnubgrc file with the entry: set lang es_ES.UTF-8 successfully modifies the gnubgautorc file when gnubg is run but does not affect the UI on first or subsequent invocations.
Correction - using utf8 encodings. .UTF-8 was being rejected by the C library. Experimented with US Spanish as well. Nothing "takes".
Should have said that all this has been done on an x86_64 machine. Using Plasma rather than Mate makes no difference - there was a small chance that KDE might handle locales better, but no. MageiaWelcome does come up entirely in Spanish without any prompting. Back in Mate, locale set as es_ES.utf8, the desktop is still English and running gnubg with language es still shows English. Just as an experiment, with the Spanish locale set, tried a local build of gnubg and installed it. Now that launches in Spanish but is no use as a test because the build repository supplies the updated version (don't know how to extract previous version - forgotten actually) and in any case is a private build. What it does seem to show is that locales cannot be set reliably on the fly. They work in the build environment but not for already packaged applications in another language, like English. And all that is irrelevant to the bug. More like a problem with i18n or something else. I think QA is going to have to push this without the reproducer once the update is tested. ?
Are the Spanish translations actually installed in your system? urpmi won't normally install translations for languages that you didn't enable during install. Does "ls -l /usr/share/locale/es/LC_MESSAGES/gnubg.mo' Show the file?
This is the n'th Spanish-related bug we have, and we are not alone. Despite the apparent irrelevence of what follows, it *has* been known to fix similar obscure issues: $ urpmi ibus-gtk No harm if it does nothing. Do not know whether you need to re-boot for it to apply. I would.
It looks like the installed languages is taken from %_install_langs in /etc/rpm/macros
@Dan, comment 16 $ ls -l /usr/share/locale/es/LC_MESSAGES/gnubg.mo -rw-r--r-- 1 root root 183289 ago 2 2018 /usr/share/locale/es/LC_MESSAGES/gnubg.mo As to enabling languages at installation time - I did not know it was possible to build a multilingual system. I just select British English. I shall keep a closer eye on choices when setting up the workstation. @Lewis, comment 17. Not all that irrelevant... "The Intelligent Input Bus (IBus) is an input method framework for multilingual input in Unix-like operating systems. It's called "Bus" because it has a bus-like architecture. You can use IBus to type in your own language in most GUI applications."
Yes, ibus-gtk was already installed.
Revisiting this. Cleared out gnubg related files and reinstalled from Core Release. $ rpm -qa | grep gnubg gnubg-1.06.002-2.mga7 lcl@difda:~ $ ll .gnubg total 76 drwx------ 2 lcl lcl 4096 mar 22 11:30 backup/ -rw-r--r-- 1 lcl lcl 60275 mar 22 11:50 gnubgautorc -rw-r--r-- 1 lcl lcl 5892 mar 22 11:50 gnubgmenurc -rw------- 1 lcl lcl 198 mar 22 11:51 history $ rm -rf .gnubg $ LANG=es gnubg GNU Backgammon 1.06.002 Sep 12 2018 [...] (No hay juego) set gui showids on (No hay juego) save settings (No hay juego) Reprise: $ LANG=es gnubg GNU Backgammon 1.06.002 Sep 12 2018 [...] *** buffer overflow detected ***: gnubg terminated Aborted (core dumped) Bug is reproduced. Updated gnubg from Testing. $ rm -rf .gnubg $ LANG=es gnubg <Worked OK - UI in Spanish> (No hay juego) set gui showids on (No hay juego) save settings (No hay juego) $ $ LANG=es gnubg <Still works as expected>
Whiteboard: has_procedure => has_procedure MGA7-64-OK
Thanks for the perseverance!
Validating.
CC: (none) => andrewsfarm, sysadmin-bugsKeywords: (none) => validated_update
CC: (none) => davidwhodginsKeywords: (none) => advisory
An update for this issue has been pushed to the Mageia Updates repository. https://advisories.mageia.org/MGAA-2020-0084.html
Resolution: (none) => FIXEDStatus: ASSIGNED => RESOLVED