﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14579	Assertion error when saving a modified session	Adrian	Don-vip	"==== What steps will reproduce the problem?
1. Load the attached session file.
2. Delete the OSM data layer and the gpx layers.
3. Save the session to a new file.

==== What is the expected result?
The session file is saved.

==== What happens instead?
The saved session file is empty and an assertion error occurs.

==== Please provide any additional information below. Attach a screenshot if possible.
The attached session file contains ten geoimage layers, one OSM data layer and ten gpx layers. I have zipped it because it is nearly 7MB. The geoimage layers contain references to a total of about 9500 images.

If I use a text editor to remove the ""depends"" tags from the session file, then do the steps above, the error does not occur and the new file is successfully saved.

{{{
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-02-26 23:10:22 +0100 (Sun, 26 Feb 2017)
Build-Date:2017-02-26 22:34:39
Revision:11639
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11639 en) Mac OS X 10.11.6
Memory Usage: 1818 MB / 3641 MB (929 MB allocated, but free)
Java version: 1.8.0_121-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 725375437 1920x1200
Maximum Screen Size: 1920x1200

Plugins:
+ ImportImagePlugin (33028)
+ InfoMode (33004)
+ PicLayer (33148)
+ apache-commons (32994)
+ cadastre-fr (33088)
+ download_along (32946)
+ editgpx (33004)
+ ejml (32680)
+ geotools (33042)
+ imagery_offset_db (33004)
+ jts (32699)
+ log4j (32699)
+ measurement (33088)
+ opendata (33156)
+ poly (33004)
+ reverter (33088)
+ turnrestrictions (33088)
+ undelete (32699)
+ utilsplugin2 (33124)
+ waydownloader (33167)

Last errors/warnings:
- E: Handled by bug report queue: java.lang.AssertionError
- E: Handled by bug report queue: java.lang.AssertionError
- E: Handled by bug report queue: java.lang.AssertionError


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (18) of main
java.lang.AssertionError
	at org.openstreetmap.josm.io.session.SessionWriter.createJosDocument(SessionWriter.java:251)
	at org.openstreetmap.josm.io.session.SessionWriter.write(SessionWriter.java:306)
	at org.openstreetmap.josm.io.session.SessionWriter.write(SessionWriter.java:291)
	at org.openstreetmap.josm.actions.SessionSaveAsAction.saveSession(SessionSaveAsAction.java:166)
	at org.openstreetmap.josm.actions.SessionSaveAsAction.actionPerformed(SessionSaveAsAction.java:81)
	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.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:355)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:343)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
	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:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	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)
}}}
"	defect	closed	normal	17.03	Core	tested	fixed	template_report	
