Bug 5429 - ThinLinc client crash when selecting read / write if running italian locale.
Summary: ThinLinc client crash when selecting read / write if running italian locale.
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: 4.3.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.4.0
Assignee: Pierre Ossman
URL:
Keywords: hean01_tester, prosaic
Depends on:
Blocks:
 
Reported: 2015-02-09 09:25 CET by Henrik Andersson
Modified: 2015-04-17 08:17 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2015-02-09 09:25:00 CET
The reason for this seems to be that the Italian translated string contains a slash wich fltk will interpret as submenu. With read/write will be a read menuitem with a submenu containing write menu item. When write is selected tlclient crashes.
Comment 1 Henrik Andersson cendio 2015-02-09 09:35:02 CET
Fixed in commit 29951
Comment 2 Henrik Andersson cendio 2015-02-09 10:22:39 CET
Reopened for further discussions.

Menu items have several special characters as;

  "The characters "&", "/", "\", and "_" are treated as special characters in the  
   label string. The "&" character specifies that the following character is an 
   accelerator and will be underlined. The "\" character is used to escape the 
   next character in the string. Labels starting with the "_" character cause a 
   divider to be placed after that menu item."

We need to handle those for translations so we don't get into this kind of troubles in future.

Possible solution is to subclass menu and escape string before added disabling the markup at all.
Comment 3 Henrik Andersson cendio 2015-02-09 10:24:27 CET
The actual crash is the following line:

   DrivesAdvancedWindow::inputs_to_browser (this=0x98ca90) at tlclient_advanced_options.cc:883

where export_modes_strings[data->mode] is null..
Comment 4 Pierre Ossman cendio 2015-02-20 10:51:11 CET
One issue here is if we should have "Read-Write" or "Read/Write". Proof by Google doesn't work as they strip delimiters when performing a search.

Grepping the transations on my local machine favours Read/Write heavily. But it is also used in the meaning "Read OR Write". Gnome seems to prefer to avoid the ambiguity altogether by specifying "Read and Write" where relevant.
Comment 5 Pierre Ossman cendio 2015-02-20 12:44:12 CET
tlclient.bin fixed in r30010. It has these menus:

 - The OS X application menu
 - Smart card selector
 - Local drive mode
 - Context menu key
Comment 6 Pierre Ossman cendio 2015-02-20 17:27:26 CET
TigerVNC fixed in 30017. It has the context menu, and the context menu key configuration in options.
Comment 7 Pierre Ossman cendio 2015-02-20 17:30:49 CET
Changed the phrasing to "Read and Write" in r30018.
Comment 8 Pierre Ossman cendio 2015-02-23 09:57:06 CET
Fl_Menu_ is even more broken than initial investigation showed. Need to look further into this.
Comment 9 Pierre Ossman cendio 2015-02-25 10:31:49 CET
New attempt for tlclient.bin in r30031.
Comment 10 Pierre Ossman cendio 2015-02-25 14:15:35 CET
vncviewer updated again in r30036.
Comment 11 Pierre Ossman cendio 2015-02-25 14:24:11 CET
Documentation updated in r30037.
Comment 12 Henrik Andersson cendio 2015-04-16 15:15:11 CEST
Regarding the choice of using "Read and Write" we should probably consistently be using it in the UI.

Export configuration has an optionstring "Not exported / Read Only / Read-Write" which probably should be "Not exported / Read Only / Read and Write"
Comment 13 Henrik Andersson cendio 2015-04-17 08:05:39 CEST
(In reply to comment #12)
> Regarding the choice of using "Read and Write" we should probably consistently
> be using it in the UI.
> 
> Export configuration has an optionstring "Not exported / Read Only /
> Read-Write" which probably should be "Not exported / Read Only / Read and
> Write"

This was a false positive, our pot still had the string but no code was referencing it...
Comment 14 Henrik Andersson cendio 2015-04-17 08:17:01 CEST
Verified using client build 4726.

 - Tested the escaping of string with special characters
 - Verified the rename of read/write to read and write


Looks good.

Note You need to log in before you can comment on or make changes to this bug.