Created attachment 190785 [details] LO 24.2alpha0+ debug build minidump Steps: 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 2. Select a word 3. Tools > Translate... 4. Pick a language 5. Double-click on "OK" Result: crash (after closing the warnings if you experience bug 152706) Reproducibility might depend on how quick the operation is. Version: 7.5.8.2 (X86_64) / LibreOffice Community Build ID: f718d63693263970429a68f568db6046aaa9df01 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 3aca2d9776a871f15009a1aa70628ba3a03ee147 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded And since the feature was available with e20d2de7836da52dbf9e528d1043b1e188097bfd (tested with linux-64-7.5 bibisect repo). Reproduced with gen and gtk3 VCL plugins. Crash report for 7.5: https://crashreport.libreoffice.org/stats/crash_details/675fc47d-53ac-47b2-90a3-86e2353faddf Current debug build doesn't let me open Writer with --backtrace, so attached is a minidump.
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!