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

Decoding error "physical level technique not yet supported: ALP" in IntegerDecoder.decodeIntStream #148

Open
springmeyer opened this issue Jun 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@springmeyer
Copy link
Collaborator

With the latest code, in the vectorized & non-vectorized paths, we are hitting:

java.lang.IllegalArgumentException: Specified physical level technique not yet supported: ALP
	at com.mlt.decoder.IntegerDecoder.decodeIntStream(IntegerDecoder.java:86)
	at com.mlt.decoder.GeometryDecoder.decodeGeometryColumn(GeometryDecoder.java:29)
	at com.mlt.decoder.MltDecoder.decodeMlTile(MltDecoder.java:77)
	at com.mlt.tools.Encode.main(Encode.java:269)

Testcase:

cd java
./gradlew cli
git clone [email protected]:mapbox/mvt-fixtures.git
java -jar build/libs/encode.jar -mvt mvt-fixtures/real-world/norway/12-2174-1070.mvt -decode -vectorized

This does not happen with the -advanced flag. So, seems like a bug in varint handling

@springmeyer springmeyer added the bug Something isn't working label Jun 13, 2024
@springmeyer
Copy link
Collaborator Author

Curiously, I still get an error with latest main with this tile, but it is different:

java.lang.IndexOutOfBoundsException
	at java.base/java.nio.Buffer.checkIndex(Buffer.java:743)
	at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:218)
	at com.mlt.decoder.vectorized.VectorizedDecodingUtils.decodeByteRle(VectorizedDecodingUtils.java:56)
	at com.mlt.decoder.vectorized.VectorizedDecodingUtils.decodeBooleanRle(VectorizedDecodingUtils.java:19)
	at com.mlt.decoder.vectorized.VectorizedPropertyDecoder.decodeToRandomAccessFormat(VectorizedPropertyDecoder.java:137)
	at com.mlt.decoder.MltDecoder.decodeMlTileVectorized(MltDecoder.java:164)
	at com.mlt.tools.Encode.main(Encode.java:254)

@springmeyer
Copy link
Collaborator Author

This is still present after #158. The error impacts both the vectorized and non-vectorized pathways. But the exception is different.

Exception in vectorized:

 java -jar build/libs/encode.jar -mvt ~/projects/mvt-fixtures/real-world/norway/12-2174-1070.mvt -decode -vectorized
java.lang.IndexOutOfBoundsException
	at java.base/java.nio.Buffer.checkIndex(Buffer.java:743)
	at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:218)
	at com.mlt.decoder.vectorized.VectorizedDecodingUtils.decodeByteRle(VectorizedDecodingUtils.java:56)
	at com.mlt.decoder.vectorized.VectorizedDecodingUtils.decodeBooleanRle(VectorizedDecodingUtils.java:19)
	at com.mlt.decoder.vectorized.VectorizedPropertyDecoder.decodeToRandomAccessFormat(VectorizedPropertyDecoder.java:137)
	at com.mlt.decoder.MltDecoder.decodeMlTileVectorized(MltDecoder.java:164)
	at com.mlt.tools.Encode.main(Encode.java:254)

Exception in non-vectorized:

java -jar build/libs/encode.jar -mvt ~/projects/mvt-fixtures/real-world/norway/12-2174-1070.mvt -decode            
java.lang.IllegalArgumentException: Specified physical level technique not yet supported: NONE
	at com.mlt.decoder.IntegerDecoder.decodeIntStream(IntegerDecoder.java:86)
	at com.mlt.decoder.GeometryDecoder.decodeGeometryColumn(GeometryDecoder.java:29)
	at com.mlt.decoder.MltDecoder.decodeMlTile(MltDecoder.java:77)
	at com.mlt.tools.Encode.main(Encode.java:269)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant