vectiler icon indicating copy to clipboard operation
vectiler copied to clipboard

"Assertion `IsArray()' failed"

Open darabos opened this issue 2 years ago • 2 comments

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!

darabos avatar Dec 22 '21 17:12 darabos

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.

karimnaaji avatar Dec 23 '21 05:12 karimnaaji

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

darabos avatar Dec 23 '21 09:12 darabos