Opened 13 years ago
Closed 13 years ago
#8021 closed defect (fixed)
[Patch] Cannot launch JOSM (division by 0 when getting screen info)
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | Cc: |
Description
either double-click or launch from command line 'java -jar josm-tested.jar', getting the following error messages:
java.lang.ArithmeticException: / by zero at org.openstreetmap.josm.tools.WindowGeometry.getScreenInfo(WindowGeometry.java:321) at org.openstreetmap.josm.tools.WindowGeometry.centerOnScreen(WindowGeometry.java:48) at org.openstreetmap.josm.gui.SplashScreen.<init>(SplashScreen.java:96) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:316)
tested josm-tested.jar (version 5482) on Mac OS X 10.6 with Java version 1.6.0_33
Attachments (1)
Change History (5)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | 8021.patch added |
---|
follow-up: 3 comment:2 by , 13 years ago
Priority: | normal → major |
---|---|
Summary: | Cannot launch JOSM → [Patch] Cannot launch JOSM (division by 0 when getting screen info) |
I can't remember if there was a good reason to iterate on all screen configurations. Here's a non-tested patch (I have only one screen right now) that checks devices are really screens (and not printers or image buffers), considers only the default configuration, and avoids the division by 0.
@team: tests are welcome :)
comment:3 by , 13 years ago
Replying to Don-vip:
I can't remember if there was a good reason to iterate on all screen configurations. Here's a non-tested patch (I have only one screen right now) that checks devices are really screens (and not printers or image buffers), considers only the default configuration, and avoids the division by 0.
@team: tests are welcome :)
8021.patch works, and JOSM launchs without any problem.
alos confirmed the multi-screen issue, unpatched JOSM (version 5485) does launch if the extenal screen is disconnected
thanks Don!
Is it 100% reproducible on your system ?
Can you tell me how many screens and printers do you have installed ?