Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#8127 closed defect (fixed)

Write cannot handle Composed characters

Reported by: sayamindu Owned by: kimquirk
Priority: high Milestone: 8.2.0 (was Update.2)
Component: security Version: Development build as of this date
Keywords: blocks:8.2.0 Cc: gregorio, mstone
Blocked By: Blocking:
Deployments affected: Action Needed: finalize
Verified: no

Description

Steps to reproduce

  1. Install Joyride 2330 in a laptop
  2. Edit /etc/sysconfig/keyboard to look like
    KEYTABLE="us"
    XKB_MODEL="olpc"
    XKB_LAYOUT="us,et"
    XKB_VARIANT="olpc2,basic"
    
  3. Set /home/olpc/.i18n to am_ET.UTF-8
  4. Restart sugar
  5. Start Write
  6. Press the switch layout key (if it is a G1G1 variety, the division/multiplication key below the enter key is a substitute)
  7. Type the sequence u h (no spaces in between)

Actual result: An unicode box character, followed by ሀ comes up

Expected result: The character ሁ should appear

To see the expected result, repeat this in the mesh search bar in the sugar screen.

Attachments (1)

8127_rainbow.patch (556 bytes) - added by sayamindu 6 years ago.
Patch which makes _get_lang() return xx_XX.YYY instead of "xx_XX.YYY"

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by gregorio

  • Cc gregorio added
  • Milestone changed from Not Triaged to 8.2.0 (was Update.2)

Hi Sayamindu,

Is this something which will affect users?

I set the milestone to 8.2 but no blockers status yet. We can call it a blocker if you show that it affects real users in nnnn language.

Thanks,

Greg S

comment:2 Changed 6 years ago by sayamindu

  • Cc mstone added

This affects real users of the Amharic language, who will not be able to type in certain characters using Write.
It may be the result of some interaction problems with Rainbow and Write, since removing /etc/olpc-security and restarting sugar solves the issue.

m_stone: any ideas on what may be wrong ?

comment:3 Changed 6 years ago by sayamindu

Note:

I created a simple VTE based terminal from Pippy (running under isolation), and started Write from it with the command sugar-launch write, and it seemed to work fine.

comment:4 Changed 6 years ago by sayamindu

  • Action Needed changed from never set to diagnose
  • Keywords blocks?:8.2.0 added

comment:5 Changed 6 years ago by sayamindu

  • Component changed from write-activity (abiword) to security
  • Keywords blocks?:8.2.0 removed
  • Milestone changed from 8.2.0 (was Update.2) to 8.2.1
  • Owner changed from uwog to mstone

It seems to be a regression from Update.1, and seems to be a rainbow specific issue.

However, since Ethiopia has chosen to go with Update.1, I'm rescheduling this for 8.2.1.

comment:6 Changed 6 years ago by kimquirk

in build 8.2-760, by typing u followed by h in the search bar I get a character like the one on the 'h' key (sort of like mu), with an added a small hyphen.

In Write, when I type u I get the small box with FE on top and 75 below, then i add the 'h' and half the box goes away and is replaced by the mu character.

This testing was done on an actual Amharic keyboard from quanta.

comment:7 Changed 6 years ago by sayamindu

Setting environRAINBOW_STRACE_LOG? = '1' in activityfactory.py makes the problem goes away. Also did a os.system('sugar-launch write') from pippy, which worked.

comment:8 Changed 6 years ago by sayamindu

This definitely looks like some kind of race condition to me. I attached to the rainbow process with strace (used the -f option to follow forks), and noticed that under normal circumstances, the iso8859-1 Compose file was getting loaded. This indicates that X is getting the locale as 'C', and not as am_ET.UTF-8.
Maybe the time overhead with $RAINBOW_STRACE_LOG = '1' is causing the normal loser to win the race ?

Changed 6 years ago by sayamindu

Patch which makes _get_lang() return xx_XX.YYY instead of "xx_XX.YYY"

comment:9 Changed 6 years ago by sayamindu

  • Keywords r- added

Attached the fix. It turns out that _get_lang() in Rainbow class in service.py was returning "nn_NN-XXX" where it should have returned nn_NN-XXX (no quotes). This was causing setlocale() (I think which is called from somewhere deep within gtk_init()) to bomb silently.

This also seems to fix the issue where the Ethiopian keyboard was producing garbage in Write unless the font was being set explicitly. This was also being seen in #2207

Please review this patch, and I think it makes sense if this goes into 8.2.0

comment:10 Changed 6 years ago by mstone

  • Action Needed changed from diagnose to add to build
  • Keywords blocks?:8.2.0 added; localization r- removed
  • Milestone changed from 8.2.1 to 8.2.0 (was Update.2)

Merged and built as rainbow-0.7.23-1.fc9.

comment:11 Changed 6 years ago by mstone

I found a second bug in the function in _get_lang() function which I have corrected and tested in rainbow-0.7.24-1.fc9. Please include this NVR instead of -23.

comment:12 Changed 6 years ago by mstone

  • Action Needed changed from add to build to add to release

comment:13 Changed 6 years ago by mstone

  • Keywords blocks:8.2.0 added; blocks?:8.2.0 removed

We need to be able to enter composed characters in Write. Upgrading this to 'blocks:'

comment:14 Changed 6 years ago by cscott

Test case, please.

comment:15 Changed 6 years ago by sayamindu

|Test Case|

  1. Edit /etc/sysconfig/keyboard to look like
    KEYTABLE="us"
    XKB_MODEL="olpc"
    XKB_LAYOUT="us,et"
    XKB_VARIANT="olpc2,basic"
    
  1. Set /home/olpc/.i18n to am_ET.UTF-8
  1. Restart sugar
  1. Start Write
  1. Press the switch layout key (if it is a G1G1 variety, the division/multiplication key below the enter key is a substitute)
  1. Choose the Abyssinica SIL font (this is not required, but just to be safe)
  1. Type the sequence u h (no spaces in between) in a text object

Expected result: The character ሁ should appear

comment:16 Changed 6 years ago by sayamindu

Re my previous comment, replace the phrase "in a text object" by "in write". I should really go to sleep :-)

comment:17 Changed 6 years ago by cscott

  • Action Needed changed from add to release to test in release

Please test build 761 resulting from build-repo commit 9cbb2d4a.

comment:18 Changed 6 years ago by mchua

  • Owner changed from mstone to kimquirk

assigning i18n bugs to kimquirk to test as per kim's request

comment:19 Changed 6 years ago by sayamindu

  • Action Needed changed from test in release to finalize

Works in release 8.2-761 and above.

comment:20 Changed 6 years ago by gregorio

  • Resolution set to fixed
  • Status changed from new to closed

Closed with no doc needed. GS

Note: See TracTickets for help on using tickets.