Menu

#1271 JavaFX SplashScreen on OSX hangs up SQuirrel

SQuirreL FX
closed-fixed
nobody
5
2016-10-09
2016-10-01
juewe
No

Hi,
i tried to run the actual SquirrelFX dev wondering if i can't help a bit for further development of Squirrel.
Alltough, it was a quiet hard stuff to get it running on osx (IntelliJ Community).

Mainly the JavaFX SplashScreen implementation on osx seemed to be buggy. I filed an JDK Bug (http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8166942), regarding the most critical error i think. Seemed, that FX Apps with frequent SplashScreen Update calls hangs up the App on osx.

Also the progress bar (displayed on the Splashscreen) is not shown.

import javafx.application.Application;
import javafx.stage.Stage;

import java.awt.*;

public class SplashTest extends Application{

    public static void main(String[] args) {
        launch(args);

    }
    public void checkSplashUpdate() {

            SplashScreen splashScreen= java.awt.SplashScreen.getSplashScreen();
            splashScreen.createGraphics();
            splashScreen.update();
            splashScreen.close();
            // calling splashScreen.update() instead of close() a second time also
             // kills the app, because internally it also calls SplashLock          
        }

    @Override
    public void start(Stage primaryStage) throws Exception {
        checkSplashUpdate();
    }

}

Seemed to be the native part of java (namely the osx part) is buggy.

bye Jürgen

Discussion

  • juewe

    juewe - 2016-10-01

    I forget to mention, the java code is the testcase for the brocken FX IMplementation on osx.

     
  • juewe

    juewe - 2016-10-08

    @Gerd:
    current workaround is to comment out th single line

    _splashScreen.update();
    in org.squirrelsql.splash.SplashStringWriter#write
    

    or perhaps detectinc once

    boolean isOSX = System.getProperty("os.name").startsWith("Mac");
    

    and in

    org.squirrelsql.splash.SplashStringWriter#write
    
    if not isOSX{
     _splashScreen.update();
    }
    

    This will supress any progressbar updates on SplashScreen on osx, but at least the app is running.

     
  • Gerd Wagner

    Gerd Wagner - 2016-10-08
    • status: open --> closed-fixed
     
  • Gerd Wagner

    Gerd Wagner - 2016-10-08

    SQuirreL now uses a different splash screen mechnism now.

     
  • juewe

    juewe - 2016-10-09

    Hi Gerd,

    i didn't noticed any commit concerning the splashscreen thing? Still in queue?
    I thought about an alternative for placing spalshscreen, using a preloader (http://docs.oracle.com/javafx/2/deployment/preloaders.htm) sounds interisting.
    How about that?

    bye jürgen

     
  • Gerd Wagner

    Gerd Wagner - 2016-10-09

    Hi Jürgen
    right, I forgot to push my changes last night. It's done now.
    Gerd

     
  • juewe

    juewe - 2016-10-09

    I've tested it on OSX 10.6 and it works. New splashscreen and progressbar ist visible, after showing the splashscreen app window is shown.

    bye jürgen

     

Log in to post a comment.

MongoDB Logo MongoDB