Bug report #17077
QGIS Crashes when using SVG marker for point layer in map units or with rotation
|Affected QGIS version:||2.18.12||Regression?:||Yes|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||24976|
Have more than 5000 point features and show it as SVG marker.
Give any rotation angle. (ie 45 degree)
make some Zoom in and Zoom out, then Ooops Oh! Uh!, QGIS's gone :(
Keep SVG markers in MapUnit.
make zoom in and zoom out, then again Ooops Oh! Uh!, QGIS's gone again :(
Fix crashes caused by concurrent rendering of cached QPictures from QgsSvgCache
QgsSvgCache::svgAsPicture was rendering an implicitly shared copy when
the picture had already been cached. It turns out that rendering an
implicitly shared QPicture copy isn't thread safe, and rendering shared
copies simulataneously across different threads leads quickly to a crash.
Accordingly we always detach the QPicture objects returned by
svgAsPicture, so that the returned QPicture is safe to use across threads.
Also add unit tests for this, and a similar unit test to verify that
rendering of QImage based cached copies does not suffer the same
#2 Updated by Giovanni Manghi about 4 years ago
- File points.zip added
- Subject changed from SVG marker in MapUnit or give Rotation angle in QGIS 3.0 to QGIS Crashes when using SVG marker fpr point layer in MapUnit or with rotation angle
- Affected QGIS version changed from master to 2.18.12
- Regression? changed from No to Yes
This also affects 2.18.12 but not 2.14, regression. Layer attached.
#6 Updated by Alessandro Pasotti about 4 years ago
- File stacktrace2.txt added
src/core/qgsvectorlayerrenderer.cpp: 291: (drawRendererV2) [0ms] [thread:0x7fff0000b3d0] Drawing of vector layer points20170922130742064 cancelled.
src/core/qgsmaprendererparalleljob.cpp: 279: (renderLayerStatic) [0ms] [thread:0x7fff0000b3d0] job e66b450 end [29 ms] (layer points20170922130742064)
- Error in `/home/ale/dev/QGIS/build-local/output/bin/qgis': malloc(): smallbin double linked list corrupted: 0x000000000a8634e0 ***
See attached stacktrace2.txt