Bug 1018576

Summary: Yast fonts module crashes to open
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User cNsFFHOGnn <forgotten_cNsFFHOGnn>
Component: YaST2Assignee: Karl Eichwalder <ke>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: elchevive68, forgotten_cNsFFHOGnn, lnussel, mpluskal, pgajdos, sbrabec, slemke
Version: Leap 42.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 42.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST log file

Description Forgotten User cNsFFHOGnn 2017-01-06 15:57:47 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier: 

By openning Yast fonts module, an error message appears:
Internal error. Please report a bug report with logs.
Details: flag after width
Caller:  /usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'


Reproducible: Always

Steps to Reproduce:
1. Open Yast2 in graphical mode
2. Type root password
3. Open Fonts module



Log File: /var/log/YaST2/y2log

2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:942 reading /etc/sysconfig/fonts-config
2017-01-06 13:53:22 <2> opensuse(25784) [Interpreter] fonts/fonts-config-state.rb:453 Scripting agent sweeping
2017-01-06 13:53:22 <2> opensuse(25784) [scr] ScriptingAgent.cc(parseSingleConfigFile):172 Ignoring re-registration of path '.target'
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:944 read: fpl[sans]=,fpl[serif]=,fpl[monospace]=,search_metric_compatible=true,really_force_fpl=false,force_aa_off=false,force_aa_off_mono=false,force_ah_on=true,force_hintstyle=hintslight,embedded_bitmaps=false,all_ebl=true,ebl=,lcd_filter=lcddefault,subpixel_layout=vrgb
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:947 creating temporary default fontconfig in /tmp/yast-fonts-20170106-25784-1ewifyr
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:950 running dialog
2017-01-06 13:53:22 <3> opensuse(25784) [ui-wizard] YCPWizardCommandParser.cc(isCommand):217 Bad arguments for wizard command SetBackButtonLabel(string) : `SetBackButtonLabel (nil)
2017-01-06 13:53:22 <3> opensuse(25784) [ui-wizard] YCPWizardCommandParser.cc(parseAndExecute):104 Undefined wizard command: `SetBackButtonLabel (nil)
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YProperty.cc(contains):111 	THROW:    Property type mismatch: Label is type String, not Bool
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YProperty.cc(contains):111 
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YCP_UI.cc(ChangeWidget):728 	CAUGHT:   Property type mismatch: Label is type String, not Bool
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YCP_UI.cc(ChangeWidget):728 
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/Wizard.rb:1067 UI::ChangeWidget failed: UI::ChangeWidget( `id (`back), `Label, nil )
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/Wizard.rb:828 Unknown option `immediate in MenuButton widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in CheckBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in CheckBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [Ruby] yast/wfm.rb:229 Client call failed with 'flag after width' and backtrace ["/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'", "/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:325:in `graphic_match_preview'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:402:in `block in initialize_specimen_widget'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:372:in `each'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:372:in `initialize_specimen_widget'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/share/YaST2/modules/CWM.rb:351:in `block in initWidgets'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `block in foreach'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `each'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `foreach'", "/usr/share/YaST2/modules/CWM.rb:334:in `initWidgets'", "/usr/share/YaST2/modules/CWMTab.rb:102:in `TabInit'", "/usr/share/YaST2/modules/CWMTab.rb:211:in `InitNewTab'", "/usr/share/YaST2/modules/CWMTab.rb:227:in `Init'", "/usr/share/YaST2/modules/CWMTab.rb:283:in `InitWrapper'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/share/YaST2/modules/CWM.rb:351:in `block in initWidgets'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `block in foreach'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `each'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `foreach'", "/usr/share/YaST2/modules/CWM.rb:334:in `initWidgets'", "/usr/share/YaST2/modules/CWM.rb:798:in `Run'", "/usr/share/YaST2/modules/CWM.rb:991:in `ShowAndRun'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:951:in `run_dialog'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:56:in `run'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:50:in `run'", "/usr/share/YaST2/clients/fonts.rb:3:in `<top (required)>'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/wfm.rb:216:in `eval'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/wfm.rb:216:in `run_client'"]
2017-01-06 13:53:22 <3> opensuse(25784) [Ruby] yast/wfm.rb:250 Internal error. Please report a bug report with logs.
Details: flag after width
Caller:  /usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'
2017-01-06 13:53:22 <1> opensuse(25784) [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for YPushButton "OK" at 0x7f08402b7230 from function key F10
2017-01-06 13:53:28 <2> opensuse(25784) [qt-ui] YQUI.cc(qMessageHandler):731 <libqt-warning> QObject::killTimer: Timers cannot be stopped from another thread
2017-01-06 13:53:28 <2> opensuse(25784) [qt-ui] YQUI.cc(qMessageHandler):731 <libqt-warning> QObject::~QObject: Timers cannot be stopped from another thread
2017-01-06 13:53:28 <3> opensuse(25784) [ui] YUI.cc(~YUI):94 1 open dialogs left over
david@opensuse:~> 
david@opensuse:~> sudo tail /var/log/YaST2/y2log -n 30
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:942 reading /etc/sysconfig/fonts-config
2017-01-06 13:53:22 <2> opensuse(25784) [Interpreter] fonts/fonts-config-state.rb:453 Scripting agent sweeping
2017-01-06 13:53:22 <2> opensuse(25784) [scr] ScriptingAgent.cc(parseSingleConfigFile):172 Ignoring re-registration of path '.target'
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:944 read: fpl[sans]=,fpl[serif]=,fpl[monospace]=,search_metric_compatible=true,really_force_fpl=false,force_aa_off=false,force_aa_off_mono=false,force_ah_on=true,force_hintstyle=hintslight,embedded_bitmaps=false,all_ebl=true,ebl=,lcd_filter=lcddefault,subpixel_layout=vrgb
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:947 creating temporary default fontconfig in /tmp/yast-fonts-20170106-25784-1ewifyr
2017-01-06 13:53:22 <1> opensuse(25784) [Ruby] fonts/fonts-dialog.rb:950 running dialog
2017-01-06 13:53:22 <3> opensuse(25784) [ui-wizard] YCPWizardCommandParser.cc(isCommand):217 Bad arguments for wizard command SetBackButtonLabel(string) : `SetBackButtonLabel (nil)
2017-01-06 13:53:22 <3> opensuse(25784) [ui-wizard] YCPWizardCommandParser.cc(parseAndExecute):104 Undefined wizard command: `SetBackButtonLabel (nil)
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YProperty.cc(contains):111 	THROW:    Property type mismatch: Label is type String, not Bool
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YProperty.cc(contains):111 
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YCP_UI.cc(ChangeWidget):728 	CAUGHT:   Property type mismatch: Label is type String, not Bool
2017-01-06 13:53:22 <2> opensuse(25784) [ui] YCP_UI.cc(ChangeWidget):728 
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/Wizard.rb:1067 UI::ChangeWidget failed: UI::ChangeWidget( `id (`back), `Label, nil )
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/Wizard.rb:828 Unknown option `immediate in MenuButton widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in CheckBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in CheckBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [libycp] modules/CWMTab.rb:154 Unknown option `immediate in ComboBox widget
2017-01-06 13:53:22 <3> opensuse(25784) [Ruby] yast/wfm.rb:229 Client call failed with 'flag after width' and backtrace ["/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'", "/usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:325:in `graphic_match_preview'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:402:in `block in initialize_specimen_widget'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:372:in `each'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:372:in `initialize_specimen_widget'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/share/YaST2/modules/CWM.rb:351:in `block in initWidgets'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `block in foreach'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `each'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `foreach'", "/usr/share/YaST2/modules/CWM.rb:334:in `initWidgets'", "/usr/share/YaST2/modules/CWMTab.rb:102:in `TabInit'", "/usr/share/YaST2/modules/CWMTab.rb:211:in `InitNewTab'", "/usr/share/YaST2/modules/CWMTab.rb:227:in `Init'", "/usr/share/YaST2/modules/CWMTab.rb:283:in `InitWrapper'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/fun_ref.rb:33:in `call'", "/usr/share/YaST2/modules/CWM.rb:351:in `block in initWidgets'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `call'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:83:in `block in foreach'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `each'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/builtins.rb:82:in `foreach'", "/usr/share/YaST2/modules/CWM.rb:334:in `initWidgets'", "/usr/share/YaST2/modules/CWM.rb:798:in `Run'", "/usr/share/YaST2/modules/CWM.rb:991:in `ShowAndRun'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:951:in `run_dialog'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:56:in `run'", "/usr/share/YaST2/lib/fonts/fonts-dialog.rb:50:in `run'", "/usr/share/YaST2/clients/fonts.rb:3:in `<top (required)>'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/wfm.rb:216:in `eval'", "/usr/lib64/ruby/vendor_ruby/2.1.0/yast/wfm.rb:216:in `run_client'"]
2017-01-06 13:53:22 <3> opensuse(25784) [Ruby] yast/wfm.rb:250 Internal error. Please report a bug report with logs.
Details: flag after width
Caller:  /usr/lib64/ruby/gems/2.1.0/gems/fast_gettext-1.2.0/lib/fast_gettext/vendor/string.rb:70:in `%'
2017-01-06 13:53:22 <1> opensuse(25784) [ui] YPushButton.cc(setFunctionKey):202 Guessing button role YOKButton for YPushButton "OK" at 0x7f08402b7230 from function key F10
2017-01-06 13:53:28 <2> opensuse(25784) [qt-ui] YQUI.cc(qMessageHandler):731 <libqt-warning> QObject::killTimer: Timers cannot be stopped from another thread
2017-01-06 13:53:28 <2> opensuse(25784) [qt-ui] YQUI.cc(qMessageHandler):731 <libqt-warning> QObject::~QObject: Timers cannot be stopped from another thread
2017-01-06 13:53:28 <3> opensuse(25784) [ui] YUI.cc(~YUI):94 1 open dialogs left over
Comment 1 Forgotten User cNsFFHOGnn 2017-01-06 16:04:52 UTC
Created attachment 708928 [details]
YaST log file
Comment 2 Petr Gajdos 2017-01-09 10:30:05 UTC
I think I have work for cca two or three months currently on my table, no time for this one.
Comment 3 Petr Gajdos 2017-02-07 14:08:46 UTC
Just a quick look. It does not on my 42.2 fully patched system. What version of yast2-fonts do you have installed?
Comment 4 Petr Gajdos 2017-02-07 14:21:42 UTC
I have ruby2.1-rubygem-fast_gettext-0.9.2-6.3.x86_64 installed on my system, you seem to have higher version, not sure if that could case troubles.
Comment 5 Forgotten User cNsFFHOGnn 2017-02-07 20:41:52 UTC
Versions installed:
yast2-fonts: 3.1.17-4.1
ruby2.1-rubygem-fast_gettext-1_2: 1.2.0-1.1
ruby2.1-rubygem-fast_gettext: Not installed
ruby2.1-rubygem-fast_gettext-1_1: Not installed
Comment 6 Petr Gajdos 2017-02-15 10:56:16 UTC
Needinfo was provided.
Comment 7 Luiz Fernando Ranghetti 2017-02-18 03:05:59 UTC
Hi,

I see that the language used is pt_BR. I found an error in a translation which probably is the cause of this problem:

<p><b>Specimen for %s</b></p>  ->   <p><b>Espécie de %1 </b></p>

I fixed the wrong "%1" in Weblate:
https://l10n.opensuse.org/translate/yast-fonts/master/pt_BR/?sid=a0172bf4-f586-11e6-8772-525400a48651&offset=0


The same applies to bug 1021982 (https://bugzilla.opensuse.org/show_bug.cgi?id=1021982)
Comment 8 Sergio Rafael Lemke 2017-02-20 03:11:50 UTC
Hello,
I did and ugly 'on the fly' test and indeed this change fixes the problem:

Edited: vim /usr/share/YaST2/locale/pt_BR/LC_MESSAGES/fonts.mo

Changed:
<p><b>Espécie de %1 </b></p>
to
<p><b>Espécie de %s </b></p>

So that translation update fixes the segmentation fault.
Comment 9 Sergio Rafael Lemke 2017-02-20 03:13:10 UTC
*** Bug 1021982 has been marked as a duplicate of this bug. ***
Comment 10 Petr Gajdos 2017-02-20 07:38:08 UTC
Ah, learning occurred on my side.
Thank you for digging in!
Comment 11 Luiz Fernando Ranghetti 2017-02-20 12:41:42 UTC
Hi,

I'm wondering why Weblate didn't find this errors, as "%s" is a common variable in YaST, maybe we should add this check also. I'll open a bug about it. 

Regards
Comment 12 Petr Gajdos 2017-03-29 12:44:32 UTC
Karl,

could you please decide if we will do a maintenance update for yast2-trans [workaround exists].
Comment 13 Karl Eichwalder 2017-03-29 14:52:02 UTC
(In reply to Petr Gajdos from comment #12)

> could you please decide if we will do a maintenance update for yast2-trans
> [workaround exists].

If the workaround will prevent yast from crashing, we should do the maintenance update.  Of course, the workaround must be save, not introducing unrelated problems, etc. pp.
Comment 14 Petr Gajdos 2017-03-29 15:06:54 UTC
As I understand it, the fix from comment 8 is a real fix. By the workaround I mean 'using yast2 fonts under another locale'. You seem to maintain yast2-trans, that's why I leave decision to you.
Comment 15 Petr Gajdos 2017-03-29 15:09:27 UTC
Adding Stanislav to CC.
Comment 16 Stanislav Brabec 2017-03-29 15:16:20 UTC
It is possible to create an update with just a single fix. Or we can do a best attempt merge with the latest contents of Weblate, which possibly fixes some issues, but it also could possibly introduce some issues.

Comment 11: Weblate did not found the problem because pot file does not provide format information. Without that, "$1" or "%s" are considered as an ordinary sequence of characters. See bug 980329 for details.
Comment 17 Luiz Fernando Ranghetti 2017-03-29 19:02:11 UTC
Hi,

Couldn't we put some kind of quality checks for %s while Ruby is not supported by gettext?

https://docs.weblate.org/en/latest/admin/checks.html#writing-own-checks
Comment 18 Karl Eichwalder 2017-03-30 08:43:38 UTC
(In reply to Petr Gajdos from comment #14)
> As I understand it, the fix from comment 8 is a real fix. By the workaround
> I mean 'using yast2 fonts under another locale'. You seem to maintain
> yast2-trans, that's why I leave decision to you.

A package update would be ok for me.  Unfortunately, there does not seem to be an easy command to rebuild a suitable .tar with the fixed translation.

We now have a _service and are using git.  As long as nobody is able to tell the exact command sequence needed, I cannot submit the package update. Sad.
Comment 19 Ludwig Nussel 2017-03-30 09:20:24 UTC
Reopening as per discussion off-line.
I've created a branch "openSUSE-42_2" in the yast2-translations repo. I think the next step would be to add this branch as option to all yast modules in weblate. Then language translators can submit translations for 42.2 maintenance updates.
Stanislav could you configure that please?

Karl, in the _service file you need '<param name="revision">openSUSE-42_2</param>'
Comment 20 Stanislav Brabec 2017-03-30 13:48:21 UTC
OK, I can add yast-translations openSUSE-42_2 to Weblate.

It will mean adding of 97 new components.

I will use a script for that.
Comment 21 Tomáš Chvátal 2018-04-17 13:58:42 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.2 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug against that version (see the "Version"
component in the bug fields), or alternatively open
a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime