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
Visual test group-symbolizer-4.xml crashes with access violation on windows with mapnik 3.0.11 #3453
Comments
|
I built mapnik myself with CMake from: https://github.com/SNiLD/mapnik/tree/master I run the test with the generated run_visual_test.exe with following command: I did not set any variables on path. Which variables are needed?
It might also be worth mentioning that other tests do not crash (if I move the |
I suppose you are also building all the dependencies yourself? Could you share the versions of your dependencies?
When we package mapnik we create a little batch file that sets See https://mapnik.s3.amazonaws.com/dist/dev/mapnik-win-sdk-v3.0.10-x64-14.0.7z
If you are working off a fork and have the
Hm, that's interesting. As my first thought was that it might have something to do with your dependencies but then probably more crashes would occur.
Yes, working on that, e.g. #3437 Still trying to replicate your problem - running a new In the meantime, any chance you could provide a crash dump or exception information? What compiler and version thereof are you using? |
I have compiled all of the dependencies myself. Here is the list of versions I'm using:
I'm building mapnik as dynamic library (BUILD_SHARED_LIBS=TRUE). I'm building harfbuzz from the Visual Studio project files that it provides. This newer version of harfbuzz does not seem to have any usage of HB_NO_MT define anywhere. I'll test with those environment variables soon (altough they should not be related to the crash, but rather on some of the other tests failing). I got the stack trace by attaching Visual Studio debugger to the Microsoft Visual Studio Express 2015 for Windows Desktop Version 14.0.25123.00 Update 2 |
As I suspected the minidump is way too big to upload to github (160MB, 44.7MB compressed). I don't know what you mean with exception information? When you start debugging from a crash it's too late to catch any exceptions. I tried running the tests with Results without Unit tests: Most unit test failures are from postgis because I don't have it. Another one is from image_io_test because it has hardcoded path
|
Actually you can. It's simply on the current drive. With the version you're trying you'll need to create the X:/tmp/ directory yourself, with mapnik 3.0.11+ the test creates it. As for the original issue, can you try with 3.0.11 or master, please? The bottom of your stack trace (I mean the bottom of the stack, i.e. visually the top of your trace;)) has undergone some refactoring. The error looks like double-delete in a stack-allocated container, which is pretty weird, and it'd be great if it just went away ;) You can also try removing the three |
@SNiLD first of all thanks for the detailed information.
Yes,
Makes sense.
As @lightmare pointed out you could just create this one manually before running the tests if the user account running the tests doesn't have permissions to create a directory directly below You can also make use of the
That's the same it get, which might be due to a compiler bug in Visual Studio 2015 Update 2.
It seems fonts are not found. In the SDK we have them in
Any chance to upload it somewhere else? Dropbox, Google Drive, ...?
There is no other information than the stack trace in the dump file? Other ways to get a dump file that might contain more information:
https://www.microsoft.com/en-us/download/details.aspx?id=4060
https://technet.microsoft.com/en-us/sysinternals/dd996900 Ways to debug:
How to get and run it, see https://gist.github.com/BergWerkGIS/534a5e74301c5607af5c
To step through the test as it is run right-click on the project -> Debug -> Start new instance:
To sum up, it would be great if you could try to
|
I have merged tag v3.0.11 and tried with it and it still crashes (again when the I also tried commenting out the Here is the new stacktrace:
I have uploaded this minidump to dropbox as well: render_markers_symbolizer_crash.zip I also tried procdump like @BergWerkGIS suggested and it catches unhandled exception in earlier test with following trace:
I have uploaded this dump to dropbox as well: shapefile_memory_mapped_exception.zip New version visual test results (without Unit tests: So only the postgis unit tests are now failing (because I don't have it). |
Opening render_markers_symbolizer_crash.zip with
Although that might be wrong as there is no stack unwind information available. @SNiLD from the dump file I see you are doing We've stopped doing As next step I'll look into the |
Yes I have read about #3327 for example. I was wondering how they profile the memory usage while compiling a specific file. If they're talking about .obj file size on disk my Maybe you should try the CMake generated files. In general they seem to work very well even for complicated projects.
I need both Debug and Release builds with my C++ project so I already have Release versions of all of the dependencies. I'll try to compile RelWithDebInfo version as well. @BergWerkGIS Did you notice that my unit tests run fine, so no #3437 error that you get with your project 😏 ? |
@SNiLD could you try to remove the last three You can pass in just that test like so:
Yes that's very interesting.
Yes, would be interested to give your build scripts a go for comparison. Where/how would I start? Here? https://github.com/SNiLD/mapnik-cmake |
Those are old CMake files for mapnik 2.2.0. You should start from here: https://github.com/SNiLD/mapnik I've made tags for v3.0.10-cmake and v3.0.11-cmake (which are basically the respective tags from mapnik but with CMake files added). If you're unfamiliar with CMake here are simplified instructions for building with CMake:
CMake uses find scripts to find specific dependencies. By default dependencies are searched with find_path and find_library commands. You have two general ways to find the dependencies:
|
I now ran the visual tests with Release with Debug info build and it does not crash (however the progress print is a bit cryptic, probably have to check what's wrong there). In release mode I have two more failures and two more successes (because now I can get This would hint that there is underlying issue with how the Here's what the output looks like:
I tried removing the last 3 GroupRules and the test still crashes with debug build. |
Interesting, tests that fail in
How about the core test #3437? |
You're correct. I'm getting the same error when running on release mode:
|
@SNiLD I've troubles to get your cmake version working:
But they are here:
Any ideas? |
I have linked against the dynamic versions of the boost libraries. But basically my cmake version uses the CMake provided FindBoost.cmake module. Using the CMake argument is the way to go as you have tried. In addition to
The preferred way to find boost is to define the |
Oh my, finally got past |
Ok here's a theory. inline mapnik::svg_path_ptr get_data() const
{
return vector_data_;
} boost::optional<svg_path_ptr> const& stock_vector_marker = mark.get_data(); I was a little bit surprised this conversion compiles without complaints, but I guess it's correct. It constructs a temporary The svg_path_ptr stock_vector_marker = mark.get_data();
svg_path_ptr marker_ptr = stock_vector_marker;
bool is_ellipse = false;
svg_attribute_type s_attributes;
auto const& r_attributes = get_marker_attributes(stock_vector_marker, s_attributes); |
@lightmare I tried this fix you proposed but it still crashes from the same place. @BergWerkGIS What's the name of your iconv library? The iconv find script assumes |
Just realized we don't build |
I think I found the issue. vector_marker_render_thunk stores a copy of Although in mapnik we have modified @artemp @springmeyer Proper fix: make |
@lightmare - great find! We should definitely replace pod_* with std containers, not just |
I've just learned It's easily fixed with an include, but while investigating why it compiled successfully on linux (it's because here the block size is defined in terms of a function rather than a static constant member), I found out that with I wonder if I should go with the include to have the complete type, or with a I've always assumed |
@lightmare - |
@SNiLD could you share your scripts to build dependencies? I've managed to build the deps that are required by your scripts but we don't build by default (iconv, geos, spatialite) and with some tweaks and fiddling finally got past the As a side note, some deps seem to get found ( Could NOT find TIFF (missing: TIFF_LIBRARY) (found version "4.0.4") Could NOT find ICU (missing: ICU_LIBRARIES) (found version "56.1.0") Now at the |
I don't have any special scripts for building dependencies. They're build with the provided build systems of each library.
When I build mapnik, I first pull the dependencies from this repository with custom script so that I get following directory structure under
In this case the
You should get a list of Required, Recommended and Optional dependencies after the CMake generation is successful.
This means your include directories are correct but the library directories/names are not (like it says If your tiff library name is exotic you can provide the custom library name with Default dependency find scripts are located in These are the locations you should search for the find scripts for hints what names they assume for your libraries (and where they search by default). For example the find_package(TIFF) tries to first open FindTIFF.cmake from CMAKE_MODULE_PATH i.e. Maybe we should move this CMake discussion out of this ticket and maybe create a new one? |
@artemp Right, I'll use |
Full stack trace:
The text was updated successfully, but these errors were encountered: