Bug report #2986
Opening a project file from a plugin crashes QGIS
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Borys Jurgiel | ||
Category: | Python plugins | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 13046 |
Description
When I try to open a project file from a plugin QGIS crashes. I use a valid Project file, which loads normally through the GUI.
Here is some code:
self.iface.addProject(qstrPath)
also I tried:
self.iface.newProject()
qFileInfo = QtCore.QFileInfo(qstrPath)
QgsProject.instance().read(qFileInfo)
QGIS starts loading the layers, but before finishing QGIS 1.5 crashes on Windows.
History
#1 Updated by Borys Jurgiel about 14 years ago
Is it still valid?
#2 Updated by peppo - almost 14 years ago
Replying to [comment:1 borysiasty]:
Is it still valid?
Well, it did not work in version 1.5. I did not try any nightly builds.
So I guess, the bug report is valid. I would be happy, if you could fix it or tell me what i did wrong with the iface.addProject(qstrPath) function call.
cheers Peppo
#3 Updated by Volker Fröhlich almost 14 years ago
Works for me on QGIS 1.6 on Linux.
#4 Updated by Martin Dobias almost 14 years ago
- Resolution set to fixed
- Status changed from Open to Closed
This kind of crash has been fixed recently (in 752bad8d (SVN r14435))