ArrayIndexOutOfBoundsException when clearing table model

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

ArrayIndexOutOfBoundsException when clearing table model

Postby Maurice » Mon Aug 22, 2011 4:38 am

Hi,

We are intermittently getting this exception thrown when trying to clear the values from a table. Any idea why this might be happening?

java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.jidesoft.grid.SortableTableModel.a(Unknown Source)
at com.jidesoft.grid.SortableTableModel.a(Unknown Source)
at com.jidesoft.grid.SortableTableModel.tableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableRowsDeleted(Unknown Source)
at com.jidesoft.grid.BasicTableModel.clear(Unknown Source)

Many thanks
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: ArrayIndexOutOfBoundsException when clearing table model

Postby JIDE Support » Mon Aug 22, 2011 11:34 am

Can you please make sure you clear the values in EventDispatcherThread?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: ArrayIndexOutOfBoundsException when clearing table model

Postby Maurice » Tue Aug 23, 2011 1:51 am

Thanks.

How would I do that and why would this happen?
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: ArrayIndexOutOfBoundsException when clearing table model

Postby JIDE Support » Tue Aug 23, 2011 7:03 am

Please use SwingUtilities.invokeLater() to brace the code that may update UI. It's requested by Swing. The issue may be a threading issue but I'm not quite sure until you post the full stack information. If you try to update UI from another thread, there might be a conflict to access the same field, which causes the issue.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 31 guests

cron