Mailing Lists: Apple Mailing Lists

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

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



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.

Both machines have OS X 10.4.7, Java 5 Release 4, and Eclipse 3.2. The PowerBook has iTunes 6.0.1. The G5 had iTunes 5.0.1 and I upgraded it to 6.0.5, but the problem occurs with both versions of iTunes.

Why might NSAppleScript.execute shut down the entire VM with no exception when sending Applescript requests to iTunes, but never when the requests are to the Finder?

In both environments, I am running the program within Eclipse and all activity is coded to be on the main thread of my Java program.

Also, on one freak occasion on the G5, I did get an error back from execute(), Scripting component error. NSAppleScriptErrorNumber -1750, NSAppleScriptErrorRange <0000004b 0000000d>, but this was only once in a number of attempts to execute my Java program.

Thanks in advance.
_______________________________________________
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


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.