QTJ 10/16/05: WTF?

Email.Email weblog link
Blog this.Blog this

Chris Adamson
Oct. 19, 2005 07:03 AM

Atom feed for this author. RSS 1.0 feed for this author. RSS 2.0 feed for this author.

URL: http://lists.apple.com/archives/quicktime-java//2005/Oct/msg00055.html...

Update, Oct 20, 2005, 9:30 PM EDT - this has been fixed. See the talkbacks.

The first word of the problem came in Dominik Grusemann's message to the quicktime-java list on Sunday, QTJava not valid:

Since today I get the following Exception:

This version of QTJava has expired

Well, I know what it means, but I think having the
most current version of Quicktime installed,
this should not happen.

Any ideas?



The problem was also reported almost immediately to Apple's support forums. And sure enough, any QuickTime for Java program on Windows now fails, because any such program must call QTSession.open() to use QTJ, and QTSession's static initializer calls a QTBuild.isValid() method, which is now throwing an exception.

The problem appears to be a beta expiration mistakenly left in the production version of QuickTime 7. If you reset the Windows clock to October 15th or earlier, QTJ applications will work again. For example, running the QTVersionCheck example from chapter 1 of QuickTime for Java: A Developer's Notebook will produce the following, if the system date is 10/15/05 or earlier:

$ ant run-ch01-qtversioncheck
[ant output omitted for clarity]
     [java] QT version: 7.0
     [java] QTJ version: 6.1

On the other hand, if you run it on or after 10/16, you get:

     [java] This version of QTJava has expired
     [java] java.lang.ExceptionInInitializerError
     [java]     at com.oreilly.qtjnotebook.ch01.
     [java] Caused by: java.lang.SecurityException: QTJava has expired.
     [java]     at quicktime.util.QTBuild.isValid(QTBuild.java:72)
     [java]     at quicktime.QTSession.<clinit>(QTSession.java:73)
     [java]     ... 1 more
     [java] Exception in thread "main"
     [java] Java Result: 1

So, tiny little mistake, but huge, huge deal, as this basically breaks every QTJ application on Windows (QTJ on Mac does not have the bug). And this comes just when things were getting better for QTJ on Windows, with QuickTime 7 installing it by default instead of making Java developers jump through extra hoops to get it installed.

Apple can fix things quickly - after all, it only took a few hours to take down iTunes 2 after reports surfaced that its installer could erase the target drive. In fact, QTJ's original chief architect, Bill Stewart, has already said that a fix is underway. For the truly desperate who don't mind breaking the QuickTime license terms in an emergency, there's the option of compiling a non-broken version of QTBuild (aside: this is the kind of scenario that led to the Java Internal Use License back in the Java world).

Maybe I'm stretching for a bright spot, but one thing that surprised me was all the new people posting to the quicktime-java about the problems they were seeing. Instead of just the list regulars posting, it became clear that there are lot more people actively working with QTJ than is immediately apparent from only the high-profile QTJ projects like Amateur, I/ON, Magnolia, etc. So many people responding so quickly to the problem indicates there is a lot of QTJ use under the radar - internal-use apps, kiosks, education, hobbyists, etc. Let's hope for their sake that Apple gets an official fix out quickly. Today would be good.

Chris Adamson is an author, editor, and developer specializing in iPhone and Mac.