[Adium-devl] AppleScript has some problems.
Matt Handley
applmak at gmail.com
Sun Sep 23 15:12:32 UTC 2007
In r20893, files were merged from trunk to my applescript branch. When
this happened, something very subtle changed about the way Adium
works, and now AppleScript cannot control Adium whatsoever. Any script
that attempts to get any information is met with an raised exception
(NSEvaluationScriptError: 3). Other custom verbs (like go <status>) do
nothing. So something is extremely wrong.
However, it doesn't really look like it's any change to the
AppleScript components itself: the sdef did not change, Adium_2.plist
still has the correct keys to enable scripting, and the Obj-C code
looks fine, too. Also, when you enable debug output for all apple
events (defaults write NSGlobalDomain NSScriptingDebugLogLevel 1),
it's clear that the error is occurring before Adium's code is being
executed (somewhere in the AS-Cocoa bridge).
So, if I were to guess at what's happening (and this is a mostly wild
guess), I would suspect some memory weirdness is overwriting some key
piece of information that AS needs to respond to the script command
correctly.
On a potentially related note, whenever an command is run (regardless
of what it raises or returns), at some point in the future, Adium
crashes. The backtrace usually has something to do with Jabber. He's
one I thought to copy to a file:
(gdb) bt
#0 0xfffeff10 in objc_msgSend_rtp ()
#1 0x92cace0c in _structuredErrorFunc ()
#2 0x91d5bcd8 in __xmlRaiseError ()
#3 0x91d5e4c8 in xmlSubstituteEntitiesDefault ()
#4 0x91d6c9a4 in xmlParseDocument ()
#5 0x91d70658 in xmlSAXUserParseMemory ()
#6 0x099ed980 in xmlnode_from_str ()
#7 0x03653628 in xmlnode_sent_cb (gc=0xfd895fd0, packet=0xbfffe47c,
this=0x2724bfe4) at
/Users/handley/Desktop/adium-branches/summer_of_code_2007/applescript/Plugins/Purple
Service/AMXMLConsoleController.m:44
#8 0x09a0f604 in purple_marshal_VOID__POINTER_POINTER ()
#9 0x09a0eea4 in purple_signal_emit_vargs ()
#10 0x09a0ece0 in purple_signal_emit ()
#11 0x09a7d544 in jabber_send_raw ()
#12 0x09a7d818 in jabber_keepalive ()
#13 0x09a464cc in send_keepalive ()
#14 0x03613db4 in callTimerFunc (timer=0x2c7d0fbc, info=0x2c7cefcc) at
/Users/handley/Desktop/adium-branches/summer_of_code_2007/applescript/Plugins/Purple
Service/adiumPurpleEventloop.m:194
#15 0x907f1578 in __CFRunLoopDoTimer ()
#16 0x907ddef8 in __CFRunLoopRun ()
#17 0x907dd4ac in CFRunLoopRunSpecific ()
#18 0x9329bb20 in RunCurrentEventLoopInMode ()
#19 0x9329b1b4 in ReceiveNextEventCommon ()
#20 0x9329b020 in BlockUntilNextEventMatchingListInMode ()
#21 0x937a1ae4 in _DPSNextEvent ()
#22 0x937a17a8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#23 0x9379dcec in -[NSApplication run] ()
#24 0x9388e87c in NSApplicationMain ()
#25 0x00003fe8 in main (argc=1, argv=0xbffff840) at
/Users/handley/Desktop/adium-branches/summer_of_code_2007/applescript/Source/main.m:3
(gdb) info threads
0x9000b348 in mach_msg_trap ()
11 process 8061 thread 0x9f0b 0x9000b348 in mach_msg_trap ()
10 process 8061 thread 0xa70b 0x9002c4b8 in semaphore_wait_trap ()
8 process 8061 thread 0xe303 0x90054388 in semaphore_timedwait_signal_trap ()
6 process 8061 thread 0xae0b 0x9001f88c in select ()
5 process 8061 thread 0x8a03 0x9000b348 in mach_msg_trap ()
2 process 8061 thread 0x5603 0xfffeff10 in objc_msgSend_rtp ()
* 1 process 8061 local thread 0xf03
(gdb)
Anywho, this terribly important (for AS to work) bug needs to be
squashed. It's ticket # is 7968 (http://trac.adiumx.com/ticket/7968).
Any help you can give me to help track this down would be much appreciated.
Matt
More information about the devel
mailing list