Bug report #9514

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

Added by Sandro Santilli about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
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

Description

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 about 10 years ago

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

History

#1 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF