Client freezing

Recently, my clients started freezing when left idle for approx 5-10 minutes. Is there any log somewhere indicating whats going on when this happens? There’s no error showing it just freezes and the only action left is to terminate the the client and start it again. I have a lot of scripting going on and it might be that something fails there, just can’t figure out what.

1 Like

CTRL+SHIFT+F7 will let you see the Diagnostics window, give it a try and see if there is anything there.

Cheers!

And if you can’t bring up the diagnostics window, then it’s likely a script hung up somewhere. You can install the Java Development Kit and use jstack to grab a thread dump, even from a ‘hung’ JVM.

1 Like

Two kinds of scripts that are likely to hang (AFAIK) are the “configureCell” function on powertables, and the “repaint” function on the paintable canvas.

These functions tend to be called a lot. Apart from that, try to find out what’s triggering what.

1 Like

The problem was with a script selecting a row in a power table. This seems to bug when filters are applied as setting the selected row property sets the wrong row.

1 Like

Would be nice though if this was fixed or maybe introduce a function like selectRowWhere(columnname, equals). The last is what I did to solve this using a custom property ‘SelectedRow’ that selects the row using the viewDataset.

Power Tables are a complicated construct, especially when filtering and sorting are applied.
I’ve had good success selecting particular rows using a call like this:
target.getTable().getSelectionModel().setSelectionInterval(row, row)

Where target is the actual ‘Power Table’ component; getTable() drills from that into the underlying JideTable, and the selectionModel is maintained by that table so it will update with filters/sorting.

You could also take a look at the TableModelWrapperUtils for some helpful functions, particularly for converting view row indices to actual row indices.

Okay, seems like it wasn’t the power table causing this. Still getting freezing clients.
Also, an old problem has started again, see link to one of my previous posts. It just starts randomly without any obvious reason.
http://forum.inductiveautomation.com/t/ignition-client-start-bug/16330

After a night of debugging this, the cause of the freezing clients seems to be a SQL query that never returns. Is this normal? Have added a print just before the query is executed and one after, and when the clients freeze, the print before the query is the last output in the console. Have even tried to wrap it in a try/except block.

How long does it take to excecute the query outside ignition?

A query that doesn’t return can indeed lock up the interface and freeze the client like that. But normally it should either return or error out.

The query normally takes < 1 sec, also inside ignition. Just when it freezes it seems to be at the query its stuck.