Modify

Opened 6 months ago

Last modified 8 weeks ago

#21558 new defect

[PATCH] IOOBE in NotesDialog$NoteTableModel.getElementAt

Reported by: angoca Owned by: team
Priority: minor Milestone:
Component: Core notes Version:
Keywords: template_report, notes, close, resolve Cc:

Description

What steps will reproduce the problem?

  1. Download a set of notes, to show them in the Notes panel.
  2. Put in the "Note filter" the word "open" just to show the open notes.
  3. Resolve the notes with the "Close note" button. When there was just an open note, and it is closed, this error appears.

What is the expected result?

To show an empty list in the Notes panel.

What happens instead?

An exception was raised.

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-11-01 23:05:46 +0100 (Mon, 01 Nov 2021)
Build-Date:2021-11-01 22:25:18
Revision:18303
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18303 en) Mac OS X 10.15.7
OS Build number: Mac OS X 10.15.7 (19H1419)
Memory Usage: 1901 MB / 3641 MB (1169 MB allocated, but free)
Java version: 1.8.0_311-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69731270 1440×900 (scaling 1.00×1.00)
Maximum Screen Size: 1440×900
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_CO
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-6c2e47ba, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-7a1c6b48.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

Plugins:
+ DirectDownload (35640)
+ DxfImport (1014)
+ FastDraw (35864)
+ ImportImagePlugin (35567)
+ ImproveOsm (215)
+ Mapillary (2.0.0-alpha.43)
+ PicLayer (1.0.1)
+ apache-commons (35524)
+ apache-http (35589)
+ buildings_tools (35823)
+ continuosDownload (99)
+ ejml (35458)
+ fieldpapers (v0.5.0)
+ geotools (35458)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ jna (35662)
+ jts (35458)
+ log4j (35852)
+ opendata (35803)
+ pdfimport (35640)
+ photo_geotagging (35783)
+ undelete (35848)
+ utilsplugin2 (35856)

Validator rules:
+ ${HOME}/github/ColombianJosmValidator/Rules_Colombian-specific.validator.mapcss

Last errors/warnings:
- 17229.748 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 17229.749 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 17229.750 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 20603.705 E: Error header: Version mismatch: Provided 147, server had: 148 of Relation 1387968
- 20603.915 E: Conflicts detected - <html>Uploading <strong>failed</strong> because the server has a newer version of one<br>of your nodes, ways, or relations.<br>The conflict is caused by the <strong>relation</strong> with id <strong>1,387,968</strong>,<br>the server has version 148, your version is 147.<br><br>Click <strong>Synchronize relation 1,387,968 only</strong> to synchronize the conflicting primitive only.<br>Click <strong>Synchronize entire dataset</strong> to synchronize the entire local dataset with the server.<br>Click <strong>Cancel</strong> to abort and continue editing.<br></html>
- 20608.334 W: Deleted or moved objects - <html>There are 21,174 objects in your local dataset which might be deleted on the server.<br>If you later try to delete or update them the server is likely to report a conflict.<br>Click <strong>Check on the server</strong> to check the state of these objects on the server.<br>Click <strong>Ignore</strong> to ignore.</html>
- 20659.964 W: Conflicts detected - <html>There was 1 conflict detected.</html>
- 37462.203 W: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed
- 37462.204 E: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: javax.net.ssl.SSLException: java.net.SocketException: Socket closed. Cause: java.net.SocketException: Socket closed
- 44529.710 E: Handled by bug report queue: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (41) of javawsApplicationThreadGroup
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:659)
	at java.util.ArrayList.get(ArrayList.java:435)
	at org.openstreetmap.josm.gui.dialogs.NotesDialog$NoteTableModel.getElementAt(NotesDialog.java:326)
	at org.openstreetmap.josm.gui.dialogs.NotesDialog$CloseAction.actionPerformed(NotesDialog.java:410)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6539)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6304)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.awt.Container.dispatchEventImpl(Container.java:2283)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (2)

21558.patch (965 bytes) - added by taylor.smock 6 months ago.
Minimal patch (no non-regression test)
21558.2.patch (7.1 KB) - added by taylor.smock 6 months ago.
Add non-regression test

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 months ago by taylor.smock

Summary: Exception raised when there is notes filter is "open" and the last open note is closed[PATCH] IOOBE in NotesDialog$NoteTableModel.getElementAt

Changed 6 months ago by taylor.smock

Attachment: 21558.patch added

Minimal patch (no non-regression test)

Changed 6 months ago by taylor.smock

Attachment: 21558.2.patch added

Add non-regression test

comment:2 Changed 8 weeks ago by taylor.smock

Absent objections, I'm going to go ahead and apply this patch tomorrow.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to angoca
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.