Bug? JControlsFX9 Null pointer in showNotification

stevel05

Expert
Licensed User
Longtime User
I am connecting a client app to a server app on the same PC, When the server starts it shows a waiting notification, when the client connects the notification reports a null pointer exception:

B4X:
main._shownotification (java line: 104)
java.lang.NullPointerException
    at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:334)
    at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:322)
    at org.controlsfx.control.Notifications.show(Notifications.java:269)
    at org.controlsfx.control.Notifications.showInformation(Notifications.java:244)
    at anywheresoftware.b4j.objects.ControlsUtils.ShowNotification3(ControlsUtils.java:138)
    at anywheresoftware.b4j.objects.ControlsUtils.ShowNotification2(ControlsUtils.java:116)
    at anywheresoftware.b4j.objects.ControlsUtils.ShowNotification(ControlsUtils.java:110)
    at b4j.example.main._shownotification(main.java:104)
    at b4j.example.tcpconnector._sockserver_newconnection(tcpconnector.java:110)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
    at anywheresoftware.b4a.BA$3.run(BA.java:246)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
    at java.base/java.lang.Thread.run(Thread.java:844)

This works fine on Java 8 using jControlsFX, I get the problem on Java 9 with jControlsFX9.

Very simple client and server app attached, which is taken from an example found on the forum.
 

Attachments

  • Client.zip
    1.4 KB · Views: 285
  • Server.zip
    1.6 KB · Views: 264
Top