Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22144 closed defect (fixed)

NPE in ChangesetReverter#init due to no edit layer

Reported by: anonymous Owned by: Upliner
Priority: normal Milestone:
Component: Plugin reverter Version: tested
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. There is no edit layer in editor.
  2. Open 127.0.0.1:8111/revert_changeset?id=<id>

What is the expected result?

I want reverted data to be loaded into a new layer

What happens instead?

Exception occurs

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

If there is a layer in editor, reverted data will load into it.

JOSM version: tested 18463

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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (24) of main
java.lang.NullPointerException: Cannot read field "data" because "editLayer" is null
	at reverter.ChangesetReverter.<init>(ChangesetReverter.java:150)
	at reverter.RevertChangesetTask.revertChangeset(RevertChangesetTask.java:130)
	at reverter.RevertChangesetTask.realRun(RevertChangesetTask.java:93)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Attachments (0)

Change History (4)

comment:1 by skyper, 2 years ago

Type: taskdefect

@anonymous:
May you, please, always supply the needed status report as operating system and plugin version are missing here.


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.
  • 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 Helpsource:trunk/resources/images/bug.svg 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!


comment:2 by taylor.smock, 2 years ago

Summary: plugin reverter remote controlNPE in ChangesetReverter#init due to no edit layer

comment:3 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 35980/osm:

Fix #22144: NPE when no edit layer exists and remote control is called

comment:4 by taylor.smock, 2 years ago

In 35981/osm:

See #22144 (dist): NPE when no edit layer exists and remote control is called

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Upliner.
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.