Opened 11 years ago
Closed 11 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 Changed 11 years ago by
Changed 11 years ago by
Attachment: | 8021.patch added |
---|
comment:2 follow-up: 3 Changed 11 years ago by
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 Changed 11 years ago by
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 ?