rdoeffinger / Dictionary

"QuickDic" offline Dictionary App for Android. Provided downloadable dictionaries are based on Wiktionaries but can also be created from other sources (see DictionaryPC). Remember to use --recursive when cloning! Fork of project that used to be hosted at code.google.com/p/quickdic-dictionary.
Apache License 2.0
327 stars 69 forks source link

Choosing QuickDic in the text selection toolbar leads to "Invalid dictionary" error #145

Closed parcelcat closed 3 years ago

parcelcat commented 3 years ago

In version 5.5.9.114 (the first version supporting the Storage Access Framework), the following steps will produce an "Invalid dictionary" error:

  1. Select some text in a different app
  2. In the text selection toolbar, choose QuickDic

The list of dictionaries is shown, instead of the appropriate search in the default dictionary. A toast pops up with the measage

Invalid dictionary: file=, error=open failed: ENOENT (No such file or directory)

Sometimes, on a cold launch of QuickDic from the launcher, the list of dictionaries is shown instead of the word list for the default dictionary, and the same error toast appears.

This issue occurs regardless of whether I am using the default QuickDic dictionary directory, or a different directory. I am on Android 11, and QuickDic's storage permission is set to "Allow access to media only", which is the only available option other than "Deny".

Version 5.5.8.113 does not have this issue.

rdoeffinger commented 3 years ago

Thanks for reporting, I did not expect issues with that code path so did not test it. I could reproduce the issue, will look into a fix. For the time being you should be able to go back to a previous version.

rdoeffinger commented 3 years ago

Should be fixed in the new release.

parcelcat commented 3 years ago

Thank you!