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

"No instance found active" in first several runs #51

Open
Iey4iej3 opened this issue Oct 22, 2019 · 0 comments
Open

"No instance found active" in first several runs #51

Iey4iej3 opened this issue Oct 22, 2019 · 0 comments

Comments

@Iey4iej3
Copy link

Iey4iej3 commented Oct 22, 2019

I refer to this post for a background, especially a filtered logcat.

MozillaNlpBackend version 1.4.0 with microG version 0.2.8.17785-4 (06c8b76)

When Mozilla Nlp backend is (firstly) enabled in UnifiedNlp, there are messages in logcat: IchnaeaBackendService: No instance found active. The backend gives the location only after a long period and maybe the repeated re-enablings are also necessary.

After searching in codes, I found that the only place to print this message is in the member function reloadInstanceSettings() when instance == null. Note that

  1. instance is a private static variable which is written only by protected member functions onOpen() and onClose(), as far as I understand.
  2. reloadInstanceSettings() is a public member function. However, among member functions, only onCreate() calls it.

This seems to be illogical. The instance could only be set to a non-null value by onOpen(). That is to say, every call to onCreate() would have failed with No instance found active. before the first call of onOpen() - this is a plausible reason why Ichnaea does not work once enabled in UnifiedNlp. Other backends do not share a similar issue under the same circumstance. Especially if we compare the code onCreate() here and that in Apple WiFi Nlp Backend, we see that onCreate() there does not check any analog of instance.

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