Opened 5 years ago

Closed 5 years ago

#1331 closed defect/bug (fixed)

Coordinates in internal GUI get clipped on Android Lollipop

Reported by: mvglasow (2) Owned by: cp15
Priority: major Milestone:
Component: port/android Version: git master
Severity: normal Keywords: gui, internal, display, string
Cc:

Description

After upgrading from Android KitKat? to Lollipop, I notice that wherever coordinates are displayed by the internal GUI, they get clipped. For example, on Linux (as well as Android KitKat? and earlier) the map position in the menu will show something like

51°45'24" N
19°30'23" E

while on Android Lollipop this becomes

51

This affects not only menu items but also dialogs (e.g. when picking a town in Search).

I've observed this on R6297, as well as an earlier version (just after the HighFive? merge and still before the switch to SVN). Since this issue affects only the latest Android version, it's likely that it was there all the time and we just never noticed it before.

Change History (3)

comment:1 Changed 5 years ago by mvglasow (2)

Seems the error is right in coordinates_geo() (the function which converts coordinates to a printable string) in gui_internal_command.c. On Lollipop, the string gets truncated at the first degree sign and strlen() returns 2.

Oddly, though, when I use the degree sign in a bookmark, it is rendered correctly (though the double quotes used for seconds confuse the XML parser).

comment:2 Changed 5 years ago by mvglasow (2)

A brief test confirmed that Lollipop seems to treat any character > 127 as a terminator character wherever they occur in C format strings. Literal strings work as intended, though. Trying to pass the degree sign as an argument gives a <?> character in debug output and causes a crash when it is rendered.

comment:3 Changed 5 years ago by mvglasow (2)

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

I ended up coding around the limitations in g_strdup_printf() and instead using g_strjoin(). Merged with https://github.com/navit-gps/navit/pull/38

Note: See TracTickets for help on using tickets.