Created attachment 141903 [details] Document to reproduce the assertion Open attached document. Click on comment marker in top-left corner. Click into comment and mark "draw". Menu Format > Character. Notice, that the comment is closed. Cancel Character format dialog. That gives the assertion failure: Assertion failed! Program: ...\core\instdir\program\vcllo.dll File: ../core/vcl/source/window/menubarwindow.cxx Line: 526 Expression: xTempFocusId == nullptr || implGerSVData()->maWinData.mpFocusWin != this
Created attachment 141904 [details] Call stack
Created attachment 141908 [details] bt with debug symbols On pc Debian x86-64 with master sources updated yesterday, I reproduced this BUT the assert happened when opening dialog, not during cancel since I couldn't get the dialog. Also I reproduced this with gen rendering, I don't reproduce this with gtk3 rendering. I can give a try to other renderings (gtk and kde4) if useful.
Some gdb session: #4 0x00007fffebcaeb62 in MenuBarWindow::ChangeHighlightItem (this=0x55555ad53ff0, n=65535, bSelectEntry=false, bAllowRestoreFocus=true, bDefaultToDocument=false) at /home/julien/lo/libreoffice/vcl/source/window/menubarwindow.cxx:526 526 assert(xTempFocusId == nullptr || ImplGetSVData()->maWinData.mpFocusWin != this); (gdb) p xTempFocusId $1 = {_vptr.VclPtr = 0x7fffecddf6f0 <vtable for VclPtr<vcl::Window>+16>, m_rInnerRef = rtl::Reference to 0x55555b0d5300} (gdb) p ImplGetSVData()->maWinData.mpFocusWin $2 = {_vptr.VclPtr = 0x7fffecddf6f0 <vtable for VclPtr<vcl::Window>+16>, m_rInnerRef = rtl::Reference to 0x55555ad53ff0} (gdb) p this $3 = (MenuBarWindow * const) 0x55555ad53ff0 BTW, the comment is closed too with gtk3 rendering. Maxim: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ecf542af410536d64d217c71002799bbe48b9c3 which contains the assert, thought you might be interested in this one.
Not related to the Character dialog, as just opening and closing any menu triggers this assert. (And btw I don't think that the Character dialog can be used or was ever working with comments in Draw.)
Maxim Monastirsky committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bff36583c7be2eb4112adfb778d19a308b458ca8 tdf#117440 Can't move focus to disposed window It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Removed that assert, and fixed a bug which was uncovered by it.