Bug report #9514
Crash on loadNamedStyle against a layer created with an URI initialized with bogus aSql and aKeyColumn
|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.