#13302 closed defect (fixed)
Print plugin crashes once "custom size" is set
Reported by: | skyper | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin print | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- open printing dialog
- set the paper size to "custom size"
- close the dialog with this setting
- try to open printing dialog again
What is the expected result?
printing dialog opens
What happens instead?
IllegalArgumentException
Please provide any additional information below. Attach a screenshot if possible.
Seems to be no possibility to change the setting back to default within the preferences.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-08-09 00:25:24 +0200 (Tue, 09 Aug 2016) Build-Date:2016-08-09 01:35:26 Revision:10770 Relative:URL: ^/trunk Identification: JOSM/1.5 (10770 en) Linux Debian GNU/Linux 8.5 (jessie) Memory Usage: 586 MB / 882 MB (108 MB allocated, but free) Java version: 1.8.0_91-8u91-b14-1~bpo8+1-b14, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-8-jre:amd64-8u91-b14-1~bpo8+1 Java ATK Wrapper package: libatk-wrapper-java:all-0.30.5-1 Program arguments: [--language=en] Dataset consistency test: No problems found Plugins: + conflation (0.2.0) + jts (32539) + print (32502) + undelete (32584) + utilsplugin2 (32725) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 Last errors/warnings: - W: JOSM expected to find primitive [way -10474] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work. - E: java.lang.Exception - W: JOSM expected to find primitive [way -10474] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work. - E: java.lang.Exception - W: JOSM expected to find primitive [way -10750] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work. - E: java.lang.Exception - W: JOSM expected to find primitive [way -10750] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work. - E: java.lang.Exception - W: Print request attribute not supported: page-ranges: class javax.print.attribute.standard.PageRanges - 1-2147483647 - E: java.lang.IllegalArgumentException: Invalid enum: class sun.print.CustomMediaSizeName - 82 === REPORTED CRASH DATA === BugReportExceptionHandler$BugReporterThread#askForBugReport: No data collected. === STACK TRACE === Thread: AWT-EventQueue-0 (17) of main java.lang.IllegalArgumentException: Invalid enum: class sun.print.CustomMediaSizeName - 82 at org.openstreetmap.josm.plugins.print.PrintDialog.unmarshallPrintSetting(PrintDialog.java:534) at org.openstreetmap.josm.plugins.print.PrintDialog.loadPrintSettings(PrintDialog.java:556) at org.openstreetmap.josm.plugins.print.PrintDialog.<init>(PrintDialog.java:151) at org.openstreetmap.josm.plugins.print.PrintAction.run(PrintAction.java:70) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Attachments (0)
Change History (6)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
follow-up: 3 comment:2 by , 9 years ago
I've published a potential fix in [o33118:33119] (not really sure it works). Can you please test?
follow-up: 5 comment:3 by , 9 years ago
Replying to Don-vip:
I've published a potential fix in [o33118:33119] (not really sure it works). Can you please test?
Does not crash anymore and "custom size" is set. Only minor issue is that the setting is not remembered in the printer setting dialog and it is always back to default (A4).
Replying to Don-vip:
I don't have the value "Custom size" on my system.
Does depend on the printer and the driver.
After you select this option and quit JOSM, can you please share the value of the preference entries beginning by "print.settings."?
Here you go:
<tag key='print.map-scale' value='2000'/> <tag key='print.preview.enabled' value='true'/> <tag key='print.resolution.dpi' value='600'/> <lists key='print.settings.request-attributes'> <list> <entry value='javax.print.attribute.standard.Copies'/> <entry value='javax.print.attribute.standard.Copies'/> <entry value='javax.print.attribute.IntegerSyntax'/> <entry value='1'/> </list> <list> <entry value='javax.print.attribute.standard.Media'/> <entry value='sun.print.CustomMediaSizeName'/> <entry value='javax.print.attribute.EnumSyntax'/> <entry value='342'/> </list> <list> <entry value='javax.print.attribute.standard.OrientationRequested'/> <entry value='javax.print.attribute.standard.OrientationRequested'/> <entry value='javax.print.attribute.EnumSyntax'/> <entry value='4'/> </list> <list> <entry value='javax.print.attribute.standard.Chromaticity'/> <entry value='javax.print.attribute.standard.Chromaticity'/> <entry value='javax.print.attribute.EnumSyntax'/> <entry value='1'/> </list> </lists> <lists key='print.settings.service-attributes'> <list> <entry value='javax.print.attribute.standard.PrinterName'/> <entry value='javax.print.attribute.standard.PrinterName'/> <entry value='javax.print.attribute.TextSyntax'/> <entry value='HP_LaserJet_4100_Series'/> </list> </lists>
comment:4 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
follow-up: 6 comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to skyper:
Does not crash anymore and "custom size" is set. Only minor issue is that the setting is not remembered in the printer setting dialog and it is always back to default (A4).
If the custom size is displayed in the initial dialog but not in the printer setting dialog, that's a java/driver issue, I can't do anything about it.
Closing the ticket as fixed then.
comment:6 by , 9 years ago
Replying to Don-vip:
Replying to skyper:
Does not crash anymore and "custom size" is set. Only minor issue is that the setting is not remembered in the printer setting dialog and it is always back to default (A4).
If the custom size is displayed in the initial dialog but not in the printer setting dialog, that's a java/driver issue, I can't do anything about it.
No, I meant once I have set it to "custom (size)" in the printer setting dialog and open this dialog again it is back to default where when I set it e.g. to "A5" it is remembered if I reopen the dialog. But this is a minor clinch.
I don't have the value "Custom size" on my system. After you select this option and quit JOSM, can you please share the value of the preference entries beginning by "print.settings."?