#21476 closed defect (fixed)
[PATCH] IllegalStateException in ChangesetQuery.forCurrentUser
Reported by: | taylor.smock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 21.10 |
Component: | Core | Version: | latest |
Keywords: | template_report regression | Cc: |
Description (last modified by )
Steps to reproduce:
1) Ensure that you are not logged in. If so either log out or reset JOSM.
2) Restart JOSM
3) Download an area
4) Make a change
5) Attempt to upload
This is most likely a regression from r18283 .
Revision:18291 Is-Local-Build:true Build-Date:2021-10-26 09:10:16 Identification: JOSM/1.5 (18291 SVN en) Mac OS X 11.5 OS Build number: macOS 11.6 (20G165) Memory Usage: 3718 MB / 4096 MB (2299 MB allocated, but free) Java version: 11.0.11+9, AdoptOpenJDK, OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 188945233 1920×1080 (scaling 1.00×1.00) Display 188945231 1920×1080 (scaling 1.00×1.00) Display 69733382 1680×1050 (scaling 2.00×2.00) Maximum Screen Size: 1920×1080 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_US Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61297,suspend=y,server=n, -javaagent:/Users/tsmock/Library/Caches/JetBrains/IntelliJIdea2021.2/groovyHotSwap/gragent.jar, -javaagent:/Users/tsmock/Library/Caches/JetBrains/IntelliJIdea2021.2/captureAgent/debugger-agent.jar, -Dfile.encoding=UTF-8] Program arguments: [--download=39.0637818,-108.5670233,39.0660809,-108.5620022] Dataset consistency test: No problems found Plugins: + Mapillary (2.0.0-alpha.38) + apache-commons (35524) + apache-http (35589) + jna (35662) Last errors/warnings: - 00003.480 W: Update plugins - You updated your JOSM software. To prevent problems the plugins should be updated as well. Update plugins now? - 00046.275 E: Unknown detection "object--traffic-light--pedestrians-back" - 00046.418 E: Unknown detection "object--traffic-light--pedestrians-back" - 00053.883 E: Unknown detection "marking--discrete--text--other" - 00082.248 E: Unknown detection "object--traffic-light--pedestrians-side" - 00082.249 E: Unknown detection "object--traffic-light--pedestrians-side" - 01503.872 E: Handled by bug report queue: java.lang.IllegalStateException: anonymous user === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (24) of main java.lang.IllegalStateException: anonymous user at org.openstreetmap.josm.io.ChangesetQuery.forCurrentUser(ChangesetQuery.java:76) at org.openstreetmap.josm.data.osm.ChangesetCache.refreshChangesetsFromServer(ChangesetCache.java:276) at org.openstreetmap.josm.gui.io.ChangesetManagementPanel.refreshChangesets(ChangesetManagementPanel.java:263) at org.openstreetmap.josm.gui.io.ChangesetManagementPanel.initLifeCycle(ChangesetManagementPanel.java:73) at org.openstreetmap.josm.gui.io.UploadDialog.initLifeCycle(UploadDialog.java:237) at org.openstreetmap.josm.actions.UploadAction.uploadData(UploadAction.java:244) at org.openstreetmap.josm.actions.UploadAction.actionPerformed(UploadAction.java:296) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6400) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Attachments (3)
Change History (15)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
Status: | assigned → new |
Summary: | IllegalStateException in ChangesetQuery.forCurrentUser → [PATCH] IllegalStateException in ChangesetQuery.forCurrentUser |
comment:2 by , 3 years ago
Description: | modified (diff) |
---|---|
Version: | → latest |
by , 3 years ago
Attachment: | 21476.patch added |
---|
comment:3 by , 3 years ago
Keywords: | regression added |
---|---|
Milestone: | → 21.10 |
follow-up: 8 comment:5 by , 3 years ago
The test doesn't work on Jenkins nor on Github. Can you please look into it?
https://github.com/JOSM/josm/runs/4070883215?check_suite_focus=true
I'm disabling it for now.
comment:8 by , 3 years ago
Replying to Don-vip:
The test doesn't work on Jenkins nor on Github. Can you please look into it?
https://github.com/JOSM/josm/runs/4070883215?check_suite_focus=true
I'm disabling it for now.
I'll take a look at it -- I was testing with -Djava.awt.headless=true
, so I would've expected the same behavior on the CI. I'm doing a full test run right now (I'm suspecting some kind of environment pollution).
And sorry about the checkstyle violations. :(
comment:9 by , 3 years ago
It used to be in headless mode and I thought it was still the case. But I can't find the option anymore in Jenkins configuration so maybe we're indeed non longer in headless mode.
comment:10 by , 3 years ago
I think I can safely say "environment pollution". Although I think it is failing locally in a different way.
The following stack trace is from a full JOSM test run.
VM Options: -ea -javaagent:/Users/tsmock/.ivy2/cache/org.jmockit/jmockit/jars/jmockit-1.49.jar -Djava.awt.headless=true -Dosm.username="osm dev server name" -Dosm.password="password"
ReportedException [thread=Thread[main,5,main], exception=java.lang.reflect.InvocationTargetException , methodWarningFrom=null] at org.openstreetmap.josm.tools.bugreport.BugReport.intercept(BugReport.java:173) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:251) at org.openstreetmap.josm.data.osm.event.SelectionEventManager.selectionChanged(SelectionEventManager.java:150) at org.openstreetmap.josm.data.osm.DataSet.lambda$doSelectionChange$15(DataSet.java:760) at org.openstreetmap.josm.tools.ListenerList.fireEvent(ListenerList.java:155) at org.openstreetmap.josm.data.osm.DataSet.doSelectionChange(DataSet.java:760) at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:691) at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:682) at org.openstreetmap.josm.command.AddPrimitivesCommand.executeCommand(AddPrimitivesCommand.java:114) at org.openstreetmap.josm.actions.UploadActionTest.testNonRegression21476(UploadActionTest.java:59) Caused by: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:1349) at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:249) ... 8 more Caused by: java.lang.NullPointerException at org.openstreetmap.josm.tools.Territories.getRegionalTaginfoUrls(Territories.java:242) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.setupTaginfoNationalActions(PropertiesDialog.java:380) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.selectionChanged(PropertiesDialog.java:730) at org.openstreetmap.josm.data.osm.event.SelectionEventManager$DataListenerInfo.fire(SelectionEventManager.java:57) at org.openstreetmap.josm.data.osm.event.SelectionEventManager.fireEvent(SelectionEventManager.java:159) at org.openstreetmap.josm.data.osm.event.SelectionEventManager.lambda$selectionChanged$0(SelectionEventManager.java:150) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) 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.awt.EventQueue.dispatchEvent(EventQueue.java:728) 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) Caused by: java.lang.NullPointerException at org.openstreetmap.josm.tools.Territories.lambda$null$5(Territories.java:240)
I've had issues with Territories
in the past. I think I worked around it at the time (it was in the MapWithAI plugin).
by , 3 years ago
Attachment: | 21476.ci_fix.2.patch added |
---|
comment:11 by , 3 years ago
I've gone ahead and done a PR request on github ( https://github.com/JOSM/josm/pull/78 ) for attachment:21476.ci_fix.2.patch . I intended to overwrite the other patch (attachment:21476.ci_fix.patch), as it wasn't up to date.
EDIT2: I've fixed a checkstyle issue, and it is in attachment:21476.ci_fix.patch .
EDIT: And CI passed on GitHub. Except for "Java 8 on ubuntu-latest", which failed with the following:
Testcase: org.openstreetmap.josm.gui.preferences.plugin.PluginPreferenceTest Test: testBuildDownloadSummary() took 1 sec(s) Test: testNotifyDownloadResults() took 1 sec(s) Test: testPluginPreference() took 1 sec(s) Test: testAddGui() took 1 sec(s) FAILED: null java.util.ConcurrentModificationException at org.openstreetmap.josm.gui.preferences.plugin.PluginPreferencesModel.getSelectedPlugins(PluginPreferencesModel.java:143) at org.openstreetmap.josm.gui.preferences.plugin.PluginPreferencesModel.getSelectedPluginNames(PluginPreferencesModel.java:152) at org.openstreetmap.josm.gui.preferences.plugin.PluginPreferencesModel.isActivePluginsChanged(PluginPreferencesModel.java:323) at org.openstreetmap.josm.gui.preferences.plugin.PluginPreference.ok(PluginPreference.java:299) at org.openstreetmap.josm.gui.preferences.PreferencesTestUtils.doTestPreferenceSettingAddGui(PreferencesTestUtils.java:31) at org.openstreetmap.josm.gui.preferences.plugin.PluginPreferenceTest.testAddGui(PluginPreferenceTest.java:106)
Fix and add non-regression test for IllegalStateException in
ChangesetQuery.forCurrentUser
when the current user is anonymous