Skip to content
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

V111 problem - logging stops when using Hungarian locale #885

Closed
ghost opened this issue Jun 11, 2021 · 6 comments
Closed

V111 problem - logging stops when using Hungarian locale #885

ghost opened this issue Jun 11, 2021 · 6 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jun 11, 2021

Can't find position, not record. Nor with default settings. It worked perfectly and stabile v110.
IMG_20210612_173234

@mendhak
Copy link
Owner

mendhak commented Oct 30, 2021

I missed this one oops! That line there indicates some kind of error. You'd need to enable debug logging and have a look at the file to see what error is being thrown.

See: https://gpslogger.app/#troubleshooting

@ghost
Copy link
Author

ghost commented Oct 31, 2021

I created a debug file. From line 53?
debuglog.txt

@mendhak
Copy link
Owner

mendhak commented Oct 31, 2021

Got it! Here's the culprit.

java.util.UnknownFormatConversionException: Conversion = 'ó'
	at java.util.Formatter$FormatSpecifier.conversion(Formatter.java:2782) ~[na:0.0]
	at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2812) ~[na:0.0]
	at java.util.Formatter$FormatSpecifierParser.<init>(Formatter.java:2625) ~[na:0.0]
	at java.util.Formatter.parse(Formatter.java:2558) ~[na:0.0]
	at java.util.Formatter.format(Formatter.java:2505) ~[na:0.0]
	at java.util.Formatter.format(Formatter.java:2459) ~[na:0.0]
	at java.lang.String.format(String.java:2870) ~[na:0.0]
	at com.mendhak.gpslogger.common.Strings.getDescriptiveDurationString(Strings.java:99) ~[na:0.0]
	at com.mendhak.gpslogger.GpsLoggingService.getNotification(GpsLoggingService.java:507) ~[na:0.0]
	at com.mendhak.gpslogger.GpsLoggingService.showNotification(GpsLoggingService.java:565) ~[na:0.0]
	at com.mendhak.gpslogger.GpsLoggingService.onLocationChanged(GpsLoggingService.java:898) ~[na:0.0]
	at com.mendhak.gpslogger.GeneralLocationListener.onLocationChanged(GeneralLocationListener.java:72) ~[na:0.0]
	at android.location.LocationManager$LocationListenerTransport.acceptLocation(LocationManager.java:2742) ~[na:0.0]
	at android.location.LocationManager$LocationListenerTransport.lambda$enkW18B0WwpQkSIMmVChmQ2YwC8(Unknown Source:0) ~[na:0.0]
	at android.location.-$$Lambda$LocationManager$LocationListenerTransport$enkW18B0WwpQkSIMmVChmQ2YwC8.accept(Unknown Source:6) ~[na:0.0]
	at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:292) ~[na:0.0]
	at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201) ~[na:0.0]
	at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97) ~[na:0.0]
	at android.os.Handler.handleCallback(Handler.java:938) ~[na:0.0]
	at android.os.Handler.dispatchMessage(Handler.java:99) ~[na:0.0]
	at android.os.Looper.loop(Looper.java:236) ~[na:0.0]
	at android.app.ActivityThread.main(ActivityThread.java:7864) ~[na:0.0]
	at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620) ~[na:0.0]
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011) ~[na:0.0]

The problem is happening here,

descriptive = String.format(context.getString(R.string.time_hms_format),
String.valueOf(hours), String.valueOf(minutes), String.valueOf(seconds));

and I think it's because the string format is coming from here, the %s is missing.

<string name="time_hms_format" formatted="false">%ó %p %mp</string>

@mendhak mendhak changed the title V111 problem V111 problem - logging stops when using Hungarian locale Oct 31, 2021
@mendhak
Copy link
Owner

mendhak commented Oct 31, 2021

OK the fix is now pushed and I've tagged it as well so it should go in with the v119 release.

<string name="time_hms_format" formatted="false">%só %sp %smp</string>

@mendhak mendhak added this to the v119 milestone Oct 31, 2021
@ghost
Copy link
Author

ghost commented Oct 31, 2021

You were fast. I tried it. Works well. THX. Sorry for the translation error.

@mendhak
Copy link
Owner

mendhak commented Nov 11, 2021

v119 is now on F-Droid and in the releases. I'm going around and closing some issues.

@mendhak mendhak closed this as completed Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant