NullPointerException with local tiles
Brought to you by:
r_x
Custom Map XML:
<?xml version="1.0" encoding="UTF-8"?>
<localTileFiles>
<!-- Map source name as it appears in the map sources list. -->
<name>Gamlitz loc Tiles</name>
<sourceType>DIR_ZOOM_X_Y.png</sourceType>
<sourceFolder>H:\Maps\Mobac\LocalTiles\gamlitz_4Lv_atlas</sourceFolder>
<backgroundColor>#000000</backgroundColor>
</localTileFiles>
Log:
Version: Mobile Atlas Creator (MOBAC) 2.0.1 (2371)
Platform: Windows 7 (6.1) (windows)
Java VM: Java HotSpot(TM) Client VM (1.8.0_161-b12)
Max heap size: 989,88 MiB
CPU cores: 4
Thread: AWT-EventQueue-0
Error hierarchy:
NullPointerException: null
#############################################################
java.lang.NullPointerException
at mobac.mapsources.custom.CustomLocalTileFilesMapSource.reinitialize(CustomLocalTileFilesMapSource.java:107)
at mobac.mapsources.custom.CustomLocalTileFilesMapSource.initialize(CustomLocalTileFilesMapSource.java:93)
at mobac.gui.MainGUI$MapSourceTreeListener.valueChanged(MainGUI.java:988)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
at javax.swing.JTree.setSelectionPath(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at mobac.utilities.GUIExceptionHandler$EventQueueProxy.dispatchEvent(GUIExceptionHandler.java:321)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
#############################################################
The reason is simple: you are using an invalid sourcetype:
<sourcetype>DIR_ZOOM_X_Y.png</sourcetype>
See the documentation for valid sourceType values:
http://mobac.sourceforge.net/wiki/index.php/Custom_XML_Map_Sources#sourceType
Last edit: r_x 2018-02-11
Uuups, thanks for your help