Opened 4 years ago
Closed 16 months ago
#20849 closed defect (fixed)
[PATCH] WARNING: row index is bigger than sorter's row count. Most likely this is a wrong sorter usage.
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.12 |
Component: | Core | Version: | latest |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Start JOSM with fresh/empty preferences
What is the expected result?
No warnings on startup
What happens instead?
In the console: WARNING: row index is bigger than sorter's row count. Most likely this is a wrong sorter usage.
Please provide any additional information below. Attach a screenshot if possible.
I noticed this for some time, now, and thought it is a problem of my external files but I was wrong.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-05-04 21:01:14 +0200 (Tue, 04 May 2021) Revision:17860 Build-Date:2021-05-05 01:30:58 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17860 en) Linux Debian GNU/Linux 10 (buster) Java version: 11.0.11+9-post-Debian-1deb10u1, Debian, OpenJDK 64-Bit Server VM
Attachments (0)
Change History (8)
comment:1 by , 3 years ago
comment:2 by , 2 years ago
Summary: | WARNING: row index is bigger than sorter's row count. Most likely this is a wrong sorter usage. → [PATCH] WARNING: row index is bigger than sorter's row count. Most likely this is a wrong sorter usage. |
---|
It looks like this is due to order in which the table listeners get notified. It looks like SonarLint doesn't like the patch (java:S3047), so I don't think we will apply this patch unless we really need to, or SonarLint is fixed.
Also, the fix is a bit of a hack -- the order in which TableModelListeners are notified is not specified in documentation, so it could change at any time. :(
I'll do a bit more debugging tomorrow to see if there is a "better" way to do it.
comment:4 by , 2 years ago
Milestone: | → 22.11 |
---|
comment:6 by , 16 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
In Ubuntu 23.04 I am using
DefaultTableModel mod1; mod1 = (DefaultTableModel) jTable1.getModel(); mod1.setNumRows(0); ...... mod1.addRow(row1);
The row1 is a plain vanilla object which I have been using for years.
All its values are legal and reasonable.
Only now did I notice this warning message.
comment:8 by , 16 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
@ilan.tal: I don't know why you reopened this ticket. If you have a bug to report about JOSM or JOSM plugins, please use the report bug functionality. This gives us information on:
- The java version you are using
- The JOSM version you are using
- The plugin versions you are using
If you additionally use the Report bug
functionality when the report bug window appears spontaneously, we will also get a stack trace.
Thanks for your report, however your ticket is incomplete and therefore not helpful in its current form.
Please add all needed information according to this list:
- The required parts of the Status Report from your JOSM.
- Please, use Report Bug from Help menu and copy & paste.
- Describe what behaviour you expected.
- Describe what did happen instead.
- Describe if and how the issue is reproducible.
- Add any relevant information like error messages or screenshots.
To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Help → Report Bug.
Remember: This is a generic notice so we don't need to write the same stuff again and again. It may only apply in parts to the specific case!
With all that said, it sounds like you are working on a different Java project. This is not a generic Java help or troubleshooting forum. If that is the case, I would recommend filing a ticket against the JDK, see https://bugreport.java.com/bugreport/ .
If you want to see the changes I made to "fix" the problem in JOSM, see r18603.
I can track it down to be one of several problems with tagging presets preference:
In the console I notice warnings and errors: