# Crash with Strip Leading Tabs

**URL:** <https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294>\
**Category:** Scrivener for macOS\
**Tags:** bug, crash\
**Created:** [July 10, 2023, 7:55pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294 "2023-07-10T19:55:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 10, 2023, 7:55pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/1 "2023-07-10T19:55:08Z")

</div>

I experienced a string of crashes with Edit \> Text Tidying \> Strip Leading Tabs.

I had done a Paste and Match Style from an outline to a new document in Scrivener. Each line started with two tabs.

I selected the lines and ran Strip Leading Tabs. Nothing seemed to happen. The editor was unresponsive. When I clicked the Binder, Scrivener crashed.

When I reloaded Scrivener, only one of the selected lines had been stripped of leading tabs.

I selected the remaining lines and retried Strip Leading Tabs. Scrivener crashed again. This happened a couple more times.

Eventually, Strip Leading Tabs did work. It worked when I just placed the cursor in the Editor without selecting anything.

---

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 10, 2023, 8:18pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/2 "2023-07-10T20:18:29Z")

</div>

Here’s a paste of the crash report:

```plaintext
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process: Scrivener [80134]
Path: /Applications/Scrivener 3.app/Contents/MacOS/Scrivener
Identifier: com.literatureandlatte.scrivener3
Version: 3.3.1 (15588)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501

Date/Time: 2023-07-10 20:58:09.5960 +0100
OS Version: macOS 12.6.7 (21G651)
Report Version: 12
Anonymous UUID: D7CAB7FF-69E7-79C1-7D61-AE5B4632CC4B

Sleep/Wake UUID: 4F66ED71-6ED9-4703-A747-E9DE67DB41DD

Time Awake Since Boot: 550000 seconds
Time Since Wake: 35172 seconds

System Integrity Protection: enabled

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

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process: exc handler [80134]

Application Specific Backtrace 0:
0 CoreFoundation 0x00007ff806075773 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff805dd5bc3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff8060755da +[NSException exceptionWithName:reason:userInfo:] + 0
3 UIFoundation 0x00007ff8098d704c -[NSLayoutManager(NSPrivate) _fillGlyphHoleForCharacterRange:startGlyphIndex:desiredNumberOfCharacters:] + 458
4 UIFoundation 0x00007ff809896263 _NSFastFillAllGlyphHolesForGlyphRange + 926
5 UIFoundation 0x00007ff8098ad72f _NSFastFillAllLayoutHolesForGlyphRange + 1710
6 UIFoundation 0x00007ff8098cd1dc -[NSLayoutManager(NSPrivate) _firstPassGlyphRangeForBoundingRect:inTextContainer:okToFillHoles:] + 293
7 UIFoundation 0x00007ff8098cc243 -[NSLayoutManager(NSPrivate) _glyphRangeForBoundingRect:inTextContainer:fast:okToFillHoles:] + 836
8 AppKit 0x00007ff808bccc25 -[NSTextView drawRect:] + 1228
9 ScrAppKit 0x0000000107b97e55 -[KBBaseTextView drawRect:] + 145
10 AppKit 0x00007ff808b8ec40 _NSViewDrawRect + 121
11 AppKit 0x00007ff8092aac8d -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1828
12 AppKit 0x00007ff8092aafdb -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2674
13 AppKit 0x00007ff8092aafdb -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2674
14 AppKit 0x00007ff808b8e351 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 747
15 AppKit 0x00007ff808b8df90 -[NSView(NSLayerKitGlue) drawLayer:inContext:] + 290
16 QuartzCore 0x00007ff80d0cba7b CABackingStoreUpdate_ + 594
17 QuartzCore 0x00007ff80d12f9d9 ___ZN2CA5Layer8display_Ev_block_invoke + 53
18 QuartzCore 0x00007ff80d0caaa1 -[CALayer _display] + 2379
19 AppKit 0x00007ff808b8ddc5 -[_NSBackingLayer display] + 462
20 AppKit 0x00007ff808b0336d -[_NSViewBackingLayer display] + 554
21 QuartzCore 0x00007ff80d0c9a07 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 873
22 QuartzCore 0x00007ff80d2212aa _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 640
23 QuartzCore 0x00007ff80d0aae6d _ZN2CA11Transaction6commitEv + 777
24 AppKit 0x00007ff808b9f191 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
25 AppKit 0x00007ff8092e6f1c ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
26 CoreFoundation 0x00007ff805ff9500 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
27 CoreFoundation 0x00007ff805ff9392 __CFRunLoopDoObservers + 543
28 CoreFoundation 0x00007ff805ff8824 __CFRunLoopRun + 840
29 CoreFoundation 0x00007ff805ff7e1c CFRunLoopRunSpecific + 562
30 HIToolbox 0x00007ff80eca85e6 RunCurrentEventLoopInMode + 292
31 HIToolbox 0x00007ff80eca8213 ReceiveNextEventCommon + 283
32 HIToolbox 0x00007ff80eca80e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
33 AppKit 0x00007ff808a32f6d _DPSNextEvent + 927
34 AppKit 0x00007ff808a3162a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
35 AppKit 0x00007ff808a23cd9 -[NSApplication run] + 586
36 AppKit 0x00007ff8089f7c57 NSApplicationMain + 817
37 dyld 0x000000010db3552e start + 462

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 AppKit 0x7ff808dafe1a -[NSApplication _crashOnException:] + 313
1 AppKit 0x7ff808b9f3cd __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 857
2 AppKit 0x7ff8092e6f1c ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
3 CoreFoundation 0x7ff805ff9500 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
4 CoreFoundation 0x7ff805ff9392 __CFRunLoopDoObservers + 543
5 CoreFoundation 0x7ff805ff8824 __CFRunLoopRun + 840
6 CoreFoundation 0x7ff805ff7e1c CFRunLoopRunSpecific + 562
7 HIToolbox 0x7ff80eca85e6 RunCurrentEventLoopInMode + 292
8 HIToolbox 0x7ff80eca8213 ReceiveNextEventCommon + 283
9 HIToolbox 0x7ff80eca80e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
10 AppKit 0x7ff808a32f6d _DPSNextEvent + 927
11 AppKit 0x7ff808a3162a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
12 AppKit 0x7ff808a23cd9 -[NSApplication run] + 586
13 AppKit 0x7ff8089f7c57 NSApplicationMain + 817
14 dyld 0x10db3552e start + 462

Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x7ff805ef696a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x7ff805ef6cd8 mach_msg + 56
2 CoreFoundation 0x7ff805ffa34d __CFRunLoopServiceMachPort + 319
3 CoreFoundation 0x7ff805ff89d8 __CFRunLoopRun + 1276
4 CoreFoundation 0x7ff805ff7e1c CFRunLoopRunSpecific + 562
5 AppKit 0x7ff808ba098e _NSEventThread + 132
6 libsystem_pthread.dylib 0x7ff805f334e1 _pthread_start + 125
7 libsystem_pthread.dylib 0x7ff805f2ef6b thread_start + 15

Thread 2:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x7ff805ef696a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x7ff805ef6cd8 mach_msg + 56
2 CoreFoundation 0x7ff805ffa34d __CFRunLoopServiceMachPort + 319
3 CoreFoundation 0x7ff805ff89d8 __CFRunLoopRun + 1276
4 CoreFoundation 0x7ff805ff7e1c CFRunLoopRunSpecific + 562
5 CFNetwork 0x7ff80ac236e0 0x7ff80a9da000 + 2397920
6 Foundation 0x7ff806e4f984 __NSThread__ start__ + 1009
7 libsystem_pthread.dylib 0x7ff805f334e1 _pthread_start + 125
8 libsystem_pthread.dylib 0x7ff805f2ef6b thread_start + 15

Thread 3:
0 libsystem_pthread.dylib 0x7ff805f2ef48 start_wqthread + 0

Thread 4:
0 libsystem_pthread.dylib 0x7ff805f2ef48 start_wqthread + 0

Thread 5:
0 libsystem_pthread.dylib 0x7ff805f2ef48 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007f9704a73800 rbx: 0x00007ff805dc6400 rcx: 0xb260c446964e0046 rdx: 0x0000000000001001
  rdi: 0x00007ff7bcc37d20 rsi: 0x0000000000001026 rbp: 0x00007ff7bcc381b0 rsp: 0x00007ff7bcc38180
   r8: 0x0000000000000026 r9: 0x00007ff7bcc37760 r10: 0x0000000000000026 r11: 0x00007f9704a74826
  r12: 0x00007f96ff00b050 r13: 0x00006000060968a0 r14: 0x0000600000209800 r15: 0x00007ff8203592d9
  rip: 0x00007ff808dafe1a rfl: 0x0000000000010202 cr2: 0x0000000107e0f641
  
Logical CPU: 3
Error Code: 0x00000000 
Trap Number: 6

Thread 0 instruction stream:
  00 e8 34 ff 7c 00 48 8b-35 39 35 9b 3e 48 8b 1d ..4.|.H.595.>H..
  6a ff 07 3d 4c 89 f7 ff-d3 48 8d 3d 9e 23 0b 3d j..=L....H.=.#.=
  48 89 c6 31 c0 e8 d1 5a-e3 ff 4c 89 f7 4c 89 fe H..1...Z..L..L..
  ff d3 48 8b 35 4d 77 9b-3e 48 8d 15 7e 13 0b 3d ..H.5Mw.>H..~..=
  48 89 c7 ff 15 35 ff 07-3d 48 8b 35 36 2f 9b 3e H....5..=H.56/.>
  48 89 c7 ff 15 25 ff 07-3d 48 89 05 8e 28 a1 3e H....%..=H...(.>
 [0f]0b 48 8d 3d 65 ad 72-3e 48 8d 35 1e 08 0a 3d ..H.=e.r>H.5...=	<==
  e8 57 00 7d 00 e9 cb fe-ff ff 48 8d 3d 4d ad 72 .W.}......H.=M.r
  3e 48 8d 35 06 08 0a 3d-e8 3f 00 7d 00 e9 19 ff >H.5...=.?.}....
  ff ff 48 89 c7 e8 0a 04-7d 00 31 ff 31 f6 31 c0 ..H.....}.1.1.1.
  e8 56 5a e3 ff e8 2a 04-7d 00 0f 0b 48 89 c3 e8 .VZ...*.}...H...
  14 04 7d 00 48 89 df e8-64 fd 7c 00 e8 03 05 7d ..}.H...d.|....}

Binary Images:
    0x7ff8089f4000 - 0x7ff809883fff com.apple.AppKit (6.9) <1a1a9da7-da66-31da-92cd-51b9cf968145> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7ff805f7a000 - 0x7ff80647cfff com.apple.CoreFoundation (6.9) <70b99b27-1b5b-33c4-b401-2ecdb80f3303> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7ff80ec7a000 - 0x7ff80ef6dfff com.apple.HIToolbox (2.1.1) <06fdecd6-9f69-397b-b1e2-a8226c0ba7ed> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x10db30000 - 0x10db9bfff dyld (*) <2517e9fe-884a-3855-8532-92bffba3f81c> /usr/lib/dyld
    0x7ff805ef5000 - 0x7ff805f2cfff libsystem_kernel.dylib (*) <d0b338e0-26be-371b-a819-80b7d619a4ad> /usr/lib/system/libsystem_kernel.dylib
    0x7ff805f2d000 - 0x7ff805f38fff libsystem_pthread.dylib (*) <e5d44afd-2577-3cee-8711-9d8d426229e0> /usr/lib/system/libsystem_pthread.dylib
    0x7ff80a9da000 - 0x7ff80ae69fff com.apple.CFNetwork (1335.0.3.2) <91c33dfa-4410-3b70-b512-4519bc14319b> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7ff806df7000 - 0x7ff8071b3fff com.apple.Foundation (6.9) <3458e3ba-4778-3b73-80c8-19245d425b38> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)

                                VIRTUAL REGION 
REGION TYPE SIZE COUNT (non-coalesced) 
=========== ======= ======= 
Accelerate framework 768K 6 
Activity Tracing 256K 1 
CG backing stores 3840K 4 
CG image 13.1M 101 
ColorSync 224K 27 
CoreAnimation 206.6M 272 
CoreGraphics 12K 2 
CoreImage 44K 6 
CoreUI image data 5456K 48 
Foundation 40K 2 
Image IO 8K 2 
Kernel Alloc Once 8K 1 
MALLOC 308.7M 144 
MALLOC guard page 48K 12 
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
ObjC additional data 15K 1 
SQLite page cache 192K 3 
STACK GUARD 56.0M 6 
Stack 10.5M 6 
VM_ALLOCATE 228K 28 
WebKit Malloc 192.0M 5 
__CTF 756 1 
__DATA 63.6M 528 
__DATA_CONST 29.8M 340 
__DATA_DIRTY 1589K 212 
__FONT_DATA 4K 1 
__LINKEDIT 649.1M 16 
__TEXT 519.3M 539 
__UNICODE 592K 1 
dyld private memory 1024K 1 
libnetwork 128K 8 
mapped file 1.0G 300 
shared memory 768K 16 
=========== ======= ======= 
TOTAL 3.4G 2641 
TOTAL, minus reserved VM space 3.0G 2641 

-----------
Full Report
-----------

{"app_name":"Scrivener","timestamp":"2023-07-10 20:58:09.00 +0100","app_version":"3.3.1","slice_uuid":"b6cb3472-1abb-3005-ac78-0a92ca95a375","build_version":"15588","platform":1,"bundleID":"com.literatureandlatte.scrivener3","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.6.7 (21G651)","incident_id":"19ECA7F9-840D-42A5-8B62-EDA084E172F7","name":"Scrivener"}
{
  "uptime" : 550000,
  "procLaunch" : "2023-07-10 20:42:20.7153 +0100",
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "iMac17,1",
  "procStartAbsTime" : 553162286472644,
  "coalitionID" : 18107,
  "osVersion" : {
    "train" : "macOS 12.6.7",
    "build" : "21G651",
    "releaseType" : "User"
  },
  "captureTime" : "2023-07-10 20:58:09.5960 +0100",
  "incident" : "19ECA7F9-840D-42A5-8B62-EDA084E172F7",
  "bug_type" : "309",
  "pid" : 80134,
  "procExitAbsTime" : 554111154602422,
  "cpuType" : "X86-64",
  "procName" : "Scrivener",
  "procPath" : "\/Applications\/Scrivener 3.app\/Contents\/MacOS\/Scrivener",
  "bundleInfo" : {"CFBundleShortVersionString":"3.3.1","CFBundleVersion":"15588","CFBundleIdentifier":"com.literatureandlatte.scrivener3"},
  "storeInfo" : {"deviceIdentifierForVendor":"A9EAC8CC-CBF5-53FB-B186-F10C46A59601","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.literatureandlatte.scrivener3",
  "crashReporterKey" : "D7CAB7FF-69E7-79C1-7D61-AE5B4632CC4B",
  "wakeTime" : 35172,
  "sleepWakeUUID" : "4F66ED71-6ED9-4703-A747-E9DE67DB41DD",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000001, 0x0000000000000000","rawCodes":[1,0],"type":"EXC_BAD_INSTRUCTION","signal":"SIGILL"},
  "termination" : {"flags":0,"code":4,"namespace":"SIGNAL","indicator":"Illegal instruction: 4","byProc":"exc handler","byPid":80134},
  "asiBacktraces" : ["0 CoreFoundation 0x00007ff806075773 __exceptionPreprocess + 242\n1 libobjc.A.dylib 0x00007ff805dd5bc3 objc_exception_throw + 48\n2 CoreFoundation 0x00007ff8060755da +[NSException exceptionWithName:reason:userInfo:] + 0\n3 UIFoundation 0x00007ff8098d704c -[NSLayoutManager(NSPrivate) _fillGlyphHoleForCharacterRange:startGlyphIndex:desiredNumberOfCharacters:] + 458\n4 UIFoundation 0x00007ff809896263 _NSFastFillAllGlyphHolesForGlyphRange + 926\n5 UIFoundation 0x00007ff8098ad72f _NSFastFillAllLayoutHolesForGlyphRange + 1710\n6 UIFoundation 0x00007ff8098cd1dc -[NSLayoutManager(NSPrivate) _firstPassGlyphRangeForBoundingRect:inTextContainer:okToFillHoles:] + 293\n7 UIFoundation 0x00007ff8098cc243 -[NSLayoutManager(NSPrivate) _glyphRangeForBoundingRect:inTextContainer:fast:okToFillHoles:] + 836\n8 AppKit 0x00007ff808bccc25 -[NSTextView drawRect:] + 1228\n9 ScrAppKit 0x0000000107b97e55 -[KBBaseTextView drawRect:] + 145\n10 AppKit 0x00007ff808b8ec40 _NSViewDrawRect + 121\n11 AppKit 0x00007ff8092aac8d -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1828\n12 AppKit 0x00007ff8092aafdb -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2674\n13 AppKit 0x00007ff8092aafdb -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2674\n14 AppKit 0x00007ff808b8e351 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 747\n15 AppKit 0x00007ff808b8df90 -[NSView(NSLayerKitGlue) drawLayer:inContext:] + 290\n16 QuartzCore 0x00007ff80d0cba7b CABackingStoreUpdate_ + 594\n17 QuartzCore 0x00007ff80d12f9d9___ZN2CA5Layer8display_Ev_block_invoke + 53\n18 QuartzCore 0x00007ff80d0caaa1 -[CALayer _display] + 2379\n19 AppKit 0x00007ff808b8ddc5 -[_NSBackingLayer display] + 462\n20 AppKit 0x00007ff808b0336d -[_NSViewBackingLayer display] + 554\n21 QuartzCore 0x00007ff80d0c9a07 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 873\n22 QuartzCore 0x00007ff80d2212aa _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 640\n23 QuartzCore 0x00007ff80d0aae6d _ZN2CA11Transaction6commitEv + 777\n24 AppKit 0x00007ff808b9f191 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285\n25 AppKit 0x00007ff8092e6f1c___NSRunLoopObserverCreateWithHandler_block_invoke + 41\n26 CoreFoundation 0x00007ff805ff9500 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23\n27 CoreFoundation 0x00007ff805ff9392 __CFRunLoopDoObservers + 543\n28 CoreFoundation 0x00007ff805ff8824__ CFRunLoopRun + 840\n29 CoreFoundation 0x00007ff805ff7e1c CFRunLoopRunSpecific + 562\n30 HIToolbox 0x00007ff80eca85e6 RunCurrentEventLoopInMode + 292\n31 HIToolbox 0x00007ff80eca8213 ReceiveNextEventCommon + 283\n32 HIToolbox 0x00007ff80eca80e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70\n33 AppKit 0x00007ff808a32f6d _DPSNextEvent + 927\n34 AppKit 0x00007ff808a3162a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394\n35 AppKit 0x00007ff808a23cd9 -[NSApplication run] + 586\n36 AppKit 0x00007ff8089f7c57 NSApplicationMain + 817\n37 dyld 0x000000010db3552e start + 462"],
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":4396334,"instructionState":{"instructionStream":{"bytes":[0,232,52,255,124,0,72,139,53,57,53,155,62,72,139,29,106,255,7,61,76,137,247,255,211,72,141,61,158,35,11,61,72,137,198,49,192,232,209,90,227,255,76,137,247,76,137,254,255,211,72,139,53,77,119,155,62,72,141,21,126,19,11,61,72,137,199,255,21,53,255,7,61,72,139,53,54,47,155,62,72,137,199,255,21,37,255,7,61,72,137,5,142,40,161,62,15,11,72,141,61,101,173,114,62,72,141,53,30,8,10,61,232,87,0,125,0,233,203,254,255,255,72,141,61,77,173,114,62,72,141,53,6,8,10,61,232,63,0,125,0,233,25,255,255,255,72,137,199,232,10,4,125,0,49,255,49,246,49,192,232,86,90,227,255,232,42,4,125,0,15,11,72,137,195,232,20,4,125,0,72,137,223,232,100,253,124,0,232,3,5,125],"offset":96}},"threadState":{"r13":{"value":105553217546400},"rax":{"value":140286594856960},"rflags":{"value":66050},"cpu":{"value":3},"r14":{"value":105553118402560},"rsi":{"value":4134},"r8":{"value":38},"cr2":{"value":4427150913},"rdx":{"value":4097},"r10":{"value":38},"r9":{"value":140702000576352},"r15":{"value":140703668998873},"rbx":{"value":140703226946560,"symbolLocation":0,"symbol":"objc_msgSend"},"trap":{"value":6},"err":{"value":0},"r11":{"value":140286594861094},"rip":{"value":140703277186586,"matchesCrashFrame":1},"rbp":{"value":140702000578992},"rsp":{"value":140702000578944},"r12":{"value":140286500057168},"rcx":{"value":12853489143963844678},"flavor":"x86_THREAD_STATE","rdi":{"value":140702000577824}},"queue":"com.apple.main-thread","frames":[{"imageOffset":3915290,"symbol":"-[NSApplication _crashOnException:]","symbolLocation":313,"imageIndex":0},{"imageOffset":1749965,"symbol":"__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke","symbolLocation":857,"imageIndex":0},{"imageOffset":9383708,"symbol":"___NSRunLoopObserverCreateWithHandler_block_invoke","symbolLocation":41,"imageIndex":0},{"imageOffset":521472,"symbol":" __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__","symbolLocation":23,"imageIndex":1},{"imageOffset":521106,"symbol":" __CFRunLoopDoObservers","symbolLocation":543,"imageIndex":1},{"imageOffset":518180,"symbol":"__ CFRunLoopRun","symbolLocation":840,"imageIndex":1},{"imageOffset":515612,"symbol":"CFRunLoopRunSpecific","symbolLocation":562,"imageIndex":1},{"imageOffset":189926,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":2},{"imageOffset":188947,"symbol":"ReceiveNextEventCommon","symbolLocation":283,"imageIndex":2},{"imageOffset":188645,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":70,"imageIndex":2},{"imageOffset":257901,"symbol":"_DPSNextEvent","symbolLocation":927,"imageIndex":0},{"imageOffset":251434,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":1394,"imageIndex":0},{"imageOffset":195801,"symbol":"-[NSApplication run]","symbolLocation":586,"imageIndex":0},{"imageOffset":15447,"symbol":"NSApplicationMain","symbolLocation":817,"imageIndex":0},{"imageOffset":21806,"symbol":"start","symbolLocation":462,"imageIndex":3}]},{"id":4396389,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6506,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":4},{"imageOffset":7384,"symbol":"mach_msg","symbolLocation":56,"imageIndex":4},{"imageOffset":525133,"symbol":" __CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":1},{"imageOffset":518616,"symbol":"__ CFRunLoopRun","symbolLocation":1276,"imageIndex":1},{"imageOffset":515612,"symbol":"CFRunLoopRunSpecific","symbolLocation":562,"imageIndex":1},{"imageOffset":1755534,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":0},{"imageOffset":25825,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":5},{"imageOffset":8043,"symbol":"thread_start","symbolLocation":15,"imageIndex":5}]},{"id":4396430,"name":"com.apple.NSURLConnectionLoader","frames":[{"imageOffset":6506,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":4},{"imageOffset":7384,"symbol":"mach_msg","symbolLocation":56,"imageIndex":4},{"imageOffset":525133,"symbol":" __CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":1},{"imageOffset":518616,"symbol":"__ CFRunLoopRun","symbolLocation":1276,"imageIndex":1},{"imageOffset":515612,"symbol":"CFRunLoopRunSpecific","symbolLocation":562,"imageIndex":1},{"imageOffset":2397920,"imageIndex":6},{"imageOffset":362884,"symbol":" __NSThread__ start__","symbolLocation":1009,"imageIndex":7},{"imageOffset":25825,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":5},{"imageOffset":8043,"symbol":"thread_start","symbolLocation":15,"imageIndex":5}]},{"id":4403464,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":4403672,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":4403969,"frames":[{"imageOffset":8008,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703273271296,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15269888,
    "uuid" : "1a1a9da7-da66-31da-92cd-51b9cf968145",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2113.60.148"
  },
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 140703228731392,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5255168,
    "uuid" : "70b99b27-1b5b-33c4-b401-2ecdb80f3303",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1866"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703376580608,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 3096576,
    "uuid" : "06fdecd6-9f69-397b-b1e2-a8226c0ba7ed",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4524802048,
    "size" : 442368,
    "uuid" : "2517e9fe-884a-3855-8532-92bffba3f81c",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703228186624,
    "size" : 229376,
    "uuid" : "d0b338e0-26be-371b-a819-80b7d619a4ad",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703228416000,
    "size" : 49152,
    "uuid" : "e5d44afd-2577-3cee-8711-9d8d426229e0",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703306719232,
    "CFBundleShortVersionString" : "1335.0.3.2",
    "CFBundleIdentifier" : "com.apple.CFNetwork",
    "size" : 4784128,
    "uuid" : "91c33dfa-4410-3b70-b512-4519bc14319b",
    "path" : "\/System\/Library\/Frameworks\/CFNetwork.framework\/Versions\/A\/CFNetwork",
    "name" : "CFNetwork",
    "CFBundleVersion" : "1335.0.3.2"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703243923456,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 3919872,
    "uuid" : "3458e3ba-4778-3b73-80c8-19245d425b38",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1866"
  }
],
  "sharedCache" : {
  "base" : 140703225159680,
  "size" : 19331678208,
  "uuid" : "62c3e042-43ff-3ed0-b185-f12338b5fb88"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=1.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.1G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 768K 6 \nActivity Tracing 256K 1 \nCG backing stores 3840K 4 \nCG image 13.1M 101 \nColorSync 224K 27 \nCoreAnimation 206.6M 272 \nCoreGraphics 12K 2 \nCoreImage 44K 6 \nCoreUI image data 5456K 48 \nFoundation 40K 2 \nImage IO 8K 2 \nKernel Alloc Once 8K 1 \nMALLOC 308.7M 144 \nMALLOC guard page 48K 12 \nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nObjC additional data 15K 1 \nSQLite page cache 192K 3 \nSTACK GUARD 56.0M 6 \nStack 10.5M 6 \nVM_ALLOCATE 228K 28 \nWebKit Malloc 192.0M 5 \n __CTF 756 1 \n__ DATA 63.6M 528 \n __DATA_CONST 29.8M 340 \n__ DATA_DIRTY 1589K 212 \n __FONT_DATA 4K 1 \n__ LINKEDIT 649.1M 16 \n __TEXT 519.3M 539 \n__ UNICODE 592K 1 \ndyld private memory 1024K 1 \nlibnetwork 128K 8 \nmapped file 1.0G 300 \nshared memory 768K 16 \n=========== ======= ======= \nTOTAL 3.4G 2641 \nTOTAL, minus reserved VM space 3.0G 2641 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 240000614
    },
    {
      "rolloutId" : "60186475825c62000ccf5450",
      "factorPackIds" : {

      },
      "deploymentId" : 240000055
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "c28e4ee6-1b08-4f90-8e05-2809e78310a3",
      "experimentId" : "6317d2003d24842ff850182a",
      "deploymentId" : 400000013
    }
  ]
}
}

```

