GNUMail hanging in a loop eating CPU

Riccardo Mottola <[email protected]> Sat, 27 Mar 2021 01:13:29 +0100
Newsgroups gmane.comp.lib.gnustep.devel
Message-ID <[email protected]>
Hello,

It happened to me several times while writing an email until I gave up. 
I have not a definite way of triggering it, but I noticed it happened 
just after typing half a mail... tried twice.

Most other applications seem fine and even GNUMail while reading mails.

GNUMail stucks to CPU 100%. Once I got a crash instead. One time I was 
able to attach via GDB while GNUMail was hang and was able to produce 
this stacktrace.

What's your guess? Fred?


Riccardo


#0  0x00007f4a2160c257 in -[GSLayoutManager(GlyphsHelpers) 
_generateGlyphsUpToCharacter:] (self=<optimized out>, _cmd=<optimized 
out>, last=<optimized out>)
     at GSLayoutManager.m:736
#1  0x00007f4a2160d353 in -[GSLayoutManager(glyphs) 
characterRangeForGlyphRange:actualGlyphRange:] (self=0x5636fdee8f30, 
_cmd=<optimized out>, glyphRange=...,
     actualGlyphRange=0x0) at GSLayoutManager.m:1098
#2  0x00007f4a21613dba in -[GSHorizontalTypesetter 
layoutGlyphsInLayoutManager:inTextContainer:startingAtGlyphIndex:previousLineFragmentRect:nextGlyphIndex:numberOfLineFragments:] 
(self=0x5636fd2f0f50, _cmd=<optimized out>,
     layoutManager=<optimized out>, textContainer=0x5636fd4be650,
     glyphIndex=<optimized out>, previousLineFragRect=...,
     nextGlyphIndex=0x7ffc547f163c, howMany=0) at 
GSHorizontalTypesetter.m:1309
#3  0x00007f4a2160d7bf in -[GSLayoutManager(LayoutHelpers) 
_doLayoutToGlyph:] (
     self=0x5636fdee8f30, _cmd=<optimized out>, glyphIndex=682)
     at GSLayoutManager.m:1872
#4  0x00007f4a214f6c1a in -[NSLayoutManager(layout) 
_insertionPointRectForCharacterIndex:textContainer:] (self=0x5636fdee8f30,
     _cmd=0x7f4a219be5d0 <_OBJC_SELECTOR_TABLE+2032>, cindex=684,
     textContainer=0x7ffc547f173c) at NSLayoutManager.m:903
#5  0x00007f4a214f50be in -[NSLayoutManager(layout) 
insertionPointRectForCharacterIndex:inTextContainer:] 
(self=0x5636fdee8f30, _cmd=<optimized out>,
     cindex=684, textContainer=0x5636fd4be650) at NSLayoutManager.m:977
#6  0x00007f4a215a6d70 in -[NSTextView(leftovers) 
updateInsertionPointStateAndRestartTimer:] (self=0x5636fdfc8fa0, 
_cmd=<optimized out>,
     restartFlag=<optimized out>) at NSTextView.m:4221
#7  0x00007f4a215a2822 in -[NSTextView(leftovers) 
setSelectedRange:affinity:stillSelecting:] (self=0x5636fdfc8fa0, 
_cmd=<optimized out>, charRange=...,
     affinity=0, stillSelectingFlag=<optimized out>) at NSTextView.m:3788
#8  0x00007f4a214fbfdc in -[NSLayoutManager 
textStorage:edited:range:changeInLength:invalidatedRange:] 
(self=<optimized out>, _cmd=<optimized out>,
     aTextStorage=<optimized out>, mask=<optimized out>, range=...,
     lengthChange=<optimized out>, invalidatedRange=...)
     at NSLayoutManager.m:2959
#9  0x00007f4a215959c7 in -[NSTextStorage processEditing] (
     self=0x5636fe5919a0, _cmd=<optimized out>) at NSTextStorage.m:266
#10 0x00007f4a20b7eb8b in -[NSMutableAttributedString 
replaceCharactersInRange:withAttributedString:] 
(self=self@entry=0x5636fe5919a0,
     _cmd=_cmd@entry=0x7f4a21a4ed20 <_OBJC_SELECTOR_TABLE+3136>, aRange=...,
     attributedString=0x5636fe5fdc10) at NSAttributedString.m:1084
#11 0x00007f4a215a983c in -[NSTextView insertText:] (self=0x5636fdfc8fa0,
     _cmd=<optimized out>, insertString=<optimized out>) at 
NSTextView.m:2233
#12 0x00007f4a214f0266 in -[NSInputManager handleKeyboardEvents:client:] (
     self=0x5636fcf32070, _cmd=<optimized out>, eventArray=<optimized out>,
     client=0x5636fdfc8fa0) at NSInputManager.m:694
#13 0x00007f4a215a18e5 in -[NSTextView(leftovers) keyDown:] (
     self=0x5636fdfc8fa0, _cmd=<optimized out>, theEvent=0x5636fde97650)
     at NSTextView.m:5916
#14 0x00007f4a2144ece3 in -[NSApplication run] (self=0x5636fd02e250,


(gdb) up
#1  0x00007f4a2160d353 in -[GSLayoutManager(glyphs) 
characterRangeForGlyphRange:actualGlyphRange:] (self=0x5636fdee8f30, 
_cmd=<optimized out>, glyphRange=...,
     actualGlyphRange=0x0) at GSLayoutManager.m:1098
1098            GLYPH_STEP_FORWARD(r2,i,adj,cadj)
(gdb) p r2
$1 = (glyph_run_t *) 0x5636fd6a9d80
(gdb) p i
$2 = 59
(gdb) p adj
$3 = 756
(gdb) p cadj
$4 = 758