ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.77k stars 198 forks source link

Crash whenever we type `[[` #424

Open jonchui opened 7 years ago

jonchui commented 7 years ago

STEPS

  1. create a new note
  2. type [[

EXPECT

ACTUAL:

Exception Name: NSRangeException
Description: *** -[NSBigMutableString characterAtIndex:]: Index 160 out of bounds; string length 160
User Info: (null)

0   CoreFoundation                      0x00007fff943fc52b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x00007fffa8ad4cad objc_exception_throw + 48
2   CoreFoundation                      0x00007fff9447aa0d +[NSException raise:format:] + 205
3   Foundation                          0x00007fff95ddc27c -[NSBigMutableString characterAtIndex:] + 102
4   nvALT                               0x00000001008b04fb nvALT + 148731
5   AppKit                              0x00007fff9279e1a7 -[NSTextView(NSKeyBindingCommands) complete:] + 104
6   nvALT                               0x00000001008b08a9 nvALT + 149673
7   AppKit                              0x00007fff921a20c2 -[NSTextView insertText:replacementRange:] + 3010
8   AppKit                              0x00007fff921a132e -[NSTextView insertText:] + 320
9   nvALT                               0x00000001008b2a0d nvALT + 158221
10  AppKit                              0x00007fff921a11bb -[NSTextInputContext(NSInputContext_WithCompletion) insertText:replacementRange:completionHandler:] + 394
11  AppKit                              0x00007fff9293b75b __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2.225 + 108
12  AppKit                              0x00007fff921a1029 -[NSTextInputContext do_HandleTSMEvent_insertFixLenTextLoop:whileCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 111
13  AppKit                              0x00007fff92939601 -[NSTextInputContext tryHandleTSMEvent_insertFixLenText_withContext:dispatchCondition:setupForDispatch:nestedWorkaroundCondition:nestedWorkaroundDispatchWork:loopCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 387
14  AppKit                              0x00007fff9293b32f __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.157 + 4105
15  AppKit                              0x00007fff921a0ca9 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 + 80
16  AppKit                              0x00007fff921a0c29 -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 93
17  AppKit                              0x00007fff921a0618 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2221
18  AppKit                              0x00007fff9219fcfd _NSTSMEventHandler + 319
19  HIToolbox                           0x00007fff938ec0d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
20  HIToolbox                           0x00007fff938eb346 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
21  HIToolbox                           0x00007fff938eb18f SendEventToEventTargetWithOptions + 43
22  HIToolbox                           0x00007fff93941f86 SendTSMEvent_WithCompletionHandler + 408
23  HIToolbox                           0x00007fff93942460 __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 400
24  HIToolbox                           0x00007fff939422c1 __SendFilterTextEvent_WithCompletionHandler_block_invoke + 215
25  HIToolbox                           0x00007fff93941fd7 SendTSMEvent_WithCompletionHandler + 489
26  HIToolbox                           0x00007fff93941dc1 SendFilterTextEvent_WithCompletionHandler + 236
27  HIToolbox                           0x00007fff93941a82 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 284
28  HIToolbox                           0x00007fff93941838 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 296
29  HIToolbox                           0x00007fff939416de __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 439
30  HIToolbox                           0x00007fff939414a4 TSMKeyEvent_WithCompletionHandler + 632
31  HIToolbox                           0x00007fff939411f3 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 251
32  HIToolbox                           0x00007fff93941020 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 281
33  HIToolbox                           0x00007fff93940d36 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 308
34  HIToolbox                           0x00007fff93940a6d __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 300
35  HIToolbox                           0x00007fff939400bc TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3827
36  AppKit                              0x00007fff92940f16 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke.885 + 116
37  AppKit                              0x00007fff929409c5 __204-[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:]_block_invoke.817 + 121
38  AppKit                              0x00007fff9294082f -[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:] + 285
39  AppKit                              0x00007fff9219e5fb -[NSTextInputContext _handleEvent:options:completionHandler:] + 1298
40  AppKit                              0x00007fff9219e0ae -[NSTextInputContext handleEvent:] + 109
41  AppKit                              0x00007fff9219dfb2 -[NSView interpretKeyEvents:] + 232
42  AppKit                              0x00007fff9219ddc9 -[NSTextView keyDown:] + 704
43  nvALT                               0x00000001008aed5d nvALT + 142685
44  AppKit                              0x00007fff928797ec -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 4086
45  AppKit                              0x00007fff9287842a -[NSWindow(NSEventRouting) sendEvent:] + 541
46  AppKit                              0x00007fff92719a1c -[NSApplication(NSEvent) sendEvent:] + 4768
47  AppKit                              0x00007fff91fff009 -[NSApplication run] + 1002
48  AppKit                              0x00007fff91fc9a8a NSApplicationMain + 1237
49  libdyld.dylib                       0x00007fffa93b2255 start + 1

NOTES:

jonchui commented 7 years ago

@ttscoff here's the zipped version of my .app

nvALT.zip