sql-workbench/workbench
12
33
Fork
You've already forked workbench
18

ArrayIndexOutOfBoundsException in Database Explorer #33

Closed
opened 2022年12月07日 12:06:15 +01:00 by pgniadek · 1 comment

I keep getting ArrayIndexOutOfBoundsException in Database Explorer when there is lots of triggers in database. Interestingly, the exception shows when activating the Objects tab, and not the Triggers tab, as I would expect.

2022年12月07日 11:20:54 ERROR Error retrieving table list Index 419 out of bounds for length 150
java.lang.ArrayIndexOutOfBoundsException: Index 419 out of bounds for length 150
	at workbench.storage.RowDataList.get(RowDataList.java:171)
	at workbench.storage.DataStore.getRow(DataStore.java:1440)
	at workbench.storage.DataStore.getValue(DataStore.java:1029)
	at workbench.storage.DataStore.getValueAsString(DataStore.java:1075)
	at workbench.db.TriggerListDataStore.getColumnValue(TriggerListDataStore.java:140)
	at workbench.db.TriggerListDataStore.getTriggerName(TriggerListDataStore.java:69)
	at workbench.db.postgres.PostgresEventTriggerReader.extendObjectList(PostgresEventTriggerReader.java:74)
	at workbench.db.DbMetadata.getObjects(DbMetadata.java:1772)
	at workbench.db.DbMetadata.getObjects(DbMetadata.java:1504)
	at workbench.gui.dbobjects.TableListPanel.retrieve(TableListPanel.java:1219)
	at workbench.gui.dbobjects.TableListPanel4ドル.run(TableListPanel.java:1341)

If I filter out displaying EVENT TRIGGERS in Object tab, then the exception is gone.

In the database there are only 5 event triggers, but the total number of event triggers and table triggers is 420, which concides with the exception message: Index 419 out of bounds for length 150. The number 150 is defined in the class workbench.storage.RowDataList as int DEFAULT_SIZE = 150;

The error is present in v. 129 of SQLWorkbench/J. There is no problem with v. 127, which i use routinely.

My settings:
SQL Workbench/J: v. 129 64bit
Java: 11.0.15 64bit
Postgres: 9.5.4

I keep getting ArrayIndexOutOfBoundsException in Database Explorer when there is lots of triggers in database. Interestingly, the exception shows when activating the Objects tab, and not the Triggers tab, as I would expect. ``` 2022年12月07日 11:20:54 ERROR Error retrieving table list Index 419 out of bounds for length 150 java.lang.ArrayIndexOutOfBoundsException: Index 419 out of bounds for length 150 at workbench.storage.RowDataList.get(RowDataList.java:171) at workbench.storage.DataStore.getRow(DataStore.java:1440) at workbench.storage.DataStore.getValue(DataStore.java:1029) at workbench.storage.DataStore.getValueAsString(DataStore.java:1075) at workbench.db.TriggerListDataStore.getColumnValue(TriggerListDataStore.java:140) at workbench.db.TriggerListDataStore.getTriggerName(TriggerListDataStore.java:69) at workbench.db.postgres.PostgresEventTriggerReader.extendObjectList(PostgresEventTriggerReader.java:74) at workbench.db.DbMetadata.getObjects(DbMetadata.java:1772) at workbench.db.DbMetadata.getObjects(DbMetadata.java:1504) at workbench.gui.dbobjects.TableListPanel.retrieve(TableListPanel.java:1219) at workbench.gui.dbobjects.TableListPanel4ドル.run(TableListPanel.java:1341) ``` If I filter out displaying EVENT TRIGGERS in Object tab, then the exception is gone. In the database there are only 5 event triggers, but the total number of event triggers and table triggers is 420, which concides with the exception message: `Index 419 out of bounds for length 150`. The number 150 is defined in the class workbench.storage.RowDataList as `int DEFAULT_SIZE = 150;` The error is present in v. 129 of SQLWorkbench/J. There is no problem with v. 127, which i use routinely. My settings: SQL Workbench/J: v. 129 64bit Java: 11.0.15 64bit Postgres: 9.5.4

This was already reported (together with a fix)

#29

This was already reported (together with a fix) https://codeberg.org/sql-workbench/workbench/pulls/29
Sign in to join this conversation.
No Branch/Tag specified
master
build133
build132
build131
build130
build129
build128
build126
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sql-workbench/workbench#33
Reference in a new issue
sql-workbench/workbench
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?