Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript.execute() stops JVM on PowerMac G5 - why?



T Koyn wrote:
When I run a Java program on a PowerMac G5 that makes thousands of AppleScript calls, first to the Finder to manipulate files, and then to iTunes to create play lists and add songs to them, I find that the JVM often terminates without any exception within NSAppleScript.execute() (I catch Throwable and print the message but there is none caught) after a few hundred calls to NSAppleScript.execute() directed at iTunes. I put tracing statements to confirm it really is stopping in execute().

If I run the same Java program on a PowerBook Titanium, it works fine, talking to both the Finder and iTunes through AppleScript.

Hi,

I don't think it's related to Java, actually. I've been sending scores of AppleEvents from C/ObjC programs to iTunes as well, and sometimes, if I'm too fast, the AppleEvent gets garbled or something, and the AE "decoder" crashes on the result...
My guess is that there is some kind of race condition within iTunes that corrupts the AE stuff every once in a while.
That would explain why it works better on a slow (and mono processor) computer...


my $.02

--
 Nicolas Zinovieff
 Custom developments from France
*-------------------------------*
 Fortune:
SCORPIO (Oct 23 - Nov 21)
	You are shrewd in business and cannot be trusted.  You will
	achieve the pinnacle of success because of your total lack of
	ethics.  Most Scorpio people are murdered.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >NSAppleScript.execute() stops JVM on PowerMac G5 - why? (From: T Koyn <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.