Bug report #9514

Crash on loadNamedStyle against a layer created with an URI initialized with bogus aSql and aKeyColumn

Added by Sandro Santilli over 9 years ago. Updated over 9 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:18105


I made a mistake in calling QgsDataSourceURI.setDataSource from python and passing it 4 arguments instead of 5,
practically I passed the "key column" as the 4th argument which was so interpreted as "aSql".

Creating a QgsVectorLayer with the resulting URI resulted in corrupted memory and in a crash on the subsequent call to .loadNamedStyle.

Associated revisions

Revision 4c87b0c1
Added by Jürgen Fischer over 9 years ago

vector layer: don't crash on missing labels in invalid layers la(fix #9514)


#1 Updated by Jürgen Fischer over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF