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

When saving a shp file object, the object is lost. #53058

Open
2 tasks
kralalala opened this issue May 10, 2023 · 10 comments
Open
2 tasks

When saving a shp file object, the object is lost. #53058

kralalala opened this issue May 10, 2023 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers

Comments

@kralalala
Copy link

kralalala commented May 10, 2023

What is the bug or the crash?

When saving a shp file object, the object is lost.
The number of objects before and after saving is the same, but the object shape is lost. If you look at the picture, green is the original object, and red is the object after saving. I didn't do anything else, I just modified the contents of the field and saved it, but that happens. Is there a solution?

*Original object
원래

*Objects after saving
문제

*before and after comparison
비교

+Additional

When I put the shp file in the cad, this error occurs.

캐드 오류

Steps to reproduce the issue

I don't know

Versions

QGIS 3.28.5

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@kralalala kralalala added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 10, 2023
@agiudiceandrea
Copy link
Contributor

@kralalala, could you please provide the layer, attaching it to this issue report as zipped file or as an URL to download it?

@agiudiceandrea agiudiceandrea added the Feedback Waiting on the submitter for answers label May 10, 2023
@kralalala
Copy link
Author

kralalala commented May 11, 2023

@kralalala, could you please provide the layer, attaching it to this issue report as zipped file or as an URL to download it?

@agiudiceandrea

This is the original shp file of the layer where the error occurred
layer.zip

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented May 11, 2023

@kralalala, I've imported the layer in QGIS 3.28.5 and then exported it using the "Save Vector Layer as..." dialog (via layer context menu "Export"->"Save Features As..." or main menu "Layer"->"Save As...") and it seems to me the exported layer contains the same features and it is visually identical to the original layer

image
image

Could you please describe in details the exact steps needed in order for the issue to occur?

Could you please specify all the info requested in the issue report form (e.g. the content of the Help->About window).

@DelazJ
Copy link
Contributor

DelazJ commented May 11, 2023

I may be wrong but looks like @kralalala did not provide the original layer (the green one in his top message)

@agiudiceandrea
Copy link
Contributor

Thanks @DelazJ, I didn't noticed it.
@kralalala, please provide the original layer and describe in details the exact steps needed in order for the issue to occur and specify all the info requested in the issue report form (e.g. the content of the Help->About window).

@kralalala
Copy link
Author

@agiudiceandrea

The result of modifying and saving some contents of the field in the green layer is the red layer.
An error occurred when saving. So there's no existing green layer.
When saving, you saved the existing layer as it was, not as an export under a different name. (I saved it as a blue circle in the picture below.)

image

Normally, there is no error when saving. However, sometimes when saving after a job, the object disappears like that. So I posted it in the question because I thought I could find a problem in the error file.

@agiudiceandrea agiudiceandrea added Data Provider Related to specific vector, raster or mesh data providers Crash/Data Corruption and removed Feedback Waiting on the submitter for answers labels May 15, 2023
@agiudiceandrea
Copy link
Contributor

@kralalala thanks for reporting the issue. I'm sorry the original file has been corrupted. Could you please specify the content of the QGIS Help->About window in order to know which Operative System QGIS is running on and which GDAL version QGIS is using in your system?

@agiudiceandrea
Copy link
Contributor

@kralalala it seems the Shapefile index file has been mostly corrupted. Find attached a repaired version of your layer with all but 1 the original features and with only some feature geometry with incorrect vertices. Hopefully it will help you to restore your data.
layer_repaired.zip

@kralalala
Copy link
Author

@agiudiceandrea

QGIS GDAL version is this.

image

Thank you for your help in restoring the data.

Could you tell me how to restore it?

@alexbruy
Copy link
Contributor

alexbruy commented Nov 5, 2023

@kralalala is ytour shapefile stored in a folder which is synced by some cloud provider, e.g. dropbox?

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! Crash/Data Corruption Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

4 participants