Zettelkasten Forum

[SOLVED] [BUG] Crash on unindent

edited February 2020 in Resolved Issues

I use tab and shift-tab to indent and unindent lines in The Archive; I have indents set to four spaces (not sure if that's a default or not). Under specific conditions, shift-tab crashes the app.

To re-create:

  1. tab to indent
  2. delete one of those spaces
  3. shift-tab to unindent

Great app; this is the only real glitch I've run into.

Post edited by ctietze on


  • Good catch, thanks! Fix will ship soon :)

    Author at Zettelkasten.de • https://christiantietze.de/

  • @tf2 I could reproduce this yesterday, but the problem disappeared today all of a sudden. Does this still crash for you? If so, please get in touch via email and send me the crash reports (found in Console.app under "User Reports")

    Author at Zettelkasten.de • https://christiantietze.de/

  • edited January 2020

    I'm resurrecting a zombie thread here, but I saw a crash today on unindent (using cmd-[ ) in 1.4.6(149). Crash log attached. I had just opened an existing note, went to the end and created a new line after an indented paragraph. (OK, apparently Crash Log not attached - I'm getting an error popup "You are not allowed to upload files in this category.")
    (and I just noticed that the forum still posted my earlier comments despite the file upload error. Sorry for the spam, feel free to delete)

  • Reproduced again. Go to the last line of an indented paragraph (4 spaces), to open a new line, backspace then CMD-[.

    Version 1.4.6 (149)

    My guess is the outdentLine is outdenting by 4 characters and not checking for cursor position (or end of line?) which goes negative.

    I still can't attach a Crash log, but the important lines are:

    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 Signal:    Illegal instruction: 4
    Termination Reason:    Namespace SIGNAL, Code 0x4
    Terminating Process:   exc handler [11141]
    Application Specific Information:
    Performing @selector(outdentLine:) from sender NSMenuItem 0x600003c65ec0
    Fatal error: Out of bounds: index >= endIndex
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   libswiftCore.dylib              0x00007fff754da483 specialized _fatalErrorMessage(_:_:file:line:flags:) + 307
    1   libswiftCore.dylib              0x00007fff7541cead specialized Slice.subscript.getter + 1949
    2   libswiftCore.dylib              0x00007fff7544e549 Substring.subscript.getter + 9
    3   de.christiantietze.TastefulTextView 0x000000010ec7c4b4 Indentation.matchesLineStart(substring:) + 500
    4   de.christiantietze.TastefulTextView 0x000000010ec7c1f1 closure #1 in Indentation.removals(selectedRange:in:) + 113
    5   de.christiantietze.TastefulTextView 0x000000010ec4a372 partial apply for closure #1 in Indentation.removals(selectedRange:in:) + 34
    6   libswiftFoundation.dylib        0x00007fff757bf2f4 partial apply for closure #1 in StringProtocol.enumerateSubstrings<A>(in:options:_:) + 196
  • Thanks for providing more details, @dttocs! I'll be working on it, soon, once the Online Course draft is through.

    Author at Zettelkasten.de • https://christiantietze.de/

  • Fixed in today's release of v1.4.7 on the Cutting Edge channel!

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.