On Wed, Dec 17, 2025 at 10:22:15PM +0100, Scott Kostyshak wrote:
> On Sat, Dec 06, 2025 at 12:23:56AM +0100, Scott Kostyshak wrote:
> > I can't figure out a clean way to reproduce this. In the mean time, I
> > attach the backtrace.
> > 
> > It happened after pasting in a bunch of \items into an already present
> > enumerate, that alread had some uses of macros there. And I think I
> > could only trigger it when adding new branches (i.e., from the pasted
> > content). And there were already some other branches present. This is a
> > weird one. (seems to be an interaction of several circumstances), so not
> > sure if it's worth digging into, but thought I would post it just in
> > case.
> > 
> > This is on current master.
> > 
> 
> I narrowed it down as much as possible. To reproduce:
> 
> 1. Download all four attached documents and put in the same directory.
> 2. Open '1-copy-from-here.lyx' and select all and copy.
> 3. Open '2-paste-into-here.lyx' and put cursor after the first "Blah",
>    and paste, to paste in the contents you copied in step (2).
> 4. In the prompt (about adding the branch), click "Add".
> 
> I then immediately get the crash.
> 
> Can anyone reproduce?

I can reproduce on 2.4.4.
I also get some debug output before the backtrace, see below.

Time to file bug in trac I guess.

CursorSlice.cpp (223): can't compare cursor and anchor in different insets
p: inset: 0x600000cf4ea0 idx: 0 par: 0 pos: 0
q: inset: 0x600000ee6840 idx: 0 par: 0 pos: 33
support/lassert.cpp (52): ASSERTION false VIOLATED IN 
/Users/Shared/LyX/lyx-2.4.4/src/CursorSlice.cpp:225
(  1) 1   lyx                                 0x000000010c2f968f 
_ZN3lyx21doAssertWithCallstackEb : 1   lyx                                 
0x000000010c2f968f _ZN3lyx21doAssertWithCallstackEb + 25
(  2) 2   lyx                                 0x000000010bdc3c47 
_ZN3lyxltERKNS_11CursorSliceES2_ : 2   lyx                                 
0x000000010bdc3c47 _ZN3lyxltERKNS_11CursorSliceES2_ + 230
(  3) 3   lyx                                 0x000000010bd57886 
_ZN3lyx14greatest_belowIKNSt3__13mapINS_11DocIteratorENS_6Buffer4Impl11ScopeBufferENS1_4lessIS3_EENS1_9allocatorINS1_4pairIKS3_S6_EEEEEEEENT_14const_iteratorERSG_RKNSG_8key_typeE
 : 3   lyx                                 0x000000010bd57886 
_ZN3lyx14greatest_belowIKNSt3__13mapINS_11DocIteratorENS_6Buffer4Impl11ScopeBufferENS1_4lessIS3_EENS1_9allocatorINS1_4pairIKS3_S6_EEEEEEEENT_14const_iteratorERSG_RKNSG_8key_typeE
 + 70
(  4) 4   lyx                                 0x000000010bd57570 
_ZNK3lyx6Buffer4Impl14getBufferMacroERKNSt3__112basic_stringIwNS2_11char_traitsIwEENS2_9allocatorIwEEEERKNS_11DocIteratorE
 : 4   lyx                                 0x000000010bd57570 
_ZNK3lyx6Buffer4Impl14getBufferMacroERKNSt3__112basic_stringIwNS2_11char_traitsIwEENS2_9allocatorIwEEEERKNS_11DocIteratorE
 + 618
(  5) 5   lyx                                 0x000000010bd579c7 
_ZNK3lyx6Buffer8getMacroERKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKNS_11DocIteratorEb
 : 5   lyx                                 0x000000010bd579c7 
_ZNK3lyx6Buffer8getMacroERKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEERKNS_11DocIteratorEb
 + 41
(  6) 6   lyx                                 0x000000010bf5d784 
_ZN3lyx14InsetMathMacro11updateMacroERKNS_12MacroContextE : 6   lyx             
                    0x000000010bf5d784 
_ZN3lyx14InsetMathMacro11updateMacroERKNS_12MacroContextE + 64
(  7) 7   lyx                                 0x000000010bf8e86e 
_ZN3lyx8MathData12updateMacrosEPNS_6CursorERKNS_12MacroContextENS_10UpdateTypeEi
 : 7   lyx                                 0x000000010bf8e86e 
_ZN3lyx8MathData12updateMacrosEPNS_6CursorERKNS_12MacroContextENS_10UpdateTypeEi
 + 600
(  8) 8   lyx                                 0x000000010bf8e301 
_ZNK3lyx8MathData12addToMathRowERNS_7MathRowERNS_11MetricsInfoE : 8   lyx       
                          0x000000010bf8e301 
