Summary: | Crash when double-clicking DeepL translation dialog OK button | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Stéphane Guillou (stragu) <stephane.guillou> |
Component: | Writer | Assignee: | Julien Nabet <serval2412> |
Status: | VERIFIED FIXED | ||
Severity: | critical | CC: | merttumer, serval2412 |
Priority: | medium | Keywords: | haveBacktrace, implementationError |
Version: | 7.5.0.0 alpha0+ | ||
Hardware: | All | ||
OS: | Linux (All) | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=158159 | ||
Whiteboard: | target:24.2.0 target:7.6.4 | ||
Crash report or crash signature: | ["SwTranslateLangSelectDlg::LinkStubLangSelectTranslateHdl(void*, weld::Button&)"] | Regression By: | |
Bug Depends on: | |||
Bug Blocks: | 133092 | ||
Attachments: |
LO 24.2alpha0+ debug build minidump
bt |
Description
Stéphane Guillou (stragu)
2023-11-10 17:42:11 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this. 1. Turn on the DeepL translation feature (no need for a valid API URL or key to reproduce!): https://help.libreoffice.org/7.6/en-US/text/shared/optionen/translatetools.html => ok since I don't know DeepL servers, I let the boxes (API URL and Authentication key) empty 2. Select a word => ok 3. Tools > Translate... => The option is grayed, I can't select it. (In reply to Julien Nabet from comment #1) > => ok since I don't know DeepL servers, I let the boxes (API URL and > Authentication key) empty > [...] > => The option is grayed, I can't select it. It should become active if you put random characters in the fields Created attachment 190790 [details]
bt
Thank you for the feedback, I could reproduce the crash.
Now ok it's a crash but it's quite unexpected to double click on a "Ok" button. I gave a try with https://gerrit.libreoffice.org/c/core/+/159322 This totally confused me initially. It is not normal that a double click can cause a problem like this, otherwise we would have thousands of crashes everywhere. But I see why this one is different. LangSelectTranslateHdl calls SwTranslateHelper::TranslateDocumentCancellable and that calls Application::Yield() in a loop and that basically means that LibreOffice will look for events and handle them due to that loop so... When you double click, you get one click that calls LangSelectTranslateHdl, then execution is in TranslateDocumentCancellable and LibreOffice processes outstanding events because of the Yield(). The 2nd click is handled (while we have not yet exited TranslateDocumentCancellable and so not exited the 1st LangSelectTranslateHdl) and LangSelectTranslateHdl gets called again, so we have LangSelectTranslateHdl basically inside LangSelectTranslateHdl. The inside one then exits and "m_xDialog->response(RET_OK)" is called to destroy the dialog, and so we then return to the outer LangSelectTranslateHdl and it has been already destroyed so we crash. Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/79f92d09ec52f0777fc03ff1d057a11b45e73f6d tdf#158171: fix crash when double-clicking DeepL translation dialog OK button It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/45f5fe188769bdc220752841e6588f9c020672f8 tdf#158171: fix crash when double-clicking DeepL translation dialog OK button It will be available in 7.6.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Verified the fix in: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 79f92d09ec52f0777fc03ff1d057a11b45e73f6d CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Thank you both, Julien and Caolán! |