<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Crash on closing Writer via window decoration (X) with unmodified document and active IM"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=141887">141887</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash on closing Writer via window decoration (X) with unmodified document and active IM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.2.0.0.alpha0+ Master
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>glogow@fbihome.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
Happens with kf5 and gtk3, but not gen. For whatever reason, gen doesn't
trigger the following codepath / bt:

#0  SwEditWin::Command (this=0x555559f5cd10, rCEvt=...)
    at sw/source/uibase/docvw/edtwin.cxx:5360
#1  ImplCallCommand (pChild=..., nEvt=nEvt@entry=<incomplete type>,
pData=pData@entry=0x7fffffff0400, bMouse=bMouse@entry=false,
pPos=pPos@entry=0x0)
#2  ImplHandleExtTextInput (nCursorFlags=<optimized out>, nCursorPos=<optimized
out>, pTextAttr=0x0, rText=..., pWindow=0x555556b992f0)
#3  ImplWindowFrameProc (_pWindow=0x555556b992f0, nEvent=<optimized out>,
pEvent=<optimized out>)
#4  SalFrame::CallCallback (pEvent=0x7fffffff07e0,
nEvent=SalEvent::ExtTextInput, this=<optimized out>) 
#5  GtkSalFrame::CallCallbackExc (this=<optimized out>,
nEvent=nEvent@entry=SalEvent::ExtTextInput, pEvent=pEvent@entry=0x7fffffff07e0)
#6  GtkSalFrame::IMHandler::sendEmptyCommit (this=this@entry=0x55555c77f3c0)
#7  GtkSalFrame::IMHandler::endExtTextInput (this=0x55555c77f3c0) 
#8  vcl::Window::dispose (this=this@entry=0x555559f5cd10)
    at vcl/source/window/window.cxx:403
#9  SwEditWin::dispose (this=0x555559f5cd10)

At this point m_rView.GetWrtShellPtr() is already gone, but SwEditWin::Command
relies on m_rView.GetWrtShell().

FWIW:
- Writer: with crash fix applied, just closes and no undo entry, so no crash on
Ctrl+Z while in pre-selection.
- Calc: closes IM and takes the current pre-selection => modified doc, so get
close modified dialog. Crash on undo.
- Impress: same as Calc.
- Draw: same as Impress, if you open a doc with a shape and start modifying its
text.
- Math: just closes. Creates undo object and crashes on Ctrl+Z while in
pre-selection.


Steps to Reproduce:
1. Start LO Writer
2. Activate some IM and type a character, to be in IM pre-selection
3. Close Writer via window decoration (X)

Actual Results:
crash

Expected Results:
no crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 30d7c5665ce71ce54dd3fab308bcd54d3290aeb0
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>