I've got a user who's having random crashes that I believe may be related to the discrete GPU on her Macbook Pro and Yosemite. While looking at a few of her crash logs, I traced some of the crashes coming from ScintillaCocoa::StartDrag() at:
NSBitmapImageRep* bitmap = NULL;
if (pixmap)
{
CGImageRef imagePixmap = pixmap->GetImage();
bitmap = [[[NSBitmapImageRep alloc] initWithCGImage: imagePixmap] autorelease];
CGImageRelease(imagePixmap);
pixmap->Release();
delete pixmap;
}
pixmap->GetImage() can return NULL which will cause an exception to terminate the app if you pass that to initWithCGImage:. Like I said, I think she's got other issues but it probably wouldn't hurt to make sure imagePixmap != NULL before creating a bitmap from it. I have determined that the rest of the code functions just fine if bitmap is NULL (you obviously don't see a drag image though).
Added a check with [a2ee0b].
The drag and drop code was recently changed (after 3.5.4 with [81c44d]) to implement NSDraggingSource and use current instead of deprecated APIs. Did the problem start with this change?
Related
Commit: [81c44d]
Commit: [a2ee0b]
The user was originally crashing in a different spot unrelated to Scintilla. I had been using 3.4.1 but upgraded to 3.5.4 for a future update and that's what she's testing now.
So yes, this is a new problem but it's not the source of her original problem since she was on 3.4.1. She claims her crashes only start happening after 2-3 hours of use.
-Chinh Nguyen
Related
Bugs:
#1709Commit: [81c44d]
Commit: [a2ee0b]
Sorry, I mispoke. The problem did not start with the change to implement
NSDraggingSource.
On Tue, Mar 31, 2015 at 5:36 PM, Neil Hodgson nyamatongwe@users.sf.net
wrote:
Related
Bugs:
#1709Commit: [81c44d]
Commit: [a2ee0b]