Bug 441394 - Problems with fonts and printing
Problems with fonts and printing
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Thomas Fitzsimmons
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-07 16:33 EDT by Paul Osmialowski
Modified: 2008-04-20 05:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-19 15:51:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Paul Osmialowski 2008-04-07 16:33:14 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.8.1.13) Gecko/20080325 Fedora/2.0.0.13-1.fc8 Firefox/2.0.0.13

Description of problem:
Two problems with Javas on F8:

1. I can't make printings from Javas:
- java-1.7.0-icedtea-1.7.0.0-0.19.b21.snapshot.fc8 (exception)
- Sun jdk-6u2-linux (exception)
I can only print from java:
- ibm-java2-i386-sdk-5.0-5.0 (print selection starts as expected)
Before I've upgraded to F8 I was able to print from javas:
- java-1.4.2-gcj-compat-1.4.2.0-40jpp.110
- Sun jdk-6u2-linux
...while I wasn't able to print from java Sun jdk-1_5_0_09-linux (no printer selection opens)

2. On both FC6 and F8 I can't use java other than gcj since only gcj java has proper font for preparing my very important printings. I hope gcj will never gone from Fedora and soon it will be able to print again.


Version-Release number of selected component (if applicable):
java-1.7.0-icedtea-1.7.0.0-0.19.b21.snapshot.fc8 java-1.5.0-gcj-1.5.0.0-17.fc8

How reproducible:
Always


Steps to Reproduce:
1. Install one of distro Javas (gcj, icedtea)
2. Run any serious application that has print option
3. Try to print a document

Actual Results:
Exception during event dispatch:
java.lang.IllegalArgumentException: Given print service array / attributes may not be null
   at javax.print.ServiceUI.printDialog(libgcj.so.8rh)
   at gnu.java.awt.print.JavaPrinterJob.printDialog(libgcj.so.8rh)
   at gnu.java.awt.print.JavaPrinterJob.printDialog(libgcj.so.8rh)
   at AbstractPrintCreator.print(Unknown Source)
   at PrintPreview$printAL.actionPerformed(Unknown Source)
   at javax.swing.AbstractButton.fireActionPerformed(libgcj.so.8rh)
   at javax.swing.AbstractButton$EventHandler.actionPerformed(libgcj.so.8rh)
   at javax.swing.DefaultButtonModel.fireActionPerformed(libgcj.so.8rh)
   at javax.swing.DefaultButtonModel.setPressed(libgcj.so.8rh)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(libgcj.so.8rh)
   at java.awt.Component.processMouseEvent(libgcj.so.8rh)
   at java.awt.Component.processEvent(libgcj.so.8rh)
   at java.awt.Container.processEvent(libgcj.so.8rh)
   at java.awt.Component.dispatchEventImpl(libgcj.so.8rh)
   at java.awt.Container.dispatchEventImpl(libgcj.so.8rh)
   at java.awt.Component.dispatchEvent(libgcj.so.8rh)
   at java.awt.LightweightDispatcher.redispatch(libgcj.so.8rh)
   at java.awt.LightweightDispatcher.handleMouseEvent(libgcj.so.8rh)
   at java.awt.LightweightDispatcher.dispatchEvent(libgcj.so.8rh)
   at java.awt.Container.dispatchEventImpl(libgcj.so.8rh)
   at java.awt.Window.dispatchEventImpl(libgcj.so.8rh)
   at java.awt.Component.dispatchEvent(libgcj.so.8rh)
   at java.awt.EventQueue.dispatchEvent(libgcj.so.8rh)
   at java.awt.EventDispatchThread.run(libgcj.so.8rh)

Expected Results:
Printer selection window opened

Additional info:
Strangely IBM Java behaves as it should and opens printer selection window as FC6 javas did. Unfortunately, IBM java has problems with font in application I'm using. The same problems with fonts have: Sun Java (on FC6 and F8), Icedtea (on F8), Blackdown (on FC6). Only gcj (on FC6 and F8) displays fonts properly. Also I had no problems with fonts in this application while running Sun Java on Windows.
Comment 1 Thomas Fitzsimmons 2008-04-15 11:45:34 EDT
Can you retest on java-1.6.0-openjdk in Rawhide?  I'd like to focus on fixing it
first, since that's where active development is happening right now.  Do any of
the demos in java-1.6.0-openjdk-demos attempt to print?
Comment 2 Thomas Fitzsimmons 2008-04-15 11:46:45 EDT
s/in Rawhide/from Rawhide/

You can install Rawhide java-1.6.0-openjdk* like this:

