Modify

Opened 12 years ago

Closed 12 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)

8021.patch (1.5 KB ) - added by Don-vip 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Don-vip, 12 years ago

Is it 100% reproducible on your system ?

Can you tell me how many screens and printers do you have installed ?

by Don-vip, 12 years ago

Attachment: 8021.patch added

comment:2 by Don-vip, 12 years ago

Priority: normalmajor
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 :)

Last edited 12 years ago by Don-vip (previous) (diff)

in reply to:  2 comment:3 by anonymous, 12 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!

comment:4 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

In 5504/josm:

fix #8021 - division by 0 when getting screen info at startup

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.