Panda crashes when enterring headers

Testing version:
Panda 1.0 (2343)

What were you doing:
Entering text.

What feature did you use:
Headings

What happened:
Panda crashes as soon as I type the space after the ‘#’

What did you expect to happen:
No crash.

NOTE: This worked on previous versions of Panda & MacOS. This is a recent change. My mac is a late 2012 Mac Mini, I7, 16GB ram. I’m running MacOS 10.15.7 since it’s the latest that supports my old machine.

Here is the first part of the crash report generated by the computer. Your form only allows 32000 characters and the full report is longer than that:

Process: Panda [19905]
Path: /private/var/folders/*/Panda.app/Contents/MacOS/Panda
Identifier: net.shinyfrog.panda
Version: 1.0 (2343)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Panda [19905]
User ID: 501

Date/Time: 2021-10-18 07:26:10.755 -0500
OS Version: Mac OS X 10.15.7 (19H1419)
Report Version: 12
Anonymous UUID: AB9E1DC6-C5A4-9CC9-6ACE-087F2D3D4E22

Time Awake Since Boot: 720000 seconds

System Integrity Protection: enabled

Notes: Translocated Process

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

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff72a4733a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff72b07e60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff729ce808 abort + 120
3 net.shinyfrog.panda 0x000000010b80b631 0x10b766000 + 677425
4 net.shinyfrog.panda 0x000000010b7b7d6a 0x10b766000 + 335210
5 com.apple.HIToolbox 0x00007fff37240bba DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1953
6 com.apple.HIToolbox 0x00007fff3723fd8d SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 329
7 com.apple.HIToolbox 0x00007fff3723fc3d SendEventToEventTargetWithOptions + 45
8 com.apple.HIToolbox 0x00007fff3729c92b SendTSMEvent_WithCompletionHandler + 381
9 com.apple.HIToolbox 0x00007fff3729cdd5 __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 387
10 com.apple.HIToolbox 0x00007fff3729cc2d __SendFilterTextEvent_WithCompletionHandler_block_invoke + 182
11 com.apple.HIToolbox 0x00007fff3729c97a SendTSMEvent_WithCompletionHandler + 460
12 com.apple.HIToolbox 0x00007fff3729c781 SendFilterTextEvent_WithCompletionHandler + 225
13 com.apple.HIToolbox 0x00007fff3729c44b SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 277
14 com.apple.HIToolbox 0x00007fff3729c1f8 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 281
15 com.apple.HIToolbox 0x00007fff3729c058 __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 355
16 com.apple.HIToolbox 0x00007fff3729bec6 TSMKeyEvent_WithCompletionHandler + 644
17 com.apple.HIToolbox 0x00007fff3729bc27 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 250
18 com.apple.HIToolbox 0x00007fff3729baa6 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 257
19 com.apple.HIToolbox 0x00007fff3729b872 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 282
20 com.apple.HIToolbox 0x00007fff3729b625 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 274
21 com.apple.HIToolbox 0x00007fff3728a15d TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3403
22 com.apple.AppKit 0x00007fff3625bf61 __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke_3.808 + 110
23 com.apple.AppKit 0x00007fff3625bcb3 __204-[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:]_block_invoke.765 + 120
24 com.apple.AppKit 0x00007fff35af9d1f -[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:] + 245
25 com.apple.AppKit 0x00007fff35af9705 -[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:] + 1434
26 com.apple.AppKit 0x00007fff35af912e -[NSTextInputContext _handleEvent:allowingSyntheticEvent:] + 105
27 com.apple.AppKit 0x00007fff35af9023 -[NSView interpretKeyEvents:] + 209
28 com.apple.AppKit 0x00007fff35af8e71 -[NSTextView keyDown:] + 699
29 net.shinyfrog.MDTextKitUI-Mac 0x000000010b8d28de 0x10b8ac000 + 157918
30 net.shinyfrog.MDTextKitUI-Mac 0x000000010b8d294f 0x10b8ac000 + 158031
31 com.apple.AppKit 0x00007fff35a572ad -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 6512
32 com.apple.AppKit 0x00007fff35a55719 -[NSWindow(NSEventRouting) sendEvent:] + 349
33 com.apple.AppKit 0x00007fff35a5444e -[NSApplication(NSEvent) sendEvent:] + 2826
34 com.apple.AppKit 0x00007fff358a0bef -[NSApplication run] + 707
35 com.apple.AppKit 0x00007fff358729a6 NSApplicationMain + 777
36 net.shinyfrog.panda 0x000000010b76db52 0x10b766000 + 31570
37 libdyld.dylib 0x00007fff728ffcc9 start + 1

Thread 1:
0 libsystem_kernel.dylib 0x00007fff72a40dfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff72a41170 mach_msg + 60
2 net.shinyfrog.panda 0x000000010b7bf7ba 0x10b766000 + 366522
3 libsystem_pthread.dylib 0x00007fff72b08109 _pthread_start + 148
4 libsystem_pthread.dylib 0x00007fff72b03b8b thread_start + 15

Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff72a40dfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff72a41170 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff3864e2b7 __CFRunLoopServiceMachPort + 247
3 com.apple.CoreFoundation 0x00007fff3864cd71 __CFRunLoopRun + 1329
4 com.apple.CoreFoundation 0x00007fff3864c1e3 CFRunLoopRunSpecific + 466
5 com.apple.AppKit 0x00007fff35a51ea4 _NSEventThread + 132
6 libsystem_pthread.dylib 0x00007fff72b08109 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff72b03b8b thread_start + 15

Thread 3:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff72a40dfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff72a41170 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff3864e2b7 __CFRunLoopServiceMachPort + 247
3 com.apple.CoreFoundation 0x00007fff3864cd71 __CFRunLoopRun + 1329
4 com.apple.CoreFoundation 0x00007fff3864c1e3 CFRunLoopRunSpecific + 466
5 com.apple.CFNetwork 0x00007fff36e73016 0x7fff36e29000 + 303126
6 com.apple.Foundation 0x00007fff3ad05212 NSThread__start + 1064
7 libsystem_pthread.dylib 0x00007fff72b08109 _pthread_start + 148
8 libsystem_pthread.dylib 0x00007fff72b03b8b thread_start + 15

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

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

Thread 6:
0 libsystem_pthread.dylib 0x00007fff72b03b68 start_wqthread + 0

Hi there,

Just checking in on the above.

Does this still occur on the latest Panda version (2510) for you?

If so, no worries, we will investigate further!

Yes, I just updated panda and tried again. It still crashes when I type a # followed by a space.
It also crashes when I type something and use the menu to select Heading
I attached the MacOS Problem Report if that helps.

Thanks,
Eddie Williamson

PandaCrash.rtf (99.9 KB)

Hi Eddie,

Many thanks for your response and additional information.

We will investigate this further. cc - @matteo