osmandmapcreator crashed with "Error in thread main com.google.protobuf.UninitializedMessageException: Message was missing required fields. (Lite runtime could not determine which fields were missing)."

197 views
Skip to first unread message

Alex Gotviansky

unread,
Jul 29, 2016, 3:28:01 PM7/29/16
to Osmand
I have pbf file which I want to convert to obf file.

I create batch.xml file with settings and try to run ./OsmAndMapCreator.sh
java -Djava.util.logging.config.file=logging.properties -Xms256M -Xmx1024M -cp "./OsmAndMapCreator.jar:./lib/OsmAnd-core.jar:./lib/*.jar;./lib-gl/*.jar" net.osmand.swing.OsmExtractionUI

but after short output osmandmapcreator fails with

algot@algot-16:~/mapbuild/osmandmapcreator$
./OsmAndMapCreator.sh
Jul 29, 2016 10:18:46 PM net.osmand.osm.MapPoiTypes init
INFO: Time to init poi types 25
Jul 29, 2016 10:18:46 PM net.osmand.binary.BinaryMapIndexReader searchMapIndex
INFO: Search is done. Visit 2235 objects. Read 2235 objects.
Jul 29, 2016 10:18:46 PM net.osmand.binary.BinaryMapIndexReader searchMapIndex
INFO: Read 59 subtrees. Go through 115 subtrees.
Jul 29, 2016 10:18:46 PM net.osmand.swing.ExceptionHandler handle
SEVERE: Error in thread main
com.google.protobuf.UninitializedMessageException: Message was missing required fields.  (Lite runtime could not determine which fields were missing).
    at com.google.protobuf.AbstractMessageLite$Builder.newUninitializedMessageException(AbstractMessageLite.java:306)
    at net.osmand.binary.OsmandIndex$OsmAndStoredIndex$Builder.build(OsmandIndex.java:215)
    at net.osmand.binary.CachedOsmandIndexes.readFromFile(CachedOsmandIndexes.java:311)
    at net.osmand.swing.OsmExtractionUI.createUI(OsmExtractionUI.java:210)
    at net.osmand.swing.OsmExtractionUI.<init>(OsmExtractionUI.java:164)
    at net.osmand.swing.OsmExtractionUI.main(OsmExtractionUI.java:126)

What can be wrong with
osmandmapcreator?

Harry van der Wolf

unread,
Jul 29, 2016, 5:03:26 PM7/29/16
to osmand
What kind of osm.pbf file?
How was it created? Where does it come from?
Can you convert it with osmconvert to straight .osm or .o5m?
Which version of OsmAndMapCreator?
Try to allocate 4GB or so instead of 1GB -> -Xmx4096M
It obviously crashes on the POIs. What kind of POIs?

You give very little information.

Harry

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Gotviansky

unread,
Jul 29, 2016, 5:39:54 PM7/29/16
to Osmand
I downloaded this pbf http://data.gis-lab.info/osm_dump/dump/latest/UA.osm.pbf
Yes, it can be converted to .osm file which has around 9GB size.
OsmAndMapCreator version is today's latest night build - http://download.osmand.net/latest-night-build/OsmAndMapCreator-main.zip


>>It obviously crashes on the POIs. What kind of POIs?
I don't know. It's only my country dump.

Maybe this info will help you.

суббота, 30 июля 2016 г., 0:03:26 UTC+3 пользователь Harry van der Wolf написал:

Harry van der Wolf

unread,
Jul 30, 2016, 1:24:07 PM7/30/16
to osmand
I see that the UA.osm.pbf file is 364MB
It will certainly not work with your max memory setting of 1024MB.

A 364MB osm.pbf needs about 6-8x that amount of memory, which is 2.5-3GB.
So please change your shell script and try again with the -Xmx4096M setting instead of the -Xmx1024M

Harry

Luk

unread,
Aug 1, 2016, 2:48:31 PM8/1/16
to Osmand
For me the osmmapcreator crashes imediatly after clicking on OsmAndMapCreator.bat

the osand.log gives me the same message as to Alex

Some months ago the osmmapcreator works fine without any problem.
Today I updated the Mapcreator from the .zip and overrided existing files, but no longer open on my Win10.

07.30.2016 19:24:07 UTC+2 Harry van der Wolf:

Alex Gotviansky

unread,
Aug 1, 2016, 6:02:40 PM8/1/16
to Osmand
I have changed -Xmx to 4096M but now I have another exception

INFO: Read 59 subtrees. Go through 115 subtrees.
Aug 02, 2016 12:59:13 AM net.osmand.swing.ExceptionHandler handle

SEVERE: Error in thread main
java.lang.NullPointerException
    at net.osmand.binary.CachedOsmandIndexes.writeToFile(CachedOsmandIndexes.java:326)
    at net.osmand.swing.OsmExtractionUI.createUI(OsmExtractionUI.java:229)

    at net.osmand.swing.OsmExtractionUI.<init>(OsmExtractionUI.java:164)
    at net.osmand.swing.OsmExtractionUI.main(OsmExtractionUI.java:126)

java.lang.NullPointerException
    at net.osmand.binary.CachedOsmandIndexes.writeToFile(CachedOsmandIndexes.java:326)
    at net.osmand.swing.OsmExtractionUI.createUI(OsmExtractionUI.java:229)

    at net.osmand.swing.OsmExtractionUI.<init>(OsmExtractionUI.java:164)
    at net.osmand.swing.OsmExtractionUI.main(OsmExtractionUI.java:126)


суббота, 30 июля 2016 г., 20:24:07 UTC+3 пользователь Harry van der Wolf написал:

CP

unread,
Aug 1, 2016, 6:06:57 PM8/1/16
to osm...@googlegroups.com, Luk
As suggested earlier you need to find the previous *stable* version of map creator. Sorry thay I can't point you to a specific version. I don't use it myself.


Luk <lusc...@gmail.com> schreef op 1 augustus 2016 20:48:30 CEST:

Harry van der Wolf

unread,
Aug 2, 2016, 4:28:14 AM8/2/16
to osmand
As CP suggests: you might try the stable version of 24 April:  http://download.osmand.net/latest-night-build/
With nightly builds you get the latest improvements but also the latest bugs.
A new nightly build might be working for you  (or not :( )

Harry
Reply all
Reply to author
Forward
0 new messages