# Disabling the last pen thrrows a java error

**URL:** <https://forum.inductiveautomation.com/t/disabling-the-last-pen-thrrows-a-java-error/43075>\
**Category:** Ignition\
**Created:** [February 5, 2021, 4:16pm UTC](https://forum.inductiveautomation.com/t/disabling-the-last-pen-thrrows-a-java-error/43075 "2021-02-05T16:16:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abiesbiogas](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@abiesbiogas](https://forum.inductiveautomation.com/u/abiesbiogas)\
**Post date:** [February 5, 2021, 4:16pm UTC](https://forum.inductiveautomation.com/t/disabling-the-last-pen-thrrows-a-java-error/43075/1 "2021-02-05T16:16:46Z")

</div>

Hello,  
I’m having troubles with all the charts in a certain gateway (Ignition 7.9.14), while other plants with the same underling project (or slightly different ones) work fine.

When I disable the last pen in the chart, or when I enable it it throws this error:

```auto
Exception in thread "AWT-EventQueue-2" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at com.inductiveautomation.ignition.common.AbstractDataset.getColumnType(AbstractDataset.java:98)
	at com.inductiveautomation.factorypmi.application.components.chart.easychart.PenData.setData(PenData.java:94)
	at com.inductiveautomation.factorypmi.application.components.chart.easychart.TagHistoryPenDatasource.setData(TagHistoryPenDatasource.java:100)
	at com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery.handleQueryReturnedValue(AbstractChartQuery.java:146)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$HandleReturnValueTask.run(QueryManager.java:477)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

```

When I check (or uncheck) any other pen nothing strange happens.

I can’t figure out what to observe/test to identify the scope of the problem. Any help would be appreciated
