This looks like the obfuscator has moved one of your classes but not
the resources (i.e. images) that were included in the same package.
The NPE on the EDT is likely what's causing your failed repaints.
On Apr 5, 2007, at 9:21 AM, np wrote:
Hi,
I am having trouble with running an application that uses
obfuscated jars on jre 1.4 (OS X 10.4.5, PPC G4). While the app
runs with no problem on CoreDuo MiniMacs (10.4.8, jre.1.5.06),
parts of the GUI will not properly draw on the older System. The
app has a toolbar that uses JButtons with ImageIcons along with
some other swing elements (JPopupMenu, JSpinner and some
JTextFields). When started, the toolbar appears completely blank,
clicking into it will make the GUI elements (also those with Icons)
appear, but they tend to disappear again. I get the following
Exception - that I do not really find any hints on in Google etc -
printed to the console once (there is more than one image in the
toolbar though and I am sure all the resources are present):
apple.awt.EventQueueExceptionHandler Caught Throwable :
java.lang.NullPointerException
java.lang.NullPointerException
at apple.awt.CRenderer.copyImage(CRenderer.java:843)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3097)
at sun.awt.image.ImageRepresentation.drawToBufImage
(ImageRepresentation.java:733)
at apple.awt.OSXImageRepresentation.drawToBufImage
(OSXImageRepresentation.java:76)
at apple.awt.CRenderer.copyImage(CRenderer.java:838)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3097)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3087)
at javax.swing.ImageIcon.paintIcon(ImageIcon.java:322)
at apple.laf.AquaButtonUI.paintIcon(AquaButtonUI.java:486)
at apple.laf.AquaButtonUI.paint(AquaButtonUI.java:427)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
at javax.swing.JComponent.paintComponent(JComponent.java:552)
at javax.swing.JComponent.paint(JComponent.java:840)
at javax.swing.JComponent.paintChildren(JComponent.java:674)
at javax.swing.JComponent.paint(JComponent.java:849)
at javax.swing.JComponent.paintChildren(JComponent.java:674)
at javax.swing.JComponent.paint(JComponent.java:849)
at java.awt.GraphicsCallback$PaintCallback.run
(GraphicsCallback.java:34)
at sun.awt.SunGraphicsCallback.runOneComponent
(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents
(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1325)
at sun.awt.RepaintArea.paint(RepaintArea.java:194)
etc.
Everything works fine with non-obfuscated byte code. I tried
various ways of keeping methods and classes related to the GUI non-
obfuscated, but it does not seem to help. Apart from the GUI,
things seem to work as expected regardless of obfuscation.
Has anybody seen something like this and maybe found a way to make
it work.
thanks
nils
_______________________________________________
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/twall%
40users.sourceforge.net
_______________________________________________
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