[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 Caolán McNamara changed: What|Removed |Added Assignee|libreoffice-b...@lists.free |caol...@redhat.com |desktop.org | Status|NEW |ASSIGNED --- Comment #15 from Caolán McNamara --- I can reproduce under Linux after dnf install ibus-mozc ibus restart and selecting the mozc input method, and click to dismiss the input method menu/window and then ctrl+alt+c -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #14 from Caolán McNamara --- I can reproduce under windows however. In that case https://gerrit.libreoffice.org/c/core/+/146064 seems to work there to avoid the crash -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #13 from Julien Nabet --- (In reply to Caolán McNamara from comment #12) > "If you change your patch to use EndExtTextInputFlags::Complete, does it > still longer ignore the Ctrl-Alt-foo shortcut?" My patch does nothing for > me, ctrl+alt+whatever doesn't get delivered to libreoffice for me in either > case, presumably the IM has consumed it. But I wonder if it does do > something for those who can reproduce this under gtk. with: diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index e9127b23e659..0450e875330b 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -451,6 +451,9 @@ bool GtkSalFrame::doKeyCallback( guint state, bool bStopProcessingKey; if (bDown) { +if (aEvent.mnCode | KEY_MOD1) // tdf#152404 +EndExtTextInput(EndExtTextInputFlags::Complete); + bStopProcessingKey = CallCallbackExc(SalEvent::KeyInput, ); // #i46889# copy AlternateKeyCode handling from generic plugin if (!bStopProcessingKey) I got exactly the same crash: #0 0x7f2bb54b2c85 in std::__uniq_ptr_impl >::_M_ptr() const (this=0x8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:191 #1 0x7f2bb54b2c65 in std::unique_ptr >::get() const (this=0x8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:462 #2 0x7f2bb54f7595 in std::unique_ptr >::operator bool() const (this=0x8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:479 #3 0x7f2bb56d87a9 in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x55a686cd7140, nFlags=GetFocusFlags::NONE) at vcl/source/window/mouse.cxx:295 #4 0x7f2bb57a6de7 in vcl::Window::GrabFocus() (this=0x55a686cd7140) at vcl/source/window/window.cxx:2985 #5 0x7f2b8f982075 in SwPostItMgr::LayoutPostIts() (this=0x55a68588d080) at sw/source/uibase/docvw/PostItMgr.cxx:796 #6 0x7f2b8f98ce5f in SwPostItMgr::CalcHdl(void*) (this=0x55a68588d080) at sw/source/uibase/docvw/PostItMgr.cxx:2243 #7 0x7f2b8f97c08d in SwPostItMgr::LinkStubCalcHdl(void*, void*) (instance=0x55a68588d080, data=0x0) at sw/source/uibase/docvw/PostItMgr.cxx:2229 -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #12 from Caolán McNamara --- "If you change your patch to use EndExtTextInputFlags::Complete, does it still longer ignore the Ctrl-Alt-foo shortcut?" My patch does nothing for me, ctrl+alt+whatever doesn't get delivered to libreoffice for me in either case, presumably the IM has consumed it. But I wonder if it does do something for those who can reproduce this under gtk. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #11 from Patrick Luby --- (In reply to Caolán McNamara from comment #10) > "Without your patch, does Ctrl-Alt-foo commit or discard uncommitted text?" > In my case (out of the box F38 GNOME with whatever is the default IM I get > from setting, keyboard, input sources) it commits the preedit text and > LibreOffice doesn't receive the "foo". So it commits the text and the Ctrl-Alt-foo is ignored. On macOS, the Command-Option-foo does get dispatched after the text is committed. If you change your patch to use EndExtTextInputFlags::Complete, does it still longer ignore the Ctrl-Alt-foo shortcut? -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #10 from Caolán McNamara --- "Without your patch, does Ctrl-Alt-foo commit or discard uncommitted text?" In my case (out of the box F38 GNOME with whatever is the default IM I get from setting, keyboard, input sources) it commits the preedit text and LibreOffice doesn't receive the "foo". -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #9 from Patrick Luby --- (In reply to Caolán McNamara from comment #8) > Created attachment 184831 [details] > quick demo plausible fix > One question about your patch: the macOS code dispatches an EndExtTextInputFlags::Complete event and commits any uncommitted text when the Command key is pressed. On both macOS and Windows, selecting a menu item also commits any uncommitted text. Without your patch, does Ctrl-Alt-foo commit or discard uncommitted text? -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #8 from Caolán McNamara --- Created attachment 184831 --> https://bugs.documentfoundation.org/attachment.cgi?id=184831=edit quick demo plausible fix I can't reproduce with my Japanese Input Method, which seems to flush itself on any ctrl+alt+foo combination before getting to LibreOffice. Nevertheless does this demo patch avoid the crash for the gtk3 case Julien can reproduce? -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 Julien Nabet changed: What|Removed |Added CC||caol...@redhat.com --- Comment #7 from Julien Nabet --- I got only a crash with gtk3, I don't reproduce this with gen or kf5 rendering even if behavior is different between both. I'm on pc Debian x86-64 with master sources updated today + enable-dbgutil and use ibus-mozc with Japanese Hiragana. With this patch: diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index fe9e2b0f2444..db7fb835453e 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -292,7 +292,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) // mark this windows as the last FocusWindow vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow(); -if (pOverlapWindow->mpWindowImpl) +if (pOverlapWindow && pOverlapWindow->mpWindowImpl) pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this; mpWindowImpl->mpFrameData->mpFocusWin = this; I got: #0 0x7fdc3d4d880b in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x555e7d18b270, nFlags=GetFocusFlags::NONE) at vcl/source/window/mouse.cxx:297 #1 0x7fdc3d5a6de7 in vcl::Window::GrabFocus() (this=0x555e7d18b270) at vcl/source/window/window.cxx:2985 #2 0x7fdc17982a15 in SwPostItMgr::LayoutPostIts() (this=0x555e7cbc0e50) at sw/source/uibase/docvw/PostItMgr.cxx:796 297 mpWindowImpl->mpFrameData->mpFocusWin = this; (gdb) p mpWindowImpl $1 = std::unique_ptr = {get() = 0x0} Concerning EndExtTextInput, I added a trace just before: 288 // EndExtTextInput if it is not the same window 289 if (pSVData->mpWinData->mpExtTextInputWin 290 && (pSVData->mpWinData->mpExtTextInputWin.get() != this)) 291 pSVData->mpWinData->mpExtTextInputWin->EndExtTextInput(); and the line 291 is indeed called. Caolán: any idea here? perhaps the fix for gtk3 may help for Windows or at least provide some hints. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 Julien Nabet changed: What|Removed |Added CC||serval2...@yahoo.fr --- Comment #6 from Julien Nabet --- Created attachment 184828 --> https://bugs.documentfoundation.org/attachment.cgi?id=184828=edit bt with debug symbols On pc Debian x86-64 with master sources updated today, I could reproduce this with gtk3 rendering. (I'm gonna give a try with gen rendering). -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #5 from Patrick Luby --- Note: this bug has been already fixed in macOS in the following patch: https://cgit.freedesktop.org/libreoffice/core/commit/vcl/osx/vclnsapp.mm?id=9ee57f36e26373ee7144d076c93c3462c4fc7110 The above patch essentially calls SalFrame::EndExtTextInput(EndExtTextInputFlags::Complete) just before dispatching any key events with the Command key pressed. I assume that a similar fix could be used for Windows and Linux by making the same call just before dispatching key events with the Control key pressed. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 --- Comment #4 from Aron Budea --- Created attachment 184331 --> https://bugs.documentfoundation.org/attachment.cgi?id=184331=edit Backtrace -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 Aron Budea changed: What|Removed |Added Ever confirmed|0 |1 CC||aron.bu...@gmail.com Version|7.5.0.0 alpha1+ |4.0.0.3 release Status|UNCONFIRMED |NEW Keywords||haveBacktrace --- Comment #3 from Aron Budea --- Confirmed using LO 7.6.0.0.alpha0+ (40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2), 4.0.0.3 / Windows. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 152404] Crash in Writer when using Japanese Hiragana input method and shortcut Ctrl+Alt+C to insert a new comment while there is uncommitted text
https://bugs.documentfoundation.org/show_bug.cgi?id=152404 Dieter changed: What|Removed |Added Blocks||98259, 83066 Whiteboard| QA:needsComment| See Also||https://bugs.documentfounda ||tion.org/show_bug.cgi?id=66 ||772 Summary|Crash in Writer when|Crash in Writer when using |inserting a new comment |Japanese Hiragana input |while there is uncommitted |method and shortcut |text|Ctrl+Alt+C to insert a new ||comment while there is ||uncommitted text CC||dgp-m...@gmx.de --- Comment #2 from Dieter --- Thank you for reporting the bug. I can't test it, because I can't change to Japanese keyboard. It looks like a problem with shortcut and i wonder if Ctrl+Alt+C is the only combination that causes a crash Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=83066 [Bug 83066] [META] CJK (Chinese, Japanese, Korean, and Vietnamese) language issues https://bugs.documentfoundation.org/show_bug.cgi?id=98259 [Bug 98259] [META] Keyboard shortcuts and accelerators bugs and enhancements -- You are receiving this mail because: You are the assignee for the bug.