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

fix: add error handling and logging for file load crash issue #95

Merged
merged 2 commits into from
Nov 11, 2022

Conversation

liuyang1520
Copy link
Collaborator

Summary

This PR is to address the:

Fatal Exception: java.lang.IllegalArgumentException
Malformed \uxxxx encoding

image

So I think it might be the case that the user is running the app inside the Windows machine within the simulator, and have a customized storage configured with "\user" or "\uxxx" inside the path, then when the file system tries to get that file, it treats the \u as unicode. Note I tried to hack my Android Studio by providing a path containing "\u" when creating the properties file, but it automatically removed all backslashes.

Base on this and the lack of information to reproduce, this PR:

  • updates the code to not crash due to this error
  • adds loggings information if this case happens so we can understand this better

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@liuyang1520 liuyang1520 force-pushed the add-error-and-log-for-file-load-crash branch from 17d8235 to bb75f58 Compare November 10, 2022 03:37
@liuyang1520 liuyang1520 force-pushed the add-error-and-log-for-file-load-crash branch from bb75f58 to fc24b43 Compare November 10, 2022 03:46
Copy link
Contributor

@qingzhuozhen qingzhuozhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this, can you also fix the tests?

Copy link
Contributor

@yuhao900914 yuhao900914 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks good to me. Please fix the test.

@liuyang1520 liuyang1520 merged commit 640bc8e into main Nov 11, 2022
@liuyang1520 liuyang1520 deleted the add-error-and-log-for-file-load-crash branch November 11, 2022 01:05
github-actions bot pushed a commit that referenced this pull request Nov 11, 2022
## [1.5.1](v1.5.0...v1.5.1) (2022-11-11)

### Bug Fixes

* add error handling and logging for file load crash issue ([#95](#95)) ([640bc8e](640bc8e))
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

Successfully merging this pull request may close these issues.

5 participants