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

Qgis 0.8.0 Crash on opening existing project using PostGis layer #10645

Closed
qgib opened this issue Feb 11, 2007 · 5 comments
Closed

Qgis 0.8.0 Crash on opening existing project using PostGis layer #10645

qgib opened this issue Feb 11, 2007 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project

Comments

@qgib
Copy link
Contributor

qgib commented Feb 11, 2007

Author Name: john-floyd-dnr-nsw-gov-au - (john-floyd-dnr-nsw-gov-au -)
Original Redmine Issue: 586

Redmine category:project_loading/saving
Assignee: nobody -


Crashes on opening an existing project with segmentation error after changing properties on layer in a previous session. Note the existing project was created with current qgis8.

Examination of the project file before and after changes shows that the password for the postgis access is dropped. Opening the project without changes, allows loading of the project.

eg

host=localhost dbname=shoalhaven port=5432 user=shoalhaven password= table=public.depthdata_qad (location) sql=

                                                                    ^^^^^^^^^^^^^

Easy to replicate.

My version self compiled on Fedora 6, using qt4-4.2.2-1.fc6 and postgis 1.1.x

@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2007

Author Name: john-floyd-dnr-nsw-gov-au - (john-floyd-dnr-nsw-gov-au -)


I think that the problem is due to the maplayer method publicSource, which removes the password=xxx out of the datasource URI, and if a change to the layer is made then this URI (minus the password=xxx is written to the project file! A solution is to either re gen the text version of the URI when collating the project file or create a copy of the URI for the publicSource method.

A better approach would be to forget about storing the text version and always regen the text version as required. (there is some comment about the duplication of the uri in different forms in the code)

@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2007

Author Name: john-floyd-dnr-nsw-gov-au - (john-floyd-dnr-nsw-gov-au -)


Extra.

It only occurs if you also view the Metadata Page of a postgis layer properties. You actually dont need to change anything! Just hit OK or Apply for the property window and then save the project. Password will disappear from the project file datasource entry for that layer! And on restarting, qgis will crash with a segmentaion error.

Q? The password parsing code should be made to handle the password= condition (that is nothing after the =) without crashing regardless.

@qgib
Copy link
Contributor Author

qgib commented Mar 7, 2008

Author Name: Paolo Cavallini (@pcav)


The bug seems solved in 0.9.2. If it is not confirmed, please close it.

@qgib
Copy link
Contributor Author

qgib commented Mar 12, 2008

Author Name: Paolo Cavallini (@pcav)


  • resolution was changed from to worksforme
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Aug 21, 2009

Author Name: Anónimo (Anónimo)


Milestone Version 0.9.2 deleted

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Project labels 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! Project
Projects
None yet
Development

No branches or pull requests

1 participant