#1751 Cocoa drag + drop induces later crash outside Scintilla


I can drag and drop text within Scintilla documents without experiencing any crashes. I can also continue editing text after dragging and dropping. However, my application crashes later outside of Scintilla use. The matter of performing drag+drop in Scintilla has been inducing this later crash that is unconnected with Scintilla.

I've traced the source of the inducement to a specific line in ScintillaCocoa.mm. The attached diff shows the line I commented out. Without that line, I cannot induce a crash with drag+drop. With that line, I can do so without fail. I don't know what the fix is, as I know next to nothing about OSX, but I hope you can deduce something.

1 Attachments


  • Neil Hodgson

    Neil Hodgson - 2015-08-14

    The NSGraphicsContext may be being used after deletion. Try adding a save/restore around that code: a [NSGraphicsContext saveGraphicsState]; before the line and a [NSGraphicsContext restoreGraphicsState]; after the call to CopyImageRectangle.

  • Neil Hodgson

    Neil Hodgson - 2015-08-21

    Added a save/restore as a potential fix as [77db85].



    Commit: [77db85]

  • Neil Hodgson

    Neil Hodgson - 2015-08-23

    Changed with [a8a642] to remove the extra context as it does not appear to really be needed.



    Commit: [a8a642]

  • Neil Hodgson

    Neil Hodgson - 2015-08-23
    • labels: --> scintilla, cocoa
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
  • Neil Hodgson

    Neil Hodgson - 2015-09-15
    • 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