Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with 'Save as..' option #16540

Closed
qgib opened this issue Apr 14, 2013 · 7 comments
Closed

Crash with 'Save as..' option #16540

qgib opened this issue Apr 14, 2013 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Apr 14, 2013

Author Name: Pedro Venâncio (Pedro Venâncio)
Original Redmine Issue: 7612
Affected QGIS version: master
Redmine category:vectors


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.


@qgib
Copy link
Contributor Author

qgib commented Apr 14, 2013

Author Name: Pedro Venâncio (Pedro Venâncio)


I'm almost 100% sure that this problem is caused by the Lecos Plugin (v1.7.2). With this plugin disabled, the 'Save as' works without problems.

Anyone confirm?


  • 5554 was configured as crash.zip

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2013

Author Name: Martin Jung (Martin Jung)


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


  • 5556 was configured as test.zip

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2013

Author Name: Pedro Venâncio (Pedro Venâncio)


Hi Martin,

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.

Thanks!

@qgib
Copy link
Contributor Author

qgib commented Apr 17, 2013

Author Name: Martin Jung (Martin Jung)


Hey,

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.

@qgib
Copy link
Contributor Author

qgib commented Apr 17, 2013

Author Name: Pedro Venâncio (Pedro Venâncio)


Hi Martin,

The reason to not crash in version 1.8 is because I do not have the LecoS plugin installed there.

@qgib
Copy link
Contributor Author

qgib commented Apr 19, 2013

Author Name: Martin Jung (Martin Jung)


Hurray,

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.


  • done_ratio was changed from 0 to 100

@qgib
Copy link
Contributor Author

qgib commented Apr 28, 2013

Author Name: Pedro Venâncio (Pedro Venâncio)


Hi Martin,

It's fixed!

Thank you very much!!


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant