{"comment":{"created_at":"2011-10-11T16:40:50Z","body":"[springmeyer] with:\r\n\r\n{{{\r\n#!diff\r\nIndex: src/agg/process_raster_symbolizer.cpp\r\n===================================================================\r\n--- src/agg/process_raster_symbolizer.cpp\t(revision 3338)\r\n+++ src/agg/process_raster_symbolizer.cpp\t(working copy)\r\n@@ -86,6 +86,33 @@\r\n                 ts.backward(&xs(i,j), &ys(i,j));\r\n             }\r\n         }\r\n+        \r\n+        // native\r\n+        prj_trans.forward(xs.getData(), ys.getData(), NULL, mesh_nx*mesh_ny);\r\n+\r\n+        for(j=0; j<mesh_ny-1; j++) {\r\n+            for (i=0; i<mesh_nx-1; i++) {\r\n+                box2d<double> win(xs(i,j), ys(i,j), xs(i+1,j+1), ys(i+1,j+1));\r\n+                win = ts.forward(win);\r\n+                CoordTransform tw(mesh_size, mesh_size, win);\r\n+                unsigned x, y;\r\n+                for (y=0; y<mesh_size; y++) {\r\n+                    for (x=0; x<mesh_size; x++) {\r\n+                        double x2=x, y2=y;\r\n+                        tw.backward(&x2,&y2);\r\n+                        if (x2>=0 && x2<source.data_.width() &&\r\n+                            y2>=0 && y2<source.data_.height())\r\n+                        {\r\n+                            target.data_(i*mesh_size+x,(j+1)*mesh_size-y) =\\\r\n+                                source.data_((unsigned)x2,(unsigned)y2);\r\n+                        }\r\n+                    }\r\n+                }\r\n+            }\r\n+        }\r\n+        \r\n+        // agg version\r\n+        /*\r\n         prj_trans.backward(xs.getData(), ys.getData(), NULL, mesh_nx*mesh_ny);\r\n \r\n         // warp image using projected mesh points using bilinear interpolation\r\n@@ -164,6 +191,7 @@\r\n \r\n             }\r\n         }\r\n+        */\r\n     }\r\n }\r\n \r\n\r\n}}}\r\n\r\nnow getting much better perf and this crash:\r\n\r\n{{{\r\n/lib64/libc.so.6[0x2b5a2285c45f]\r\n/lib64/libc.so.6(cfree+0x4b)[0x2b5a2285c8bb]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik10wkb_reader15read_linestringERN5boost10ptr_vectorINS_8geometryINS_6vertexIdLi2EEENS_13vertex_vectorEEENS1_20heap_clone_allocatorESaIPvEEE+0x382)[0x2b5a48674e12]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik10wkb_reader4readERN5boost10ptr_vectorINS_8geometryINS_6vertexIdLi2EEENS_13vertex_vectorEEENS1_20heap_clone_allocatorESaIPvEEE+0x12f2)[0x2b5a48676ba2]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik14geometry_utils8from_wkbERN5boost10ptr_vectorINS_8geometryINS_6vertexIdLi2EEENS_13vertex_vectorEEENS1_20heap_clone_allocatorESaIPvEEEPKcjbNS_9wkbFormatE+0xce)[0x2b5a486745ce]\r\n/opt/mapnik/lib/mapnik2/input/postgis.input(_ZN18postgis_featureset4nextEv+0x22c)[0x2b5a59b0a95c]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik23feature_style_processorINS_12agg_rendererINS_8image_32EEEE14apply_to_layerERKNS_5layerERS3_RKNS_10projectionEdRSt3setISsSt4lessISsESaISsEE+0xf3e)[0x2b5a485d40ae]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik23feature_style_processorINS_12agg_rendererINS_8image_32EEEE5applyEv+0x14e)[0x2b5a485d53fe]\r\n/opt/mapnik/lib/node/mapnik/_mapnik.node(_ZN3Map15EIO_RenderImageEP7eio_req+0x8a)[0x2b5a481b502a]\r\nnode[0x540d2b]\r\n/lib64/libpthread.so.0[0x2b5a225d573d]\r\n/lib64/libc.so.6(clone+0x6d)[0x2b5a228be4bd]\r\n======= Memory map: ========\r\n00400000-009e5000 r-xp 00000000 08:03 378078322                          /opt/mapnik/bin/node\r\n00be4000-00bee000 rw-p 005e4000 08:03 378078322                          /opt/mapnik/bin/node\r\n00bee000-00c17000 rw-p 00bee000 00:00 0 \r\n123b3000-14840000 rw-p 123b3000 00:00 0                                  [heap]\r\n\r\n}}}","updated_at":"2011-10-11T16:40:50Z","url":"https://api.github.com/repos/artemp/mapnik/issues/comments/2367952","id":2367952,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":879,"created_at":"2011-10-11T16:40:17Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"gdal is svn r23025 and is built --with-threads.\r\n\r\n\r\n{{{\r\n\r\n*** glibc detected *** node: munmap_chunk(): invalid pointer: 0x000000000e70dc80 ***\r\n======= Backtrace: =========\r\n/lib64/libc.so.6(cfree+0x166)[0x2b7853cd49d6]\r\n/opt/mapnik/lib/libmapnik2.so.2.0[0x2b7879b88238]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik12agg_rendererINS_8image_32EE7processERKNS_17raster_symbolizerERKNS_7featureINS_8geometryINS_6vertexIdLi2EEENS_13vertex_vectorEEEN5boost10shared_ptrINS_6rasterEEEEERKNS_14proj_transformE+0x1fe)[0x2b7879b8909e]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN5boost7variantIN6mapnik16point_symbolizerENS1_15line_symbolizerENS1_23line_pattern_symbolizerENS1_18polygon_symbolizerENS1_26polygon_pattern_symbolizerENS1_17raster_symbolizerENS1_17shield_symbolizerENS1_15text_symbolizerENS1_19building_symbolizerENS1_18markers_symbolizerENS1_16glyph_symbolizerENS_6detail7variant5void_ESF_SF_SF_SF_SF_SF_SF_SF_E27internal_apply_visitor_implINSE_14invoke_visitorIKNS1_23feature_style_processorINS1_12agg_rendererINS1_8image_32EEEE15symbol_dispatchEEEPKvEENT_11result_typeEiiRST_T0_+0x175)[0x2b7879a30235]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik23feature_style_processorINS_12agg_rendererINS_8image_32EEEE14apply_to_layerERKNS_5layerERS3_RKNS_10projectionEdRSt3setISsSt4lessISsESaISsEE+0x11cc)[0x2b7879a4c33c]\r\n/opt/mapnik/lib/libmapnik2.so.2.0(_ZN6mapnik23feature_style_processorINS_12agg_rendererINS_8image_32EEEE5applyEv+0x14e)[0x2b7879a4d3fe]\r\n/opt/mapnik/lib/node/mapnik/_mapnik.node(_ZN3Map15EIO_RenderImageEP7eio_req+0x8a)[0x2b787962d02a]\r\nnode[0x540d2b]\r\n/lib64/libpthread.so.0[0x2b7853a4d73d]\r\n/lib64/libc.so.6(clone+0x6d)[0x2b7853d364bd]\r\n======= Memory map: ========\r\n00400000-009e5000 r-xp 00000000 08:03 378078322                          /opt/mapnik/bin/node\r\n00be4000-00bee000 rw-p 005e4000 08:03 378078322                          /opt/mapnik/bin/node\r\n00bee000-00c17000 rw-p 00bee000 00:00 0 \r\n0d0d6000-0e72e000 rw-p 0d0d6000 00:00 0                                  [heap]\r\n41a39000-41a3a000 ---p 41a39000 00:00 0 \r\n41a3a000-41a4a000 rwxp 41a3a000 00:00 0 \r\n2aaaac000000-2aaaac050000 rw-p 2aaaac000000 00:00 0 \r\n2aaaac050000-2aaab0000000 ---p 2aaaac050000 00:00 0 \r\n2aaab0000000-2aaab02f0000 rw-p 2aaab0000000 00:00 0 \r\n2aaab05e5000-2aaab08da000 rw-p 2aaab05e5000 00:00 0 \r\n2b78522d0000-2b78522ec000 r-xp 00000000 08:03 355631107                  /lib64/ld-2.5.so\r\n2b78522ec000-2b78522ed000 rw-p 2b78522ec000 00:00 0 \r\n2b7852301000-2b7852350000 rw-p 2b7852301000 00:00 0 \r\n}}}","comments":7,"title":"crash rendering raster","updated_at":"2011-10-11T16:40:51Z","url":"https://api.github.com/repos/artemp/mapnik/issues/879","id":1878324,"assignee":null,"milestone":{"number":13,"created_at":"2011-10-11T15:50:48Z","due_on":"1970-01-01T09:21:56Z","title":"Mapnik 2.0","creator":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"url":"https://api.github.com/repos/artemp/mapnik/milestones/13","open_issues":1,"closed_issues":197,"description":"Upcoming Mapnik 2 release (first in series)\r\n\r\nMajor new features:\r\n\r\n  * Expressions support ( dynamic/data-driven symbolizers - #359, #70,#352)\r\n  * SVG Symbol support, including Gradients\r\n  * \"!MetaWriters\": Support for outputting GeoJSON of rendered features (see: MetaWriter)\r\n  * Python3 support (wiki:Python3k)\r\n  * Better raster scaling methods like lanczos, cubic, and higher quality bilinear (#656)\r\n  * New RasterColorizer for color ramping data rasters\r\n  * Support for \"interior\" placement of points and labels (aka point_on_surface) #709\r\n  * Performance improvements under high concurrent load (avoidance of proj4 locking)\r\n  * Addition of a 'mapnik-config' program to query mapnik settings\r\n  * Support for XInclude in stylesheets: #567 ([http://trac.mapnik.org/browser/trunk/tests/data/good_maps/xinclude examples])\r\n  * New plugins: Rasterlite, GEOS, templates/hello_world\r\n  * NUmerous improvements to alpha blending in raster support\r\n  * New usage of boost::spirit 2 for parsing (colors, filters, expressions)\r\n    * This means much 'slower' compiles but faster runtime code\r\n  * Addition of Jpeg reader for reading jpeg symbols and jpeg datasources (in raster.input)\r\n  * Advanced MarkersSymbolizer drawing options\r\n  * memory_datasource support in python (dynamic creation of features)\r\n  * Support for the clang++ compiler\r\n  * Fractional text halos using Freetype2 Stroker\r\n  * Ability to align pattern fills globally (#203)\r\n  * Vastly improved builds on Open Solaris\r\n  * Support for .dbf files over 2GB (#595)\r\n  * Support for triggering line breaks with '\\n' character (#584)\r\n  * Symbols are lazily cached instead of being read from filesystem many times\r\n  * Features are cached when used in more than one style consecutively (optional feature)\r\n  * Added ability to pass scale factor to renderer to scale symbols, fonts, line widths\r\n  * OGCServer removed from source tree, now at https://github.com/mapnik/OGCServer with many bugfixes: \r\n  * WKT parser\r\n\r\nFollowing features will be addressed in subsequent releases:\r\n \r\n  * Polygon hatch fills (#642)\r\n  * Map orientation\r\n  ","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/artemp/mapnik/issues/879","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/artemp/mapnik/labels/Core_Library","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1878324,"comment_id":2367952}}