---

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 10, 2023, 8:25pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/3 "2023-07-10T20:25:17Z")

</div>

Here’s are some repro steps.

1. Create a new document in your Draft
2. Paste the text below into the document
3. Select the lines with leading tabs
4. Run Edit \> Text Tidying \> Strip Leading Tabs

Result: Scrivener seems to freeze

1. Click to select a different document in the Binder
2. Click to select the previous document in the Binder

Result Scrivener crashes.

Here’s the text:

```plaintext
Line without tabs
		Line starting with two tabs
		Another line starting with two tabs

```

---

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 10, 2023, 10:38pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/4 "2023-07-10T22:38:11Z")

</div>

Strip Leading Tabs crashed Scrivener again, except this time I didn’t select the lines, so that isn’t a required step.

I can reproduce the crash 100% with the steps above where I select the lines.

If I don’t select the lines, it didn’t crash one time, and it crashed the other time, so not 100% but it still crashes.

---

<div class="post-metadata">

**Author:** ![gr](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/gr/32/38680_2.png) [@gr](https://forum.literatureandlatte.com/u/gr)\
**Post date:** [July 11, 2023, 2:15am UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/5 "2023-07-11T02:15:37Z")

</div>

1. I cannot reproduce. (Scriv 3.3.1, MacOS Ventura)

2. Have you tried copying the very text you posted here and seeing if the same effect ensues? It may be that the goblin that has got you did not carry over with the text you Pasted into your forum post.

3. Are you working always with some _pasted_ text, or can you reproduce with a fresh document and _freshly typed_ text of the same sort?

4. I would apply Scrivener’s Zap Gremlins command to your trouble text and see if that fixes it. It seems highly likely that you have a bad character code in the text that is producing this effect. Gremlin characters are usually acquired from text copied and pasted from elsewhere (e.g. web pages). Needless to say, ideally no character you can get into a doc (by pasting or otherwise) should crash or freeze the app, but … these things are complicated.

---

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 11, 2023, 1:07pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/6 "2023-07-11T13:07:29Z")

