Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem opening map file - leading magic byte is missed #15613

Open
bekuno opened this issue Apr 15, 2024 · 0 comments
Open

Problem opening map file - leading magic byte is missed #15613

bekuno opened this issue Apr 15, 2024 · 0 comments
Labels
Bug Issues classified as a bug Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility

Comments

@bekuno
Copy link
Member

bekuno commented Apr 15, 2024

Describe your problem!

Logfiles shows the following error:

04-14 20:44:09.257 30688 30769 E cgeo    : [RxCachedThreadScheduler-1] Problem opening map file 'content://com.android.externalstorage.documents/tree/6363-3661%3AAndroid%2Fmaps%2Fvector/document/6363-3661%3AAndroid%2Fmaps%2Fvector%2FFreizeitkarte_ita%2Bnorth.map.zip.map'
04-14 20:44:09.257 30688 30769 E cgeo    : org.mapsforge.map.reader.header.MapFileException: reading magic byte has failed
04-14 20:44:09.257 30688 30769 E cgeo    : 	at org.mapsforge.map.reader.MapFile.<init>(MapFile.java:293)
04-14 20:44:09.257 30688 30769 E cgeo    : 	at cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider.createMapFile(MapsforgeMapProvider.java:346)
04-14 20:44:09.257 30688 30769 E cgeo    : 	at cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider.readAttributionFromMapFileIfValid(MapsforgeMapProvider.java:316)
04-14 20:44:09.257 30688 30769 E cgeo    : 	at cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider.getAttributionIfValidFor(MapsforgeMapProvider.java:298)

The download/copy was not successful. You see it on the name Freizeitkarte_ita_north.map.zip.map (doubled map).
The file size is 0 byte, so of cause no magic byte could not read.

How to reproduce?

Don´t know, when the process was interupted.
You can easy create a 0Byte file with name ending .map for testing.

Actual result after these steps?

The file is skipped, but only after trying to read them.

Expected result after these steps?

If the file size is null, the file should be skipped or better deleted, if possible.

Reproducible

Yes

c:geo Version

Nigthly from master

System information

No response

Additional Information

No response

@bekuno bekuno added Bug Issues classified as a bug Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility labels Apr 15, 2024
@bekuno bekuno changed the title Problem opening map file - eading magic byte has failed Problem opening map file - leading magic byte is missed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues classified as a bug Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility
Projects
None yet
Development

No branches or pull requests

1 participant