Error Launching java.lang.NullPointerException

Hello,

One of our user cannot launch Ignition Vision client but he can launch Ignition designer. Error is java.lang.NullPointerException (as pitctured below). We try to uninstall and re-install Ignition vision client but it still no good. Could you please kindly suggest us to solve this problem?

Ignition version: 8.0.16
OS: Windows

Check for a visionclientlauncher.log file in the %USERPROFILE%/.ignition/clientlauncher-data/ folder - you may directly see the error there, or else you can take the command line string and launch it yourself, which should give you details about the NPE. EG, copy and paste the command from:

INFO  [LaunchUtil                    ] [2020/01/14 11:03:21]: Starting Java with the following parameters: C:\Users\pgriffith\AppData\Roaming\Inductive Automation\Vision Client Launcher\jre\bin\java.exe -classpath C:\Users\pgriffith\.ignition\clientlauncher-data\launchclient.jar -Djavaws.sr.gateway.addr.0=http://10.10.70.73:9800 -Djavaws.sr.launchts=1579028601881 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Xms32M -Xmx256M -Djavaws.sr.memory.init=32M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=test com.inductiveautomation.ignition.client.launch.BootstrapSwing 

Then paste the NPE’s stack trace here. And/or, get in contact with support.

1 Like

Hello,
I had a same problem here.
It seems I added an event script or something during runtime, I closed project without saving it (both designer launcher and vision client launcher). Then I am not be able to open designer launcher again. it stucks there. I can not get into the designer software to delete events script there. Any chance that I can reset it by cmd line?
Here are error logs

INFO  [ClientLauncher                ] [2021/12/22 17:21:41]: Set initial logging level to INFO
INFO  [ClientLauncher                ] [2021/12/22 17:21:42]: Updating logging level to INFO
ERROR [RuntimeException              ] [2021/12/22 17:21:42]: Uncaught exception in thread: main
java.lang.RuntimeException: Exception in Application init method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
	at com.inductiveautomation.ignition.launcher.common.ui.base.BaseLauncherApplication.lambda$init$0(BaseLauncherApplication.java:134)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at com.inductiveautomation.ignition.launcher.common.ui.base.BaseLauncherApplication.init(BaseLauncherApplication.java:132)
	at com.inductiveautomation.ignition.launcher.client.ui.VisionLauncherApplication.init(VisionLauncherApplication.java:114)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
	... 2 more
INFO  [DesignerLauncher              ] [2021/12/22 21:20:57]: Set initial logging level to INFO
INFO  [DesignerLauncher              ] [2021/12/22 21:20:57]: Updating logging level to INFO
ERROR [RuntimeException              ] [2021/12/22 21:20:57]: Uncaught exception in thread: main
java.lang.RuntimeException: Exception in Application init method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
	at com.inductiveautomation.ignition.launcher.common.ui.base.BaseLauncherApplication.lambda$init$0(BaseLauncherApplication.java:134)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at com.inductiveautomation.ignition.launcher.common.ui.base.BaseLauncherApplication.init(BaseLauncherApplication.java:132)
	at com.inductiveautomation.ignition.launcher.designer.ui.DesignerLauncherApplication.init(DesignerLauncherApplication.java:122)
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
	... 2 more

Can you share the contents of your ~/.ignition/clientlauncher-data/designer-launcher.json (only need the entry for your target connection, perhaps with any address data masked out)? I want to make sure that you have the gateway.info object in your configuration…

I can not upload a file .json
please have a look at lines below

{
  "global": {
    "client.defaults": {
      "timeout": 30,
      "retries": -1,
      "init.heap": null,
      "max.heap": null,
      "use.custom.jre": false,
      "custom.jre.path": "${JAVA_HOME}/bin/java",
      "jvm.arguments": [
        ""
      ],
      "client.tag.overrides": {}
    },
    "autoexit": false,
    "default.application": "",
    "multicast.address": "231.1.1.1",
    "multicast.receive.port": 4446,
    "lock.configuration": false,
    "logger.level": "INFO",
    "version.updates.prompt": true,
    "version.updates.revision.diff": 3
  },
  "applications": [
    {
      "main.class": "com.inductiveautomation.ignition.designer.DesignerStartupHook",
      "window.mode": null,
      "timeout": 30,
      "screen": null,
      "retries": -1,
      "init.heap": null,
      "max.heap": null,
      "sun.java2d.d3d": null,
      "sun.java2d.noddraw": null,
      "jvm.arguments": [],
      "client.tag.overrides": {},
      "fallback.application": "",
      "use.custom.jre": false,
      "custom.jre.path": "${JAVA_HOME}/bin/java",
      "name": "Ignition-DESKTOP-0K7459Q",
      "description": null,
      "gateway.info": {
        "gateway.name": "Ignition-DESKTOP-0K7459Q",
        "gateway.address": "http://localhost:8088",
        "redundant.gateways": []
      },
      "last.updated": 1639966912173,
      "image.path": null,
      "favorite": false
    },
    {
      "main.class": null,
      "window.mode": null,
      "timeout": null,
      "screen": null,
      "retries": null,
      "init.heap": null,
      "max.heap": null,
      "sun.java2d.d3d": null,
      "sun.java2d.noddraw": null,
      "jvm.arguments": null,
      "client.tag.overrides": null,
      "fallback.application": null,
      "use.custom.jre": null,
      "custom.jre.path": null,
      "name": null,
      "description": "A Demo project showcasing most of Ignition's features: realtime status & control, historical trending, UDTs & templates, reporting, alarming, security, and more. To login as an Administrator use admin/password as the username/password. To login as an operator use operator/password. Operators have less privileges.",
      "gateway.info": null,
      "last.updated": 1640166361442,
      "image.path": null,
      "favorite": false
    }
  ]
}

I’d try removing this last object from your JSON config where gateway.info is null.