#1891 Scintilla crashes when run on macOS Sierra 10.12.2


macOS Sierra 10.12.2 exposes a bug in Scintilla where releasing a ScintillaView's marginView will cause a crash.

In troubleshooting the problem, I found that the methods setRulersVisible:NO and setVerticalRulerView:nil on the marginView's scrollView (which should be safe to do) would also cause a crash even on releases prior to macOS Sierra 10.12.2.

I tracked the problem down to the marginView's init method where it sets its clientView to its scrollView's documentView. The crash went away when I commented out the code and I didn't notice any change in behavior with it removed. I don't understand why it's necessary but I assumed it was and instead added [marginView setClientView:nil] to the ScintillaView's dealloc method which also fixed the crash.

Included is a patch to 3.7.1's ScintillaView.mm.

1 Attachments


  • Neil Hodgson

    Neil Hodgson - 2016-12-07
    • labels: --> scintilla, cocoa
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
    • Priority: 1 --> 2
  • Neil Hodgson

    Neil Hodgson - 2016-12-30
    • status: open-fixed --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks