Using a dbgutil build: 1. Create this stub macro: Sub EmptyOn End Sub 2. In a new Calc document, assign it to a sheet's Formulas calculated action (right-click on the sheet's tab, select "Sheet Events") 3. Select an empty cell, and type into it: =1+1 => debug assertion failed: back() called on empty deque The failing code is inside '#if OSL_DEBUG_LEVEL > 0' of UndoManagerHelper_Impl::listActionLeft; it tries to read top of m_aContextAPIFlags, which is empty at this moment. The reason is the processing sequence in ScViewFunc::EnterData, which first calls 'rFunc.EnterListAction( STR_UNDO_ENTERDATA );' before it processes the formula - at this moment, there's no listeners yet, so the action is not executed -> UndoManagerHelper_Impl::listActionEntered is not called; then it processes the formula and calls rFunc.SetFormulaCell - at which moment, a listener is added; and then it calls rFunc.EndListAction, which tries to call UndoManagerHelper_Impl::listActionLeft, which relies on UndoManagerHelper_Impl::listActionEntered being called previously. But I don't know if simply checking if the stack is empty before the debugging code is OK - it looks hackish. Eike: do you have an idea how to improve this?
Confirmed with LO Version: 7.3.0.0.alpha0+ (83a235450e6bf3c671ab9a1710e92a356d4d2052) / Windows.
https://gerrit.libreoffice.org/c/core/+/119275 is my take on this.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4ecb94da9fdd00f24b02020151ac4d27d5514d5f Resolves: tdf#142980 Special-case the very first listener added during action It will be available in 7.3.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.