<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failure when clicking on comment border in Calc"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114271">bug 114271</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>erack@redhat.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failure when clicking on comment border in Calc"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114271#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failure when clicking on comment border in Calc"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114271">bug 114271</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>Eike: with this patch, I don't reproduce the assert:
diff --git a/sc/source/ui/drawfunc/futext.cxx
b/sc/source/ui/drawfunc/futext.cxx
index f1a4afcd91c4..f1ec728abad0 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -194,7 +194,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)

                 //!?? the default values are not correct when result is
without outliner ???!?
                 auto pOTemp = pO.get();
-                if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true,
pO.release()) )
+                if ( !pView->IsTextEdit() && pView->SdrBeginTextEdit(pObj,
pPV, pWindow, true, pO.release()) )
                 {
                     // subscribe EditEngine-UndoManager
                     rViewShell.SetDrawTextUndo( &pOTemp->GetUndoManager() );

However, I wonder if it just hides the problem.

Indeed UndoManager error may give hints about the root cause.

I tried to follow the problem of exchanging 2 non null managers so I put some
traces to display the thread and undomanager pointer, I finally retrieved
these:

1) in EditNote() at:
GetViewData().GetDispatcher().Execute( SID_DRAW_NOTEEDIT, SfxCallMode::SYNCHRON
| SfxCallMode::RECORD ); (line 508)

#0  0x00007ffff55455b6 in SfxShell::SetUndoManager(SfxUndoManager*)
(this=0x555558d19b40, pNewUndoMgr=0x555557e8b4c0) at
/home/julien/lo/libreoffice/sfx2/source/control/shell.cxx:210
#1  0x00007fffde40b30a in ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData*)
(this=0x555558d19b40, pData=0x555557e32088) at
/home/julien/lo/libreoffice/sc/source/ui/drawfunc/drtxtob.cxx:112
#2  0x00007fffde902735 in ScTabViewShell::SetCurSubShell(ObjectSelectionType,
bool) (this=0x555557e31fc0, eOST=OST_DrawText, bForce=false) at
/home/julien/lo/libreoffice/sc/source/ui/view/tabvwsh4.cxx:816
#3  0x00007fffde901f5f in ScTabViewShell::SetDrawTextShell(bool)
(this=0x555557e31fc0, bActive=true) at
/home/julien/lo/libreoffice/sc/source/ui/view/tabvwsh4.cxx:656
#4  0x00007fffde8f86b9 in ScTabViewShell::ExecDraw(SfxRequest&)
(this=0x555557e31fc0, rReq=...) at
/home/julien/lo/libreoffice/sc/source/ui/view/tabvwsh2.cxx:189
#5  0x00007fffde8f6e9d in SfxStubScTabViewShellExecDraw(SfxShell*, SfxRequest&)
(pShell=0x555557e31fc0, rReq=...) at
/home/julien/lo/libreoffice/workdir/SdiTarget/sc/sdi/scslots.hxx:1434
#6  0x00007ffff54fb508 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&),
SfxRequest&) (this=0x555557e31fc0, pFunc=0x7fffde8f6e6f
<SfxStubScTabViewShellExecDraw(SfxShell*, SfxRequest&)>, rReq=...)
    at /home/julien/lo/libreoffice/include/sfx2/shell.hxx:207
#7  0x00007ffff54f23a5 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&,
SfxRequest&, bool) (this=0x555557e280a0, rShell=..., rSlot=..., rReq=...,
bRecord=true)
    at /home/julien/lo/libreoffice/sfx2/source/control/dispatch.cxx:356
#8  0x00007ffff54f4de1 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&,
SfxRequest&, SfxCallMode)
    (this=0x555557e280a0, rShell=..., rSlot=..., rReq=...,
eCallMode=(SfxCallMode::SYNCHRON | SfxCallMode::RECORD)) at
/home/julien/lo/libreoffice/sfx2/source/control/dispatch.cxx:856
#9  0x00007ffff54f54c1 in SfxDispatcher::Execute(unsigned short, SfxCallMode,
SfxPoolItem const**, unsigned short, SfxPoolItem const**)
    (this=0x555557e280a0, nSlot=26081, eCall=(SfxCallMode::SYNCHRON |
SfxCallMode::RECORD), pArgs=0x0, nModi=0, pInternalArgs=0x0) at
/home/julien/lo/libreoffice/sfx2/source/control/dispatch.cxx:962
#10 0x00007fffde984f1a in ScViewFunc::EditNote() (this=0x555557e32078) at
/home/julien/lo/libreoffice/sc/source/ui/view/viewfun6.cxx:508

2) In the same method at line 514
#0  0x00007ffff55455b6 in SfxShell::SetUndoManager(SfxUndoManager*)
(this=0x555558d19b40, pNewUndoMgr=0x555559139760) at
/home/julien/lo/libreoffice/sfx2/source/control/shell.cxx:210
#1  0x00007fffde903539 in ScTabViewShell::SetDrawTextUndo(SfxUndoManager*)
(this=0x555557e31fc0, pNewUndoMgr=0x555559139760) at
/home/julien/lo/libreoffice/sc/source/ui/view/tabvwsh4.cxx:1016
#2  0x00007fffde430d8b in FuText::SetInEditMode(SdrObject*, Point const*, bool,
KeyEvent const*) (this=0x555558c71f60, pObj=0x555558f5fd00, pMousePixel=0x0,
bCursorToEnd=false, pInitialKey=0x0)
    at /home/julien/lo/libreoffice/sc/source/ui/drawfunc/futext.cxx:588
#3  0x00007fffde984f8b in ScViewFunc::EditNote() (this=0x555557e32078) at
/home/julien/lo/libreoffice/sc/source/ui/view/viewfun6.cxx:514

First retrieves pViewData->GetSfxDocShell()->GetUndoManager()
Second one retrieves pOTemp->GetUndoManager()

Any thoughts?</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>