yum --enablerepo=development install 'java-1.6.0-openjdk*'
Comment 3 Paul Osmialowski 2008-04-15 18:17:14 EDT
I've installed that, /usr/bin/java points to /etc/alternatives/java which itself
points to /usr/lib/jvm/jre-1.6.0-openjdk/bin/java. Unfortunately, printer
selection window still cannot be shown (with the same exception thrown), I've
tried on regular user and on root with the same result. Also fonts are displayed
bad in the program I'm using. I couldn't find any package named
java-1.6.0-openjdk-demos, so I can't say anything about it.
Comment 4 Paul Osmialowski 2008-04-15 18:19:34 EDT
Ooops, previously I've pasted exception message from gcj-compat java so it
couldn't be the same. Here's the exception thrown by openjdk:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: null
attribute
        at
sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1176)
        at
sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2164)
        at
sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1280)
        at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:454)
        at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:212)
        at sun.print.ServiceDialog.<init>(ServiceDialog.java:141)
        at javax.print.ServiceUI.printDialog(ServiceUI.java:206)
        at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:880)
        at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:439)
        at AbstractPrintCreator.print(Unknown Source)
        at PrintPreview$printAL.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6101)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
        at java.awt.Component.processEvent(Component.java:5866)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4462)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Comment 5 Thomas Fitzsimmons 2008-04-15 18:27:38 EDT
Meant to say: java-1.6.0-openjdk-demo.
Comment 6 Thomas Fitzsimmons 2008-04-15 18:39:50 EDT
I tested:

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/demo/jfc/Font2DTest/Font2DTest.jar

and printing works -- I don't see the exception you're seeing.
Comment 7 Thomas Fitzsimmons 2008-04-15 18:46:04 EDT
Can you run Font2DTest.jar and select File -> Print, then select "Print one page
from currently displayed character/line", then click the "Print" button, then
click "Print" in the print dialog?  Let me know how far you get and we can
continue debugging from there.
Comment 8 Paul Osmialowski 2008-04-16 04:07:41 EDT
This test (started using openjdk) has thrown such an exception after I'd clicked
'Print' button in 'Print..." window opened by File->Print menu option:
Exception occurred during event dispatching:
java.lang.NullPointerException: null attribute
        at
sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1176)
        at
sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2164)
        at
sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1280)
        at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:454)
        at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:212)
        at sun.print.ServiceDialog.<init>(ServiceDialog.java:141)
        at javax.print.ServiceUI.printDialog(ServiceUI.java:206)
        at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:880)
        at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:439)
        at FontPanel.doPrint(FontPanel.java:314)
        at Font2DTest.actionPerformed(Font2DTest.java:887)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6101)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
        at java.awt.Component.processEvent(Component.java:5866)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4462)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
        at java.awt.Dialog$1.run(Dialog.java:1072)
        at java.awt.Dialog$3.run(Dialog.java:1126)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1124)
        at Font2DTest.actionPerformed(Font2DTest.java:854)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1688)
        at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1732)
        at java.awt.Component.processMouseEvent(Component.java:6101)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
        at java.awt.Component.processEvent(Component.java:5866)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4462)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4288)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Unfortunately, ibm-java2-i386-sdk-5.0-5.0 couldn't run this test at all so I
couldn't make compare due to this exception it throws:
Exception in thread "main" java.lang.NoSuchFieldError:
java/awt/RenderingHints.KEY_TEXT_LCD_CONTRAST
        at FontPanel.getDefaultLCDContrast(FontPanel.java:1372)
        at FontPanel.<init>(FontPanel.java:145)
        at Font2DTest.<init>(Font2DTest.java:132)
        at Font2DTest.main(Font2DTest.java:1024)
Comment 9 Thomas Fitzsimmons 2008-04-16 16:18:04 EDT
Are you able to print a test page from system-config-printer?
Comment 10 Paul Osmialowski 2008-04-17 03:56:08 EDT
Sure, I can print from system-config-printer as from any other program. I can
also print from Java programs ONLY when I'm using ibm-java2-i386-sdk-5.0-5.0,
this window opens then:
http://fish.king.net.pl/~newchief/hidden/fedora8/ibmjava-printing.png
Unfortunately, I can't use IBM java for the Java program I'm mostly using, due
to problems with fonts (displayed and printed on paper). Only gcj Java displays
(and prints on paper) fonts correctly, unfortunately, it cannot open Printer
Selection window on F8 (which was possible on FC6!). The same goes to any other
Java VM (Sun, IcedTea, OpenJDK) running on F8 (strangely, IBM Java has no
problem with that). Here's my CUPS settings, I have one HP network printer
configured:
http://fish.king.net.pl/~newchief/hidden/fedora8/etc
Comment 11 Mark Wielaard 2008-04-18 18:32:47 EDT
This is upstream bug http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=81
and should be solved by the new openjdk/icedtea package
http://koji.fedoraproject.org/koji/taskinfo?taskID=572490
Comment 12 Paul Osmialowski 2008-04-20 05:02:24 EDT
As I see, the solution to this problem has been found. Will you fix gcj Java for
F8 also? I guess, printing ability is worth it!

Note You need to log in before you can comment on or make changes to this bug.