Skip to content

Crash in voice message #2097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
quazgar opened this issue May 4, 2025 · 1 comment · Fixed by #2098
Closed

Crash in voice message #2097

quazgar opened this issue May 4, 2025 · 1 comment · Fixed by #2098
Labels
potential bug A bug that could not (yet) be reproduced

Comments

@quazgar
Copy link
Contributor

quazgar commented May 4, 2025

Describe the bug

There is a crash when formatting the voice message with some settings/language combinations.

To Reproduce

  1. In the speech announcement settings:
  • Disable "Distance/speed unit"
  1. Set the language to German (and probably some other languages as well, see below.
  2. Run/walk long enough to trigger a speech announcement.
  3. You will get this crash:
### App information
* ID: de.dennisguse.opentracks
* Version: 6102 v4.19.0irreproducible

### Device information
* Brand: SHIFT
* Device: axolotl
* Model: SHIFT6mq
* Id: QSV1.210329.038
* Product: axolotl

### Firmware
* SDK: 29
* Release: 10
* Incremental: 20231025

### Cause of error
```java
Exception in thread "main": java.lang.IllegalArgumentException: Missing 'other' keyword in plural pattern in "{n, plural, =1 {1 }  ..."
	at android.icu.text.MessagePattern.parsePluralOrSelectStyle(MessagePattern.java:1157)
	at android.icu.text.MessagePattern.parseArg(MessagePattern.java:1041)
	at android.icu.text.MessagePattern.parseMessage(MessagePattern.java:924)
	at android.icu.text.MessagePattern.parse(MessagePattern.java:179)
	at android.icu.text.MessagePattern.<init>(MessagePattern.java:165)
	at android.icu.text.MessageFormat.applyPattern(MessageFormat.java:447)
	at android.icu.text.MessageFormat.<init>(MessageFormat.java:352)
	at android.icu.text.MessageFormat.format(MessageFormat.java:992)
	at de.dennisguse.opentracks.services.announcement.VoiceAnnouncementUtils.createStatistics(VoiceAnnouncementUtils.java:107)
	at de.dennisguse.opentracks.services.announcement.VoiceAnnouncementManager.createAnnouncement(VoiceAnnouncementManager.java:159)
	at de.dennisguse.opentracks.services.announcement.VoiceAnnouncementManager.announceStatisticsIfNeeded(VoiceAnnouncementManager.java:139)
	at de.dennisguse.opentracks.services.TrackRecordingService.updateRecordingDataWhileRecording(TrackRecordingService.java:320)
	at de.dennisguse.opentracks.services.TrackRecordingService.-$$Nest$mupdateRecordingDataWhileRecording(Unknown Source:0)
	at de.dennisguse.opentracks.services.TrackRecordingService$1.run(TrackRecordingService.java:81)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7400)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Screenshot of the settings:

Image

Most likely cause

In the string voiceDistance, the template formula {n, plural =1 {1 } other {{n,number,#.0}}}, other was translated to anderes in German, which is plausible, but of course wrong here.

A short grep for voiceDistance" shows that likely there is the same error for some other languages as well:

Image

  • fr
  • ga (some variables were also translated)
  • ta (same)

Searching for iolra and பன்மை shows a lot more translations with probable problems.

Technical information

  • Device: ShiftPhone 6mq, and emulation with SDK-29
  • OS: any?
  • OpenTracks version: latest main branch (4.19.1)
  • OpenTracks commit id: 71f1049
@quazgar quazgar added the potential bug A bug that could not (yet) be reproduced label May 4, 2025
quazgar added a commit to quazgar/OpenTracks that referenced this issue May 4, 2025
@dennisguse
Copy link
Member

Released as v4.19.2

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug A bug that could not (yet) be reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants