Bug report #18516

Crash during export of vector file as Mapinfo TAB when 'symbology export' option selected.

Added by Matthew Bodnar about 2 years ago. Updated about 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Unknown
Affected QGIS version:3.0.0 Regression?:No
Operating System:WIN 10 1709 Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:26404

Description

User Feedback

I was trying to 'save as' a .shp polygon vector as a MapInfo TAB file with symbology exported as 'Feature Symbology'... then it crashed.
It also crashed when exporting symbology as 'Symbol layer symbology'
It DID NOT crash when saving as a TAB file without symbology export selected.

Report Details

Crash ID: 8fa2b8b945ec9edae6d3e80a748de8536d56c77e

Stack Trace

QgsExpression::evaluate :
QgsGraduatedSymbolRenderer::valueForFeature :
QgsGraduatedSymbolRenderer::originalSymbolForFeature :
QgsFeatureRenderer::symbolsForFeature :
QgsVectorFileWriter::addFeatureWithStyle :
QgsVectorFileWriter::writeAsVectorFormat :
QgsVectorFileWriterTask::run :
QgsTask::start :
QThreadPoolPrivate::reset :
QThread::start :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.0.0-Girona
QGIS code revision: 001c80b0c3
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.3
Running against GDAL: 2.2.3

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.16299

Associated revisions

Revision 95d2a27c
Added by Nyall Dawson about 2 years ago

Split QgsVectorFileWriter writeAsVectorFormat into two methods
to allow correct thread-safe usage

There is now a prepare method, which must be run on the main
thread and which prepopulates feature iterators and clones
renderers, and a separate write method which is safe to
execute on background threads (e.g. tasks)

Fixes #18516

Revision d88ffc6c
Added by Nyall Dawson about 2 years ago

Split QgsVectorFileWriter writeAsVectorFormat into two methods
to allow correct thread-safe usage

There is now a prepare method, which must be run on the main
thread and which prepopulates feature iterators and clones
renderers, and a separate write method which is safe to
execute on background threads (e.g. tasks)

Fixes #18516

(cherry-picked from 95d2a27)

History

#1 Updated by Matthew Bodnar about 2 years ago

This crash appears to be related to the symbology export, regardless of file type being export. If anything other than 'no symbology' is selected, QGIS 3.0.0 will crash.

#2 Updated by Nyall Dawson about 2 years ago

  • Status changed from Open to In Progress

#3 Updated by Nyall Dawson about 2 years ago

  • Pull Request or Patch supplied changed from No to Yes

#4 Updated by Nyall Dawson about 2 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF