Skip to content

Fix crash caused by GoogleService#1067

Merged
tisfeng merged 1 commit intotisfeng:devfrom
wytsai7660:fix/crash
Jan 24, 2026
Merged

Fix crash caused by GoogleService#1067
tisfeng merged 1 commit intotisfeng:devfrom
wytsai7660:fix/crash

Conversation

@wytsai7660
Copy link
Copy Markdown
Contributor

Based on testing, setting General > Query Language > Language Detection to "Use Google language detection for optimization" causes a crash, which can be reproduced in both development and release builds. The error is Easydict/GoogleService+Translate.swift:220: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value.

This is caused by queryModel in GoogleService, which is an implicitly unwrapped optional. While it is typically set during the main translation flow (startQuery), it is not set (is nil) during standalone language detection (detectText -> webAppDetect).

Related Issues:

…p checks

`queryModel` in `GoogleService` is an implicitly unwrapped optional and can be `nil`.
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello wytsai7660, Thank you for your first PR contribution 🎉 wytsai7660

@wytsai7660 wytsai7660 mentioned this pull request Jan 22, 2026
6 tasks
Copy link
Copy Markdown
Owner

@tisfeng tisfeng left a comment

Choose a reason for hiding this comment

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

LGTM

@tisfeng tisfeng merged commit aebc320 into tisfeng:dev Jan 24, 2026
4 checks passed
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.

2 participants