# Client freezing

**URL:** <https://forum.inductiveautomation.com/t/client-freezing/16635>\
**Category:** Ignition\
**Created:** [January 18, 2018, 10:57am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635 "2018-01-18T10:57:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 18, 2018, 10:57am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/1 "2018-01-18T10:57:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![oscar.salcedo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscar.salcedo/32/11019_2.png) [@oscar.salcedo](https://forum.inductiveautomation.com/u/oscar.salcedo)\
**Post date:** [January 18, 2018, 3:08pm UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/2 "2018-01-18T15:08:01Z")

</div>

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

Cheers!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 18, 2018, 4:07pm UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/3 "2018-01-18T16:07:41Z")

</div>

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](https://docs.oracle.com/javase/7/docs/technotes/tools/share/jstack.html) to grab a thread dump, even from a ‘hung’ JVM.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 19, 2018, 8:56am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/4 "2018-01-19T08:56:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 19, 2018, 9:12am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/5 "2018-01-19T09:12:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 19, 2018, 9:13am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/6 "2018-01-19T09:13:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 19, 2018, 3:45pm UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/7 "2018-01-19T15:45:26Z")

</div>

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`](http://www.jidesoft.com/javadoc/com/jidesoft/grid/TableModelWrapperUtils.html) for some helpful functions, particularly for converting view row indices to actual row indices.

---

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 22, 2018, 7:00am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/8 "2018-01-22T07:00:47Z")

</div>

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](http://forum.inductiveautomation.com/t/ignition-client-start-bug/16330)

---

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 23, 2018, 7:13am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/9 "2018-01-23T07:13:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 23, 2018, 9:54am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/10 "2018-01-23T09:54:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [January 23, 2018, 10:06am UTC](https://forum.inductiveautomation.com/t/client-freezing/16635/11 "2018-01-23T10:06:16Z")

</div>

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