tracking EXC_BAD_ACCESS error in applescript command
tracking EXC_BAD_ACCESS error in applescript command
- Subject: tracking EXC_BAD_ACCESS error in applescript command
- From: François Guillet <email@hidden>
- Date: Sun, 20 Dec 2009 22:50:54 +0100
Hi All,
I'm trying to implement an object-first command targeted at the document of a document based app. Doing so always results in the same EXC_BAD_ACCESS error :
#0 0x00007fff86951466 in -[NSScriptCommand _sendToRemainingReceivers] ()
#1 0x00007fff86951fe5 in -[NSScriptCommand executeCommand] ()
#2 0x00007fff8696902e in -[NSScriptingAppleEventHandler handleCommandEvent:withReplyEvent:] ()
#3 0x00007fff86861156 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
#4 0x00007fff86860f86 in _NSAppleEventManagerGenericHandler ()
#5 0x00007fff868b941e in _NSAppleEventManagerPreDispatchHandler ()
#6 0x00007fff806fe292 in aeDispatchAppleEvent ()
#7 0x00007fff806fe18b in dispatchEventAndSendReply ()
#8 0x00007fff806fe095 in aeProcessAppleEvent ()
#9 0x00007fff821f8879 in AEProcessAppleEvent ()
#10 0x00007fff87e303d5 in _DPSNextEvent ()
#11 0x00007fff87e2fb41 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#12 0x00007fff87df5747 in -[NSApplication run] ()
#13 0x00007fff87dee468 in NSApplicationMain ()
I posted at email@hidden and was replied that the error was likely due to over-releasing an object and wasn't a problem with applescript implementation per se.
The problem is that the object first command calls a very simple method with no other object implied than the document which is properly retained. I implemented a subclass of NSScriptCommand used both for verb first or object first command : everything works fine, I can call [[self evaluatedReceivers] handleCommmand:self] from executeCommand without any problem. The EXC_BAD_ACCESS error, though, always happens if I try to call NSScriptCommand's executeCommand.
Any idea on how can I further investigate this problem ?
(10.6.2, XCode 3.2.1, NSZombie enabled)
Thanks,
François
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden