MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.44k stars 1.09k forks source link

Repeated crashing in MacOS Sierra #659

Open andrewresearch opened 8 years ago

andrewresearch commented 8 years ago

MacDown is crashing frequently on a MacBookPro Retina under MacOS Sierra. It seems to be graphics related...

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000028
Exception Note:        EXC_CORPSE_NOTIFY

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

VM Regions Near 0x28:
--> 
    __TEXT                 000000010f6a4000-000000010f73f000 [  620K] r-x/rwx SM=COW  /Applications/MacDown.app/Contents/MacOS/MacDown

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreGraphics          0x00007fff8bcc461c CGColorSpaceGetNumberOfComponents + 15
1   com.apple.QuartzCore            0x00007fff90f6d639 CABackingStoreUpdate_ + 525
2   com.apple.QuartzCore            0x00007fff9108abcc ___ZN2CA5Layer8display_Ev_block_invoke + 75
3   com.apple.QuartzCore            0x00007fff9108a846 CA::Layer::display_() + 1748
4   com.apple.AppKit                0x00007fff8937bc2c -[NSTileLayer display] + 119
5   com.apple.AppKit                0x00007fff89b46a7b -[_NSTiledLayerContents update:shouldCallPrepareContent:] + 5174
6   com.apple.AppKit                0x00007fff892fe5de -[_NSTiledLayer display] + 389
7   com.apple.QuartzCore            0x00007fff9107e9a6 CA::Layer::display_if_needed(CA::Transaction*) + 572
8   com.apple.QuartzCore            0x00007fff9107ead1 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 35
9   com.apple.QuartzCore            0x00007fff910742e8 CA::Context::commit_transaction(CA::Transaction*) + 280
10  com.apple.QuartzCore            0x00007fff90f6b5e5 CA::Transaction::commit() + 475
11  com.apple.QuartzCore            0x00007fff90f6bf46 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 108
12  com.apple.CoreFoundation        0x00007fff8b470f67 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
13  com.apple.CoreFoundation        0x00007fff8b470ed7 __CFRunLoopDoObservers + 391
14  com.apple.CoreFoundation        0x00007fff8b4515d6 CFRunLoopRunSpecific + 454
15  com.apple.HIToolbox             0x00007fff8a9f2f6c RunCurrentEventLoopInMode + 240
16  com.apple.HIToolbox             0x00007fff8a9f2ca9 ReceiveNextEventCommon + 184
17  com.apple.HIToolbox             0x00007fff8a9f2bd6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
18  com.apple.AppKit                0x00007fff890e95f5 _DPSNextEvent + 1093
19  com.apple.AppKit                0x00007fff897f98eb -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
20  com.apple.AppKit                0x00007fff890ddfbd -[NSApplication run] + 926
21  com.apple.AppKit                0x00007fff890a8a8a NSApplicationMain + 1237
22  libdyld.dylib                   0x00007fffa0491255 start + 1
FranklinYu commented 8 years ago

Don't have macOS in hand now. Hope someone would test this.

The preference of MacDown is saved in these two files:

$HOME/Library/Preferences/com.uranusjr.macdown.plist
$HOME/Library/Preferences/com.uranusjr.macdown.LSSharedFileList.plist

Try removing these preferences (and keep a backup if necessary), then restart MacDown?

cebartling commented 8 years ago

Removing the two plist files that you specified solves the repeated crashing of MacDown on macOS Sierra (10.12). Thanks for the tip! Love the tool.

cebartling commented 8 years ago

Looks like there might be some crashes lurking in the Preferences -> Rendering area of the application. In particular, select a different CSS provider will cause a crash, as will turning on syntax highlighting. I can get by with 0.6 today, but there's probably some fixes that will need to be made to make MacDown truly macOS Sierra-ready.

FranklinYu commented 8 years ago

@cebartling Thanks a lot for your digging about the bug. The information is essential for developers.

xor-gate commented 8 years ago

I just replace Mou by MacDown, running on a clean macOS Sierra install. Just a quick markdown preview and no problem so far at my place.

FranklinYu commented 8 years ago

@xor-gate Did you try what @cebartling said (Preferences -> Rendering -> CSS)? Does it cause a crash on your machine?

uranusjr commented 7 years ago

I just released 0.6.3. Could you verify whether the crash persists?

crigouzzo commented 7 years ago

Hello, I am a student in physics, and I have a project in programation. I have exactly the same problem, using QT, my program ( in C++) works fine in text, but suddenly crash when i try to implement a graphic version! I tried looking for the path you gave, but i've only done one year of programming so I couldn't find it... It would be very very helpful if somebody could explain to me step by step? Thanks so much in advance

FranklinYu commented 7 years ago

@loulouminali Sorry, I failed to see why your issue is related to MacDown.

crigouzzo commented 7 years ago

Oh i'm so sorry, i was so happy to find somebody with the same exact problem i didn't check.. I use QT, i'm not shure if it's very different?? Thank you for your quick answer!

FranklinYu commented 7 years ago

@loulouminali If you mean the Qt framework then it is not related.