Strange performance problem--near constant beachball of doom

Hi there, I’m experiencing terrible performance and I have no idea what the culprit could be. I get the beachball of death even when I’m simply accessing menu items (such as trying to hide the Tab bar). I’ve closed all but one document and the one I have open isn’t even particularly large. In fact, it’s likely quite small by TBX standards.

What’s the best way to resolve these issues? I’m on a 2017 MBP, so I can’t imagine it’s the hardware. Thanks!

Send your problem document to info@eastgate.com and we’ll take a look.

The most likely culprit, in my experience, is trying to do lots of computation in a $DisplayExpression. Since each display expression must be evaluated every time the display changes (and sometimes when it might change!), trying to do something complex with every item in the document in a display expression can give you quadratic run times. Fortunately, this is always a mistake — there are better ways to accomplish the task!

Oh – and, of course – keep good backups. When something goes wrong at 2PM, it’s always nice to know that you can get back to those rosy days of noon when all was well.

I sent you the problem document, but I think I figured it out. I think there was an agent in the Prototype container that was looking at EVERY SINGLE note. I had borrowed some prototypes from someone else and I suspect that was the culprit.

An agent that looks at every note in a document is not, as a rule, a problem: most agents do. Of course, if the agent looks at every note, and compares it (say) with every other note, it’s easy to find yourself with a document where agent updates take (say) 0.1 seconds when you have ten items, and 1000 seconds when you have 100.

Bystanders: I think we’ve found the problem in this document, which seems to have been a combination of (a) a syntax error, and (b) accidentally leaving an agent in the /Prototypes folder.

Also doom-beachballing here (macOS 10.14.6)

Tried a fresh download of the app from Tinderbox: Downloads

(8.62)

Began after trying to create a single note in a fresh document today. Now always loads that document, beachballing before any GUI events are received.

royalSocietyEarlyDebates.tbx (100.4 KB)

Any thoughts ?

Is there a command line or other recipe for launching afresh with no document ?

(Hadn’t used TBX for about a month, so not sure of when this might have arisen)

Is there a command line or other recipe for launching afresh with no document ?

Holding down the SHIFT key during launch seems to have freed it.

But the beach-ball soon returns …

Fresh copy of same single-note document. No other files open.

100% CPU and Real Memory steadily climbing, as the beach-ball spins …

No hurry. I’ll revert to plain text files for the foreseeable. Feels a little less precarious.

The document opens fine in 8.6 on 10.15.4.

Time for Catalina?

Thanks for checking :slight_smile:

Catalina

Could be … Other apps seem fine …

(TBX is not pivotal for me, so probably not sensible for me to build things around it.)

Made one more try:

  • Freshly downloaded and installed 8.6.2
  • Opened TBX with shift key held down
  • Fresh document
  • New note
  • Pasted RTF clipboard into Text
  • Crash …

Definitely back to plain text and Scrivener for the foreseeable. Don’t want to waste these weeks – at my age they may prove precious :slight_smile:

Details

Process: Tinderbox 8 [55694]
Path: /Applications/Tinderbox 8.app/Contents/MacOS/Tinderbox 8
Identifier: com.eastgate.Tinderbox-8
Version: 8.6.2 (b452)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Tinderbox 8 [55694]
User ID: 501

Date/Time: 2020-03-31 15:58:03.025 +0100
OS Version: Mac OS X 10.14.6 (18G3020)
Report Version: 12
Anonymous UUID: E45179DE-1B85-C265-98DA-011B593F8AD9

Sleep/Wake UUID: 6128A756-DAFF-4D4F-B637-B8E02E138E0D

Time Awake Since Boot: 1200000 seconds
Time Since Wake: 5100 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ffee6d45fe8
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [55694]

VM Regions Near 0x7ffee6d45fe8:
MALLOC_TINY 00007fee3d800000-00007fee3da00000 [ 2048K] rw-/rwx SM=PRV
–> STACK GUARD 00007ffee3546000-00007ffee6d46000 [ 56.0M] —/rwx SM=NUL stack guard for thread 0
Stack 00007ffee6d46000-00007ffee7546000 [ 8192K] rw-/rwx SM=SHM thread 0

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff2dcba6a4 isEqualToString + 84
1 com.apple.CoreFoundation 0x00007fff2dca22b5 CFEqual + 637
2 com.apple.CoreFoundation 0x00007fff2dd3cb3c __CFBasicHashesAreEqual_block_invoke + 2681
3 com.apple.CoreFoundation 0x00007fff2dccc952 CFBasicHashApply + 105
4 com.apple.CoreFoundation 0x00007fff2dd30877 CFBasicHashesAreEqual + 143
5 com.apple.CoreText 0x00007fff2f8f480a TDescriptor::Equal(TDescriptor const*) const + 78
6 com.apple.CoreText 0x00007fff2f8f47b1 TCFBase::ClassEqual(void const*, void const*) + 17
7 com.apple.CoreText 0x00007fff2f91d32f TFont::Compare(TFont const&) const + 67
8 com.apple.CoreText 0x00007fff2f91e1e5 TKerningEngineImplementation::RunsSimilar(TRun const&, TRun const&) + 53
9 com.apple.CoreText 0x00007fff2f8e919f TKerningEngineImplementation::TKerningEngineImplementation(TRunGlue&) + 179
10 com.apple.CoreText 0x00007fff2f8eb123 TAATKerxEngine::TAATKerxEngine(TRunGlue&, __CFData const*) + 31
11 com.apple.CoreText 0x00007fff2f9028c4 TKerningEngine::PositionGlyphs(TLine&, TCharStream const&, signed char) + 482
12 com.apple.CoreText 0x00007fff2f90267d TTypesetter::FinishLayout(std::__1::tuple<TLine const*, TCharStream const*, void const* ()(__CTRun const, __CFString const*, void*), void*, std::__1::shared_ptr, unsigned int, unsigned char> const&, TLine&, signed char, SyncState) + 35
13 com.apple.CoreText 0x00007fff2f900026 TTypesetter::TTypesetter(__CFArray const
, __CFString const*, void const* ()(__CTRun const, __CFString const*, void*), void*, __CFDictionary const*) + 426
14 com.apple.CoreText 0x00007fff2f931d6b CTTypesetterCreateWithRunArrayAndOptions + 94
15 com.apple.UIFoundation 0x00007fff549b9b89 -[NSATSGlyphStorage createCTTypesetter] + 1674
16 com.apple.UIFoundation 0x00007fff549b6471 -[NSATSTypesetter _ctTypesetter] + 308
17 com.apple.UIFoundation 0x00007fff549b5060 -[NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 85
18 com.apple.UIFoundation 0x00007fff549b3ab7 -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 3209
19 com.apple.UIFoundation 0x00007fff549cde2b -[NSATSTypesetter layoutParagraphAtPoint:] + 181
20 com.apple.UIFoundation 0x00007fff549a4c4f -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 3010
21 com.apple.UIFoundation 0x00007fff549cd60d -[NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 241
22 com.apple.UIFoundation 0x00007fff549cd42a -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 812
23 com.apple.UIFoundation 0x00007fff549cd22d -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 303
24 com.apple.UIFoundation 0x00007fff549cb833 -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 756
25 com.apple.UIFoundation 0x00007fff549d6556 _NSFastFillAllLayoutHolesForGlyphRange + 1631
26 com.apple.UIFoundation 0x00007fff549c36db -[NSLayoutManager(NSPrivate) _firstPassGlyphRangeForBoundingRect:inTextContainer:okToFillHoles:] + 1432
27 com.apple.UIFoundation 0x00007fff549c226c -[NSLayoutManager(NSPrivate) _glyphRangeForBoundingRect:inTextContainer:fast:okToFillHoles:] + 851
28 com.apple.UIFoundation 0x00007fff549c1f12 -[NSLayoutManager glyphRangeForBoundingRect:inTextContainer:] + 67
29 com.apple.AppKit 0x00007fff2b3de19f -[NSTextView(NSPrivate) _setFrameSize:forceScroll:] + 1372
30 com.apple.AppKit 0x00007fff2b3ddb83 -[NSTextView setFrameSize:] + 138
31 com.apple.AppKit 0x00007fff2b339015 -[NSTextView setConstrainedFrameSize:] + 621
32 com.apple.UIFoundation 0x00007fff5498f4c1 -[NSLayoutManager(NSPrivate) _resizeTextViewForTextContainer:] + 1113
33 com.apple.UIFoundation 0x00007fff549ac578 -[NSLayoutManager(NSPrivate) _updateUsageForTextContainer:addingUsedRect:] + 529
34 com.apple.UIFoundation 0x00007fff549d15de -[NSLayoutManager setLineFragmentRect:forGlyphRange:usedRect:] + 350
35 com.apple.UIFoundation 0x00007fff549d1455 -[NSLayoutManager(NSPrivate) setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:] + 85
36 com.apple.UIFoundation 0x00007fff549d111e -[NSTypesetter setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:] + 245
37 com.apple.UIFoundation 0x00007fff549b4a1b -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 7149
38 com.apple.UIFoundation 0x00007fff549cde2b -[NSATSTypesetter layoutParagraphAtPoint:] + 181
39 com.apple.UIFoundation 0x00007fff549a4c4f -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 3010

Send the crash report(s) to @Eastgate where they can be properly analyzed.

1 Like

Done, but I probably won’t stick around to spend a lot of time on diagnosis.

I admire the real beauty and complexity of these huge unmodelled state machines, but temperamentally I’m the kind of cathedral visitor who always expects the whole thing to come crashing down on me – so I tend to bolt, alas at anything that sounds like even the smallest and most accidental piece of falling masonry.

This report has nothing to do with this thread.

OK: go in peace. We have a world emergency, as you may have noticed, and your fragmentary problem report was received about ten minutes ago.

We could likely fix this today, but there seems little point, and other people are doing work that requires Tinderbox rather than playing around in cathedrals.