_ZNK3lyx8MathData12addToMathRowERNS_7MathRowERNS_11MetricsInfoE + 79
(  9) 9   lyx                                 0x000000010bfaaeb8 
_ZN3lyx7MathRowC2ERNS_11MetricsInfoEPKNS_8MathDataE : 9   lyx                   
              0x000000010bfaaeb8 
_ZN3lyx7MathRowC2ERNS_11MetricsInfoEPKNS_8MathDataE + 148
( 10) 10  lyx                                 0x000000010bf8ecda 
_ZNK3lyx8MathData7metricsERNS_11MetricsInfoERNS_9DimensionEb : 10  lyx          
                       0x000000010bf8ecda 
_ZNK3lyx8MathData7metricsERNS_11MetricsInfoERNS_9DimensionEb + 202
( 11) 11  lyx                                 0x000000010bf4440b 
_ZNK3lyx13InsetMathGrid7metricsERNS_11MetricsInfoERNS_9DimensionE : 11  lyx     
                            0x000000010bf4440b 
_ZNK3lyx13InsetMathGrid7metricsERNS_11MetricsInfoERNS_9DimensionE + 123
( 12) 12  lyx                                 0x000000010bf4f000 
_ZNK3lyx13InsetMathHull7metricsERNS_11MetricsInfoERNS_9DimensionE : 12  lyx     
                            0x000000010bf4f000 
_ZNK3lyx13InsetMathHull7metricsERNS_11MetricsInfoERNS_9DimensionE + 376
( 13) 13  lyx                                 0x000000010bef424c 
_ZN3lyx11TextMetrics13redoParagraphElb : 13  lyx                                
 0x000000010bef424c _ZN3lyx11TextMetrics13redoParagraphElb + 1458
( 14) 14  lyx                                 0x000000010bef4ecd 
_ZN3lyx11TextMetrics7metricsERKNS_11MetricsInfoERNS_9DimensionEi : 14  lyx      
                           0x000000010bef4ecd 
_ZN3lyx11TextMetrics7metricsERKNS_11MetricsInfoERNS_9DimensionEi + 215
( 15) 15  lyx                                 0x000000010c0be16f 
_ZNK3lyx9InsetText7metricsERNS_11MetricsInfoERNS_9DimensionE : 15  lyx          
                       0x000000010c0be16f 
_ZNK3lyx9InsetText7metricsERNS_11MetricsInfoERNS_9DimensionE + 309
( 16) 16  lyx                                 0x000000010bfef479 
_ZNK3lyx16InsetCollapsible7metricsERNS_11MetricsInfoERNS_9DimensionE : 16  lyx  
                               0x000000010bfef479 
_ZNK3lyx16InsetCollapsible7metricsERNS_11MetricsInfoERNS_9DimensionE + 353
( 17) 17  lyx                                 0x000000010bef424c 
_ZN3lyx11TextMetrics13redoParagraphElb : 17  lyx                                
 0x000000010bef424c _ZN3lyx11TextMetrics13redoParagraphElb + 1458
( 18) 18  lyx                                 0x000000010bef4c5e 
_ZN3lyx11TextMetrics13updateMetricsElii : 18  lyx                               
  0x000000010bef4c5e _ZN3lyx11TextMetrics13updateMetricsElii + 544
( 19) 19  lyx                                 0x000000010bd89bc6 
_ZN3lyx10BufferView13updateMetricsEb : 19  lyx                                 
0x000000010bd89bc6 _ZN3lyx10BufferView13updateMetricsEb + 312
( 20) 20  lyx                                 0x000000010bd896b9 
_ZN3lyx10BufferView18processUpdateFlagsENS_6Update5flagsE : 20  lyx             
                    0x000000010bd896b9 
_ZN3lyx10BufferView18processUpdateFlagsENS_6Update5flagsE + 269
( 21) 21  lyx                                 0x000000010c0f0ef1 
_ZN3lyx8frontend14GuiApplication17updateCurrentViewERKNS_11FuncRequestERNS_14DispatchResultE
 :
 21  lyx                                 0x000000010c0f0ef1 
_ZN3lyx8frontend14GuiApplication17updateCurrentViewERKNS_11FuncRequestERNS_14DispatchResultE
 + 137
 ( 22) 22  lyx                                 0x000000010c0f0dac 
_ZN3lyx8frontend14GuiApplication8dispatchERKNS_11FuncRequestE : 22  lyx         
                        0x000000010c0f0dac 
_ZN3lyx8frontend14GuiApplication8dispatchERKNS_11FuncRequestE + 352
 ( 23) 23  lyx                                 0x000000010c0f672b 
_ZN3lyx8frontend14GuiApplication13processKeySymERKNS_9KeySymbolEj : 23  lyx     
                            0x000000010c0f672b 
_ZN3lyx8frontend14GuiApplication13processKeySymERKNS_9KeySymbolEj + 2467
 ....

Pavel
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to