karimnaaji / vectiler

A vector tile, terrain and city 3d model builder and CLI exporter. Consider using its fully integrated user interface at https://halfmaps.io
https://karim.naaji.fr/projects/vectiler
MIT License
482 stars 71 forks source link

"Assertion `IsArray()' failed" #28

Open darabos opened 2 years ago

darabos commented 2 years ago

I've just built Vectiler and tried the example command line from the README. It fails with this error message:

$ build/vectiler.out --tilex 5242/5260 --tiley 12642/12666 --tilez 15 --terrain 1 --buildings 1 --terrainExtrusionScale 1.5 --buildingsExtrusionScale 1.9
Using API key xwlF66_oRKWWb058St_Q9Q
---- Downloading tile data ----
URL request: https://tile.nextzen.org/tilezen/terrain/v1/260/terrarium/15/5242/12642.png?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12642.json?api_key=xwlF66_oRKWWb058St_Q9Q -- OK     
vectiler.out: /home/darabos/anaconda3/envs/dr/include/rapidjson/document.h:1505: rapidjson::GenericValue<Encoding, Allocator>* rapidjson::GenericValue<Encoding, Allocator>::Begin() [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; rapidjson::GenericValue<Encoding, Allocator>::ValueIterator = rapidjson::GenericValue<rapidjson::UTF8<> >*]:
Assertion `IsArray()' failed.
Aborted

When I check the JSON returned by https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12642.json?api_key=xwlF66_oRKWWb058St_Q9Q it looks fine to me. Any tips for what I may be doing wrong? Thanks!

karimnaaji commented 2 years ago

Hi, thanks for the report. I managed to build that model with the exact same command:

➜  build git:(master) ./vectiler.out --tilex 5242/5260 --tiley 12642/12666 --tilez 15 --terrain 1 --buildings 1 --terrainExtrusionScale 1.5 --buildingsExtrusionScale 1.9
Using API key xwlF66_oRKWWb058St_Q9Q
---- Downloading tile data ----
URL request: https://tile.nextzen.org/tilezen/terrain/v1/260/terrarium/15/5242/12642.png?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12642.json?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/terrain/v1/260/terrarium/15/5242/12643.png?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12643.json?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/terrain/v1/260/terrarium/15/5242/12644.png?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12644.json?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/terrain/v1/260/terrarium/15/5242/12645.png?api_key=xwlF66_oRKWWb058St_Q9Q -- OK
URL request: https://tile.nextzen.org/tilezen/vector/v1/256/all/15/5242/12645.json?api_key=xwlF66_oRKWWb058St_Q9Q -- OK

...

Screenshot from 2021-12-22 21-41-18

So I don't think you're doing anything wrong. While doing so, I noticed an error on one tile failing to download (but I only had an error report, not an assertion) so it could be that assertions are automatically enabled for you and aborts instead of only reporting the error. I'll check the build configuration and whether rapidjson asserts could be muted.

darabos commented 2 years ago

Thanks! I'll do that and get back if I figure it out.