</div>

I just tried copying the text I posted here and got the crash first time.

I get the crash without pasting, by typing in the text in a fresh document.

But I’m not getting the crash when I try this in a new project.

Zap Gremlins on the problematic text didn’t stop it crashing. I tried Zap Gremlins on the whole of the draft folder; it didn’t fix it.

---

<div class="post-metadata">

**Author:** ![Waywards](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@Waywards](https://forum.literatureandlatte.com/u/Waywards)\
**Post date:** [July 11, 2023, 1:53pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/7 "2023-07-11T13:53:42Z")

</div>

It’s seems like there’s something particular about my project that’s causing the crash. The Draft folder is 185,000 words. It’s a big haystack.

Other fixes I’ve tried:

1. Emptied the Trash folder.
2. Deleted images and PDFs from the Research folder.
3. Deleted Project Bookmarks
4. Removed all inline annotations from project (I thought this worked because it didn’t crash the first time, but it crashed the second time).
5. I dragged the entire contents of my Draft folder to a new project and it stopped the crash. This might have to be my solution, but it feels risky as I might forget to carry something across, like a style or preference.

---

<div class="post-metadata">

**Author:** ![gr](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/gr/32/38680_2.png) [@gr](https://forum.literatureandlatte.com/u/gr)\
**Post date:** [July 11, 2023, 4:06pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/8 "2023-07-11T16:06:27Z")

</div>

It is puzzling what else the Strip Leading Tabs function might be doing with the project which goes beyond processing the text of the doc.

I’m out of ideas. Hopefully someone will come by that has more.

You might want to contact Lit&Lat support as they can probably read the crash report and have a clue, or they might be able to take a look at the project itself, if you don’t mind bundling it off to them.

---

<div class="post-metadata">

**Author:** ![paulcoholic](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/paulcoholic/32/41205_2.png) [@paulcoholic](https://forum.literatureandlatte.com/u/paulcoholic)\
**Post date:** [June 17, 2025, 5:54am UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/9 "2025-06-17T05:54:50Z")

</div>

This just happened to me today. Twice is crashed, twice it froze. Scrivener 3.4; MacOS 15.5; MBP 13-inch, M2, 2022.

I just emailed three crash reports to hopefully the correct address.

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 17, 2025, 12:51pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/10 "2025-06-17T12:51:14Z")

</div>

Crash reports only help us out so much, the problem with this case is that it was never reproduced outside of the original project as I understand it. I checked our records, and unfortunately there was never any data sent in to tech support. Presumably they felt comfortable enough with option 5 to continue onward with it.

If you’d be willing to send a sample project that crashes when using this command, we’d love to see it! Otherwise you’re going to have to find why it happens, and describe it to us, so we can try recreating those conditions.

---

<div class="post-metadata">

**Author:** ![paulcoholic](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/paulcoholic/32/41205_2.png) [@paulcoholic](https://forum.literatureandlatte.com/u/paulcoholic)\
**Post date:** [June 17, 2025, 9:09pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/11 "2025-06-17T21:09:23Z")

</div>

I’ll see what I can do about trying to replicate this with a fake project (loren impsum generator, here I come!)

I do have a theory I want to test: The project in question had bulletted lists and then tab indents after.

- Item —\> —\>
- Item —\> —\>

I’ve used Strip Leading Tabs before with no issues. I don’t think I’ve used it with the above example. I’ll try to get to this today.

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 17, 2025, 9:12pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/12 "2025-06-17T21:12:30Z")

</div>

Thanks, I got the three crash logs you sent in earlier, by the way.

As for lorem, if you can’t get it to happen in a fresh test project, here are some instructions for [scrambling your project](https://forum.literatureandlatte.com/t/127184/25). That should retain any qualities that would reproduce the bug, as it transposes all letters and numbers to ‘x’. Thus the word counts, word wrap (by and large) and other picky variables will be about the same.

As for lists, it _does_ strip out the first tab in a list, that pushes the marker away from the beginning of the line, however it should come back after a reload, as that is kind of generated from the formatting rather than the other way around, as I understand it. Tabs on the ends of lines shouldn’t ever be touched (unless I guess it is the whole line).

---

<div class="post-metadata">

**Author:** ![paulcoholic](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/paulcoholic/32/41205_2.png) [@paulcoholic](https://forum.literatureandlatte.com/u/paulcoholic)\
**Post date:** [June 17, 2025, 9:56pm UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/14 "2025-06-17T21:56:53Z")

</div>

I cannot replicate it with the loren ipsum fake project. I tried it again with the project this happened in yesterday only to find I had manually removed the tabs and bullets and’fixed’ everything. BUT… I just added bullet lists and tab indents and the project froze! WOO-HOO! It didn’t crash.

Lemme try it again to make it crash… nertz, nothing. Scrivener is working propery now. DARN!! 😉

**I’ll bookmark this thread and if/when it happens I’ll try the scrambling and email it to you.** Thanks for you help!

---

<div class="post-metadata">

**Author:** ![paulcoholic](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/paulcoholic/32/41205_2.png) [@paulcoholic](https://forum.literatureandlatte.com/u/paulcoholic)\
**Post date:** [November 8, 2025, 5:09am UTC](https://forum.literatureandlatte.com/t/crash-with-strip-leading-tabs/135294/15 "2025-11-08T05:09:38Z")

</div>

It happened again! And… _what’s totally kewl_ is that I WAS ABLE TO REPRODUCE IT as per @AmberV’s fresh test project suggestion above. I also used the scrambled project instructions and did that. Crash report and zipped file sent!
