QTJ 10/16/05: WTF?

by Chris Adamson

Related link: 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.

Did QTJ's 10/16/05 bug affect your work?


2005-10-20 11:44:44
Another QTJ project
Oops, forgot to mention vBlog Central: http://www.vblogcentral.com/
2005-10-20 18:30:06

The fix was released Thursday, 10/20/05. You need to grab the full QuickTime installer, or the iTunes + QuickTime installer. Just running the QuickTime Updater to check for updates didn't get it when I checked.

If you're a Java programmer and you want to check the version, look at the String returned by QTBuild.info(). In the fix, it's [QTJava:6.1.3g1]