[openjfx13] RFR : JDK-8222211 : Creating animated gif image from non FX App thread causes exception

2019-06-19 Thread Ambarish Rapte
Hi All,

 

Please review this fix,

JBS: https://bugs.openjdk.java.net/browse/JDK-811

Webrev: http://cr.openjdk.java.net/~arapte/fx/811/webrev.00/ 

 

Regards,

Ambarish


Possible bug on linux + gnome (ubuntu 18.04)

2019-06-19 Thread Thiago Milczarek Sayao
Could anyone confirm this?

Run the sample below, click the "Run" button and then close the "Owner Stage".

On my machine, gnome shell crashes, sometimes X crashes.


import javafx.application.Application; 
import javafx.scene.Scene; 
import javafx.scene.control.Button; 
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class InitOwnerMemoryLeak extends Application {
private static final List> stages = 
Collections.synchronizedList(new ArrayList<>());

public static void main(String[] args) { 
launch(args); 
} 
 
@Override 
public void start(Stage stage) {
HBox hbox = new HBox();
Button button = new Button("Run"); 
button.setOnAction(event -> {
Stage ownerStage = new Stage(); 
ownerStage.setTitle("Owner Stage");

stages.add(new WeakReference<>(ownerStage));
 
StackPane ownerStackPane = new StackPane(); 
ownerStackPane.setPrefSize(400, 400); 
 
ownerStage.setScene(new Scene(ownerStackPane)); 
ownerStage.show(); 

Stage s = createStage(ownerStage);
s.show();

Stage s2 = createStage(s);
s2.show();

Stage s3 = createStage(s2);
s3.show();
});

Button forceGc = new Button("Run GC");
forceGc.setOnAction(e -> System.gc());

Button stageCount = new Button("Print Stages");
stageCount.setOnAction(e -> {
System.out.println("Stages: ");
for(WeakReference stageWeakReference : stages) {
Stage s = stageWeakReference.get();
if(s != null) {
System.out.println("Stage: "+s.getTitle());
}
}
});

hbox.getChildren().addAll(button, forceGc, stageCount);
 
stage.setScene(new Scene(hbox));
stage.show(); 
}

private Stage createStage(Stage owner) {
Stage subStage = new Stage();
subStage.setTitle("Sub Stage");
subStage.initOwner(owner);
StackPane subStackPane = new StackPane();
subStackPane.setPrefSize(200, 200);
Label label = new Label("Close my owner to cause memory leak");
subStackPane.getChildren().add(label);
subStage.setScene(new Scene(subStackPane));

stages.add(new WeakReference<>(subStage));

return subStage;
}
} 

JDK-8222360: Remove spurious empty file from repo

2019-06-19 Thread Arunprasad Rajkumar
Hi Kevin,

Please review the following simple PR., it just removes an empty file which got 
added part of JDK-8211454.

https://github.com/javafxports/openjdk-jfx/pull/504

https://bugs.openjdk.java.net/browse/JDK-8222360

Thanks,
Arun