Modify

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#9699 closed defect (fixed)

JOSM starts as few pixel width window.

Reported by: kendzi Owned by: Don-vip
Priority: critical Milestone: 14.02
Component: Core Version: latest
Keywords: javabug linux Cc:

Description (last modified by Don-vip)

Current latest and tested (6767) version of JOSM fail to open normal window during startup. JOSM starts as few pixel width window. Real problem appear when during startup pop-up request for updating plugins. That pop-up has only 1 pixel width window and it is impossible to resize it. Last tested by me version 6502 was working correctly.

Reproduced with cleaned profile.

Run on Ubuntu 13.10

java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.13.10.1)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

JOSM opens as few pixel width window

Attachments (2)

josm_width_bug.png (5.5 KB ) - added by kendzi 10 years ago.
JOSM opens as few pixel width window
WindowGeometry.java.patch (1.9 KB ) - added by kendzi 10 years ago.

Download all attachments as: .zip

Change History (21)

by kendzi, 10 years ago

Attachment: josm_width_bug.png added

JOSM opens as few pixel width window

comment:1 by kendzi, 10 years ago

Ticket #9698 has been marked as a duplicate of this ticket.

comment:2 by kendzi, 10 years ago

Is any archive of JOSM build between 6502 and 6767?

comment:3 by kendzi, 10 years ago

Description: modified (diff)

comment:4 by kendzi, 10 years ago

I had check archive of snapshot and last working version is josm-snapshot-6513.jar
Next snapshot josm-snapshot-6527.jar is failing to open window.

comment:5 by Don-vip, 10 years ago

You're obviously the only one facing this issue as nobody else complained in 7 weeks.

It seems a side effect of r6522 but I need to know more about your setup, especially window manager, number of screens and resolution.

Thanks.

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

comment:7 by kendzi, 10 years ago

It was broken in commit 6522/josm. I have rollback that commit and It start working. Screenshot is attached to issue. I have Ubuntu with current Unity. I have two screens with resolutions: 1920x1080 and 1280x1024.

comment:8 by Don-vip, 10 years ago

Description: modified (diff)
Milestone: 14.02
Owner: changed from team to Don-vip
Status: newassigned

ok thanks.

comment:9 by kendzi, 10 years ago

Oh it seams it is related to java version in java6 it is working correctly.

comment:10 by kendzi, 10 years ago

It seems it is related to result of that method:
Rectangle maxbounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();

on java6 it results with:
java.awt.Rectangle[x=1920,y=0,width=1280,height=1024]

on java7 it results with:
java.awt.Rectangle[x=3905,y=24,width=-705,height=1000]

I think both results are wrong, but I'm really don't know why...

Last edited 10 years ago by kendzi (previous) (diff)

comment:11 by kendzi, 10 years ago

After short research it seems both values generated from java6 and java7 are wrong. For me it looks like bug in Java and I made bug request to them. In the mean time I made patch with workaround for ignoring not correct values when calculating windows bounds. I tested it on both java6 and java7.

by kendzi, 10 years ago

Attachment: WindowGeometry.java.patch added

comment:12 by kendzi, 10 years ago

It seems Ubuntu community simple ignoring it:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1171563

comment:13 by Don-vip, 10 years ago

Thanks for investigating. If you filed a Java bug, can you give me the bug ID Oracle assigned to you ?

In the meanwhile I have created a bug on IcedTea bugzilla:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1669

comment:14 by kendzi, 10 years ago

I get review ID: JI-9010334 It hasn't appeared on bugs.java.com yet.

comment:15 by Don-vip, 10 years ago

Yep, it can take months, even years before showing up :(
It will be accessible through this URL someday: https://bugs.openjdk.java.net/browse/JI-9010334

Looking at your patch right now.

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

comment:16 by stoecker, 10 years ago

Why should the value from Java 6 be wrong?

[x=1920,y=0,width=1280,height=1024]

Means right screen with offset 1920 (i.e. size of left screen) and the dimensions you specified.

comment:17 by Don-vip, 10 years ago

Resolution: fixed
Status: assignedclosed

In 6828/josm:

fix #9699 - workaround to java bug in getMaximumWindowBounds() (patch by kendzi)

comment:18 by kendzi, 10 years ago

In javadoc: on multi-screen systems where Windows should be centered across all displays, this method returns the bounds of the entire display area.
So I assumed it should return something from size of both screens.

Value 1920 is little strange for me because program window can appear on both screens and that method always result with same x.

comment:19 by Don-vip, 10 years ago

Wow, you're lucky:
https://bugs.openjdk.java.net/browse/JDK-8034224

I have never seen a bug reaching public tracker so fast. I'm jealous :(

comment:20 by Don-vip, 9 years ago

Keywords: javabug linux added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.