-
Notifications
You must be signed in to change notification settings - Fork 117
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
Error: Vector subscript out of range #231
Comments
I am not 100% certain with out digging deep into this problem -- and as the bug is within the ClipperLib (which we are in the process of replacing), I am honestly not really tempted to currently dig into this problem too deep. Can you first try with some other data -- Also I would use the default extents as well here:
instead just do:
|
BTW - this is the replacement for the Angus clipper library on a branch -- using wagyu. You might try it out. |
Thanx for answer!
I used the master branches of projects wagyu and geometry.hpp. |
@DiabloRusso that is really interesting -- is this a really massive polygon? Could you put together a good test case for this so that I might be able to repeat the problem? |
This my complete test project! |
@DiabloRusso okay, I have attempted to recreate this on my machine, but I am not able to do so currently. It all seems to run just fine. Unfortunately I am using OS X and not a windows machine so we might be having slight differences between the two. |
@flippmoke Could you try my xml style for generating a vector tiles on OS X? Maybe this error is independent of the OS and you reproduce her? |
@DiabloRusso I was using your xml file and data for my test |
@flippmoke please let me know when you get the test result. |
@DiabloRusso I used your test data and files, I was unable to reproduce your results. |
@flippmoke maybe I do not use the correct version of wagyu and geometry.hpp? |
Took a look at the provided test case: Using the "empty" <Map>
<Style name="style">
<Rule>
<MarkersSymbolizer fill="red" />
</Rule>
</Style>
</Map>
Using VS2015 with the
and pauses here in Values of Also And @flippmoke anything else I should look for? |
@BergWerkGIS you reproduce my bug! I use Visual Studio 2015 Update 2, if it has meaning. |
@flippmoke did you try with the provided shapefile? At first glance it looks like one of those that cause trouble when being cut into tiles. Some analysis:
EPSG:3857 "WGS 84 / Pseudo Mercator"
I tried exporting to mbtiles via |
Ah, I must have been blind, just realized the demo project has just @DiabloRusso did you build mapnik and all dependencies yourself, or did you use the Our SDK is a If you used the |
@BergWerkGIS I modified mapbox/windows-builds to build a debug version of mapnik and all dependencies, it was not so difficult. |
@BergWerkGIS Yes, I built a test in mapnik-vector-tile based on the provided test data and xml in the project. I never had any of the issues you are seeing. Next edge should be one ahead of the edge there, so it is rather odd that it would be I see that I accidentally wasn't initializing it in the constructor -- which I am going to fix and push to master of wagyu, but it still should have been overwritten by this: which is call right after the edge is created. |
@DiabloRusso Oh Wow! Would you mind creating a PR at mapbox/windows-builds? |
@DiabloRusso And I suppose changes to mapnik/mapnik-gyp were also necessary? |
I used the script below on a PowerShell Dev prompt from the root of the test project like so Looks like at least For the ones prefixed with function check($filter){
Write-Host "`nchecking $filter";
foreach ($item in Get-ChildItem $args[0] -Recurse -Include $filter){
$output = dumpbin /DIRECTIVES $item.FullName;
if ($output -like '*LIBCMT*') { #MT and MTd
Write-Host "MT or MTd $item";
}elseIf ($output -like '*MSVCRTD*') { #MDd
Write-Host "MDd $item";
} else {
$output = dumpbin /SYMBOLS $item.FullName;
if($output -like '*COFF SYMBOL TABLE*'){ #debug
Write-Host "debug $item";
} else {
$output = dumpbin /DEPENDENTS $item.FullName;
if($output -like '*VCRUNTIME140D.dll*'){ #debug
Write-Host "debug $item";
} elseif($output -like '*VCRUNTIME140.dll*'){ #release
Write-Host "release $item";
} else {
Write-Host "??? $item";
}
}
}
}
}
check('*.lib');
check('*.dll');
check('*.exe');
Write-Host 'finished'; checking *.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\boost_python-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\cairo-static.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\cairo.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\freetype.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\gdal_i.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\harfbuzz.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icudt.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icuind.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icuucd.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\jpeg.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_chrono-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_date_time-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_filesystem-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_iostreams-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_prg_exec_monitor-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_program_options-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_regex-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_system-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_test_exec_monitor-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_thread-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_timer-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_unit_test_framework-vc140-mt-gd-1_62.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libboost_zlib-vc140-mt-gd-1_62.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libexpat.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libpng16.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libpqd.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libprotobuf-lite.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libtiff_i.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libwebp_debug_dll.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\mapnik-json.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\mapnik-wkt.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\mapnik.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\proj.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\sqlite3.lib MDd C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\zlib.lib debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\zlibwapi.lib checking *.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\boost_python-vc140-mt-gd-1_62.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\cairo.dll release C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\gdal201.dll ??? C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icudt56.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icuin56d.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\icuuc56d.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\jpeg62.dll ??? C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libexpat.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libpng16.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libpqd.dll release C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libtiff.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\libwebp_debug.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\mapnik.dll debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\lib\zlibwapi.dll checking *.exe debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\bin\mapnik-index.exe debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\bin\mapnik-render.exe debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\bin\protoc.exe debug C:\mb\_TEMP\mapnik-test\mapnik-test\lib\x64\Debug\mapnik-sdk\bin\shapeindex.exe finished |
@flippmoke paused before execution of line 164:
|
Does |
@BergWerkGIS Ok, I will create a PR during 2 days!
Is strangely, my first attempt to build mapnik I was doing on notebook with i3 processor, 4GB RAM and it took me nearly 8GB HDD
Now I can not say for sure, I don't remember that in this project I did changes. In most cases, I did changes in batch files. I will prepare my improved project and you will see all. Thanks for testing my sample! |
@DiabloRusso perfect! @flippmoke video of stepping through those lines: mapnik-test.mp4.zip |
@BergWerkGIS I create PR! Will need to make further changes in mapnik/mapnik-gyp, in build.bat exactly! Also I create issue in mapbox/windows-builds |
I still don't see any way still that this bug is even possible in current code in wagyu, so my thought is we are having a memory corruption (likely upstream) from this code. |
@flippmoke within an hour, I'll create PR into Wagyu, I think I found an error... |
@DiabloRusso thanks! It is very hard to debug when I can't reproduce locally! |
@flippmoke Before the first get |
@DiabloRusso thanks so much for hunting this down, its because |
@flippmoke I just clean the bug, but has not check the quality of features in vector tiles. I notified you about my tests. |
Amazing collaboration on this everyone 👏 |
Hi!
I'm trying mapnik (branch v3.0.x) and mapnik-vector-tile (v1.2.2). I build x64 debug configuration for Windows. My test code:
My simplified mapnik style:
I get an error like this? call stack:
This is a bug or am I doing something wrong?
(ClipperLib is here)
Thanx!
The text was updated successfully, but these errors were encountered: