Bug report #7612
Crash with 'Save as..' option
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Xubuntu||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16540|
I have been attempt to find the source of this problem a few days ago, but still could not quite understand what is the origin. The only pattern I find is that always happens with fields of type "Real" with Precision greater than 0.
I attached a shapefile of test.
To reproduce the error, open the shape, make Save as... (Save vector layer as...) and try to save. With this procedure, QGIS crashes with a Segmentation fault (core dumped).
The problem is with the field "m2". But I can not understand what is wrong in this field that may be causing the problem. This happens to me with many type of layers, including PostGIS, SpatiaLite or Shapefile layers.
With exactly the same layers, QGIS 1.8 works fine, without any error. So I think it is a regression.
#2 Updated by Martin Jung almost 8 years ago
- File test.zip added
With your Shape -> Confirmed.
With other different shapes -> Not confirmed (see the attached example polygon and point shapes, which work at least for me without issues)
As the plugins author i don't really see what i can do as the "save as" function is an internal c++ function of QGIS and at least to my understanding those functions shouldn't be affected by plugin python code.
At least i have no idea how to fix this kind of error... :-(
System: Debian Wheezy - QGIS dev
#3 Updated by Pedro Venâncio almost 8 years ago
This crash does not occur with all layers, but occurs in a large set of tests that I did.
Honestly, I also can not understand how a plugin can cause this type of problem, but the truth is that the crash occurs with LecoS active and disappears with its deactivation.
#4 Updated by Martin Jung almost 8 years ago
i just tested your shapefile on Windows using both QGIS 1.8 Lisboa and QGIS dev. "Saving" your layer results in a crash for both stable and development. In your bug report you mentioned that it worked for you on your QGIS 1.8 stable.
Can you please provide the details (library versions -> make screenshot of the QGIS about dialog) of your QGIS 1.8 version?
I have no idea what the reason for this error is, but i assume that it has something to do with gdal or ogr.
#6 Updated by Martin Jung almost 8 years ago
- % Done changed from 0 to 100
i got it fixed! Or at least your example point shape isn't causing QGIS to crash anymore while LecoS is activated.
I tried multiple random things and finally found the reason. It appears to be the call of gdal.UseExceptions() and/or ogr.UseExceptions()
I will soon upload a bug fix where those lines are commented in every script.
About the real Reason:
Maybe it is a bug with the gdal/ogr python libraries.