Modify

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#22891 closed defect (fixed)

noteSolver plugin crashes when trying to upload changes to OSM

Reported by: mcliquid Owned by: Kmpopppe
Priority: normal Milestone:
Component: Plugin notesolver Version: latest
Keywords: template_report, notesolver, plugin Cc:

Description

What steps will reproduce the problem?

  1. I "marked" a comment and wanted to upload changes afterwards.
  2. When I click on the upload button it appears that the plugin is not working and should be updated, deactivated or kept.
  3. No matter which of these I click, the crash report comes up.
=== STACK TRACE ===
Thread: AWT-EventQueue-1 (62) of JOSM (development version)
java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.notes.NoteComment.toString()" because the return value of "org.openstreetmap.josm.data.notes.Note.getFirstComment()" is null
	at org.openstreetmap.josm.plugins.notesolver.NoteText.noteShortText(NoteText.java:8)
	at org.openstreetmap.josm.plugins.notesolver.NoteSolverPlugin.mainMenuEntries(NoteSolverPlugin.java:393)
	at org.openstreetmap.josm.plugins.notesolver.NoteSolverPlugin.updateMenu(NoteSolverPlugin.java:353)
	at org.openstreetmap.josm.plugins.notesolver.NoteSolverPlugin$5.actionPerformed(NoteSolverPlugin.java:170)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	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.AbstractButton.doClick(AbstractButton.java:374)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	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 (0)

Change History (6)

comment:1 by Kmpopppe, 22 months ago

I will transfer this issue to GitHub later today, but please tell me which Note you were trying to close when this error occured.
Thanks!

comment:2 by mcliquid, 22 months ago

Hi, I've tried to solve this one: https://www.openstreetmap.org/note/3574079
BTW: The text of the note changed in the meantime to my changeset comment. The text was before: "Thurbo Werkstatt"
And I definitly haven't created this note two months before.

comment:3 by Kmpopppe, 22 months ago

I'm checking back with the DWG if they removed the first comment - because your's is now shown as the only comment which in turn leads to the note saying that you opened it in the first place (that's a known quirk of the Note system). Will get back to you.

comment:5 by Kmpopppe, 22 months ago

The DWG said the same:

the most likely explanation is that the person creating the note has closed their account. This would currently lead to a situation like we have it here. Maybe it's not ideal and we should somehow keep notes created by deleted accounts but that's how it is at the moment...

Best regards
Frederik Ramm


So in essence, the error in the Plugin wasn't likely to happen without some very strange circumstances but, of course, I'll try to fix that.

comment:6 by Kmpopppe, 22 months ago

Resolution: fixed
Status: newclosed

Issue will be tracked at https://github.com/kmpoppe/noteSolver/issues/27 and be fixed in one of the next releases.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Kmpopppe.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.