Crash problem in framework code
Crash problem in framework code
- Subject: Crash problem in framework code
- From: Mark Malson <email@hidden>
- Date: Fri, 19 Jul 2002 12:42:59 -0400
Has anyone ever seen this before?
I've got a Cocoa app and occasionally it crashes. The app accepts a folder
dragged on to a thing, and I look through the folder and do stuff with it.
It can be a lengthy process if the folder has a lot of items or if it's on a
network drive.
The crash I'm seeing is AFTER all the things are processed -- I get an
EXC_BAD_ACCESS. Here are the last few functions it is in:
AEGetDescDataSize
AESizeOfFlattenedDesc
__initialize_Cplusplus
GetPasteboardFlavorType
CFMessagePortSendRequest
CFStringEncodingByteLengthForCharacters
CFRunLoopRunInMode
CFRunLoopRunSpecific
CFRunLoopRunInMode
InvokeThemeButtonDrawUPP
GetNextWindow
Etc. etc. It's library functions (i.e., not my code) all the way down.
My drop processing is an overridden method of NSImageView
(performDragOperation) and it basically does this:
NSDocumentController *docs = [NSDocumentController
sharedDocumentController];
MyDocumentType *doc;
doc = [ docs openUntitledDocumentOfType:@"MyDocumentType" display:YES ];
[ doc performSelector:@selector(setFolder:) withObject:folder afterDelay:0.2
];
The setFolder selector then scans through the folders and populates things
in the new window.
My log shows that the performDragOperation finishes, then
concludeDragOperation finishes, then setFolder is called and all the stuff
in the scan logic happens just fine. After that9s all done, the app crashes.
Sometimes. (It seems to crash more reliably, but not always, if I drag a
folder from a network volume the operation takes several seconds in that
case.)
The stack trace looks like the framework is trying to grab something off the
pasteboard and getting garbage. Is it trying to get the things from the
drag? I didn9t do anything to the pasteboard data (that I know of) except
read it. Is there anything special I9m supposed to do in my
NSDraggingDestination protocol implementation? I9m stumped...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.