Button script for event and NullPointerException erro

Hi!

I am getting error: “Error executing script on event: mouseClicked on component Butto1.”
Details show:

Traceback (most recent call last):

File “event:mouseClicked”, line 6, in

java.lang.NullPointerException: java.lang.NullPointerException

caused by NullPointerException

Ignition v7.6.2 (b2368)
Java: Sun Microsystems Inc. 1.6.0_31

Button1 script working fine only once after “Save and Publish”
after that i am getting error for java.lang.NullPointerException.
Yesterday i add that Button1 and script, and everything was working fine.
Today i made some modification for one window from floating to docking, and after that i start getting NullPointerException error.

Where is the problem, and how i can fix this problem?

Thank you.

Hi,

What does exactly the script?

Hi,

Button1 is on main window, and Button1 script simple open one popup window.
Script is generated automatically by navigation script builder:
system.nav.openWindow(‘POP_Window_Menu’)
I added another popup window (‘POP_Window_Test’ for testing purpose), and another Button2 on main window.
This Button2 open second popup window without any problems.
That second popup window is empty, there is no components.
First popup window ‘POP_Window_Menu’ has timer, which has script to close that window after 10 seconds.
I do not know is that timer or its event script can cause problem, but some how it only works ones after Save_and_Publish.
When i try second time to press Button1 to open window ‘POP_Window_Menu’ i am getting NullPointerException error.

Any idea why is this happening?
Thanks.

If you are still having this issue we will need additional information.

  1. The entire stack trace to the error message. On the popup select details and then full (bottom left corner). Copy and paste the stack trace.

  2. Can you show us the script you are using? If so, paste it into the thread as well.

My first suggestion would be to get on the latest release of Ignition so we aren’t trying troubleshoot something that has already been fixed.

Hi Greg,

I do not have any issue with script now.
I think that problem was with timer.
I do not know exactly what the problem was, but what I did was from first popup window where timer was, I deleted timer and script, and then add new timer and script and after that I did not get error for executing script.