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
bug(common/models): Error in ModelCompositor.predict causes keyboard failure #5467
Comments
Sentry issue: KEYMAN-WEB-11 |
Sentry issue: KEYMAN-ANDROID-11F |
Sentry issue: KEYMAN-ANDROID-14Z |
Sentry issue: KEYMAN-ANDROID-GS |
Sentry issue: KEYMAN-ANDROID-14V |
Sentry issue: KEYMAN-ANDROID-128 |
Sentry issue: KEYMAN-ANDROID-142 |
Sentry issue: KEYMAN-ANDROID-GS |
Closest thing I can currently do for a repro: I built a temporary unit test for let languageProcessor = new LanguageProcessor();
languageProcessor.init();
let contextSource = new com.keyman.text.Mock("li", 2);
let transcription = contextSource.buildTranscriptionFrom(contextSource, null, null);
// This should break things.
transcription.alternates = [];
languageProcessor.loadModel(modelSpec).then(function() {
languageProcessor.predict(transcription).then(function(suggestions) {
assert.isOk(suggestions);
assert.equal(suggestions[0].displayAs, '«li»');
assert.equal(suggestions[0].transform.insert, ' ');
assert.equal(suggestions[1].displayAs, 'like');
assert.equal(suggestions[1].transform.insert, 'like ');
done();
}).catch(done);
}).catch(function() {
assert.fail("Unexpected model load failure");
done();
}); The result: Commenting out the line that "should break things" indeed unbreaks this temporary test case. So, the remaining question is... what's causing an empty |
Sentry Issue: KEYMAN-ANDROID-GS
The breadcrumb shows:
This was a little tricky to track down as we don't yet have good source visibility into the predictive text worker. I used the Chrome Web Inspector to view the blob in minified form, and there was only one reference to
sample
on line 170, which resolved toModelCompositor.predict
.So, we appear to be getting an error in
ModelCompositor.predict
- perhaps an empty array or malformed data?keyman/common/predictive-text/worker/model-compositor.ts
Lines 78 to 80 in 2b66926
Note that this error is occurring with various keyboards, including sil_euro_latin, and not just obolo_chwerty. I have linked related crash reports where I can find them.
The text was updated successfully, but these errors were encountered: