Here at work there's a guy running a release candidate of our product
on a MacBook. In the past 2 weeks, about 3 times now the application
has failed to launch. But he launches the application about 10 times a
day, so it's not a reproducible problem. He believes it has to do with
launching the application immediately after rebooting his computer.
The errors, though, look very scary. They appear to be really high up
in Sun's code.
What I believe to be happening is that we have to make some static
calls to methods in com.t4l.io.MiscIO... in order to reach those
methods, we're initializing a static field that contains a
JFileChooser. While constructing that GUI element, a
ClassCastException is coming up... which causes all of MiscIO to fail
to load... which then makes for ClassNotFound problems whenever we talk
to MiscIO.
Below are edited console outputs; I tried to strip it down to the stack
traces and important system info. As you can see, we're using Quaqua.
I admit it wasn't the latest version; I just updated this morning. But
the ch.randelshofer calls are really low in the stack trace; I don't
think they're to blame at all. (Still, Werner, if you have any ideas
we'd love to hear them.)
It appears a KeyStroke is finding its way into a TreeMap, and a
KeyStroke is not a java.lang.Comparable... so I'm guessing that's why
the TreeMap is choking.
This is not consistently reproducible, but it's scary to have an error
this high up. We wonder if it will get worse? Besides, it just
reflects really poorly on the application when it fails to launch. :)
Any thoughts? We found from past experience that we need to initialize
the JFileChooser early on. I forget the exact rules (there are so many
subtle tricks on Macs)... but I think if we initialize the JFileChooser
*after* QTJava, it can take over 10-20 seconds to initialize. (And if
we initialize it first, it takes less than 3.) So we'd rather figure
out how to make this safe without constructing the JFileChooser lazily.
That's a lot of background, sorry this email is so long. :) Below are
the traces. Any ideas/comments welcome.
- Jeremy Wood
P.S. Yes, he really does have two different amounts of RAM between the
two different sessions.
Session Log for: Sat Aug 26 13:58:51 PDT 2006 (1156625931814)
Log Location: /Users/dallas/Library/Logs/Session Log.txt
Application Version: 3.0 Build Date: August 22 2006
Java Version: 1.4.2_09 OS Name: "Mac OS X 10.4.7"
Hardware: i386 MacBook1,1 CPU: 2000mhz Memory: 1280mb
Language: English (United States)(en_US)
QTJava: installed=true, working=true
java.lang.ClassCastException: javax.swing.KeyStroke
at java.util.TreeMap.compare(TreeMap.java:1085)
at java.util.TreeMap.put(TreeMap.java:463)
at java.util.TreeSet.add(TreeSet.java:209)
at
javax.swing.JComponent.getManagingFocusForwardTraversalKeys(JComponent.j
ava:317)
at javax.swing.JTable.<init>(JTable.java:346)
at javax.swing.JTable.<init>(JTable.java:295)
at
apple.laf.AquaFileChooserUI$JTableExtension.<init>(AquaFileChooserUI.jav
a:2409)
at apple.laf.AquaFileChooserUI.createList(AquaFileChooserUI.java:1763)
at
apple.laf.AquaFileChooserUI.installComponents(AquaFileChooserUI.java:
1534)
at apple.laf.AquaFileChooserUI.installUI(AquaFileChooserUI.java:156)
at javax.swing.JComponent.setUI(JComponent.java:449)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView$1.updat
eUI(PantherFileSystemView.java:96)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView$1.<init
>(PantherFileSystemView.java:89)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView.createF
ileView(PantherFileSystemView.java:88)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView.<init>(
PantherFileSystemView.java:82)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at
ch.randelshofer.quaqua.filechooser.QuaquaFileSystemView.getQuaquaFileSys
temView(QuaquaFileSystemView.java:84)
at
ch.randelshofer.quaqua.panther.QuaquaPantherFileChooserUI.createModel(Qu
aquaPantherFileChooserUI.java:771)
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.j
ava:125)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at com.t4l.io.DirectoryChooser.<init>(MiscIO.java:2030)
at com.t4l.io.MiscIO.<clinit>(MiscIO.java:854)
at com.t4l.io.FileManager.initialize(FileManager.java:60)
at com.t4l.frames.Frames.main(Frames.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.ja
va:52)
java.lang.ClassNotFoundException: com.apple.mrj.swing.MacFileChooserUI
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView$1.updat
eUI(PantherFileSystemView.java:99)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView$1.<init
>(PantherFileSystemView.java:89)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView.createF
ileView(PantherFileSystemView.java:88)
at
ch.randelshofer.quaqua.panther.filechooser.PantherFileSystemView.<init>(
PantherFileSystemView.java:82)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at
ch.randelshofer.quaqua.filechooser.QuaquaFileSystemView.getQuaquaFileSys
temView(QuaquaFileSystemView.java:84)
at
ch.randelshofer.quaqua.panther.QuaquaPantherFileChooserUI.createModel(Qu
aquaPantherFileChooserUI.java:771)
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.j
ava:125)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at com.t4l.io.DirectoryChooser.<init>(MiscIO.java:2030)
at com.t4l.io.MiscIO.<clinit>(MiscIO.java:854)
at com.t4l.io.FileManager.initialize(FileManager.java:60)
at com.t4l.frames.Frames.main(Frames.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.ja
va:52)
[LaunchRunner Error] com.t4l.frames.Frames.main(String[]) threw an
exception:
java.lang.NoClassDefFoundError
at com.t4l.image.ImageUtilities.downloadImage(ImageUtilities.java:1084)
at com.t4l.image.ImageUtilities.createImage(ImageUtilities.java:1150)
at com.t4l.image.ImageUtilities.getImage(ImageUtilities.java:1281)
at com.t4l.image.ImageUtilities.getImage(ImageUtilities.java:1265)
at
com.t4l.image.ImageUtilities.getBufferedImage(ImageUtilities.java:939)
at
com.t4l.image.ImageUtilities.getBufferedImage(ImageUtilities.java:916)
at com.t4l.Tech4Learning.getImage(Tech4Learning.java:130)
at
com.t4l.swing.MeasuredScrollablePreview.<clinit>(MeasuredScrollablePrevi
ew.java:64)
at com.t4l.frames.Frames.main(Frames.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.ja
va:52)
*****************************************
Session Log for: Sat Aug 19 19:34:35 PDT 2006 (1156041275953)
Log Location: /Users/dallas/Library/Logs/Session Log.txt
Application Version: 3.0 Build Date: August 17 2006 Build Number: 2
Java Version: 1.4.2_09 OS Name: "Mac OS X 10.4.7"
Hardware: i386 MacBook1,1 CPU: 2000mhz Memory: 512mb
Language: English (United States)(en_US)
QTJava Reports: installed=true, working=true
java.lang.ExceptionInInitializerError
at com.t4l.io.FileManager.initialize(FileManager.java:60)
at com.t4l.frames.Frames.main(Frames.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.ja
va:52)
Caused by: java.lang.ClassCastException: javax.swing.KeyStroke
at java.util.TreeMap.compare(TreeMap.java:1085)
at java.util.TreeMap.put(TreeMap.java:463)
at java.util.TreeSet.add(TreeSet.java:209)
at
javax.swing.plaf.basic.BasicSplitPaneUI.installDefaults(BasicSplitPaneUI
.java:320)
at
javax.swing.plaf.basic.BasicSplitPaneUI.installUI(BasicSplitPaneUI.java:
267)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JSplitPane.setUI(JSplitPane.java:352)
at javax.swing.JSplitPane.updateUI(JSplitPane.java:380)
at javax.swing.JSplitPane.<init>(JSplitPane.java:334)
at javax.swing.JSplitPane.<init>(JSplitPane.java:229)
at
ch.randelshofer.quaqua.panther.QuaquaPantherFileChooserUI.installCompone
nts(QuaquaPantherFileChooserUI.java:242)
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.j
ava:130)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at com.t4l.io.DirectoryChooser.<init>(MiscIO.java:2030)
at com.t4l.io.MiscIO.<clinit>(MiscIO.java:854)
... 9 more
[LaunchRunner Error] com.t4l.frames.Frames.main(String[]) threw an
exception:
java.lang.NoClassDefFoundError
at com.t4l.image.ImageUtilities.downloadImage(ImageUtilities.java:1084)
at com.t4l.image.ImageUtilities.createImage(ImageUtilities.java:1150)
at com.t4l.image.ImageUtilities.getImage(ImageUtilities.java:1281)
at com.t4l.image.ImageUtilities.getImage(ImageUtilities.java:1265)
at
com.t4l.image.ImageUtilities.getBufferedImage(ImageUtilities.java:939)
at
com.t4l.image.ImageUtilities.getBufferedImage(ImageUtilities.java:916)
at com.t4l.Tech4Learning.getImage(Tech4Learning.java:130)
at
com.t4l.swing.MeasuredScrollablePreview.<clinit>(MeasuredScrollablePrevi
ew.java:64)
at com.t4l.frames.Frames.main(Frames.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.ja
va:52)
_______________________________________________
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