0

I am running java 8.131 on OsX 10.12.5

Using the following code

task.setOnSucceeded(new EventHandler<WorkerStateEvent>() {
        @Override
        public void handle(final WorkerStateEvent event) {

        }
    });

seems to cause this error: https://pastebin.com/GbByfDeY

I have looked everywhere and can't seem to find a fix. The common answer is hardware issue and wait for java update. I am posting as a last restore. Thank you in advance.

Bautista
  • 72
  • 10

1 Answers1

1

One approach would be to add an InvalidationListener to the stateProperty of the Task. Testing this example on Mac OS X 10.12.5 with Java 1.8.0_131-b11, the following listener prints SUCCEEDED on the console.

    task.stateProperty().addListener((Observable o) -> {
        if (task.getState() == Worker.State.SUCCEEDED) {
            System.out.println(task.getState());
        }
    });

Testing the same example on the same machine, the following onSucceeded handler produces the same result.

    task.setOnSucceeded(new EventHandler<WorkerStateEvent>() {
        @Override
        public void handle(final WorkerStateEvent event) {
            System.out.println(task.getState());
        }
    });

The underlying cause of the segmentation fault may be elsewhere.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045