Bug report #20712
Crash at QgsApplication.initQgis() on Mac
Status: | In Progress | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Peter Petrik | ||
Category: | Python bindings / sipify | ||
Affected QGIS version: | 3.5(master) | Regression?: | No |
Operating System: | macos mojave 10.14.1 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 28532 |
Description
Simple application crushed by signal 11.
I attached crush report of Mac.
I go back to QGIS3.2.2 Bonn. It's OK, no crush.
- source: "The PyGIS Programmer's Guide"
from PyQt5.QtWidgets import QApplication
from qgis.core import QgsApplication
from ourmainwindow_3 import OurMainWindow
app = QApplication([])- set up QGIS
##QgsApplication.setPrefixPath("/Users/gsherman/apps/QGIS.app/Contents/MacOS", True)
QgsApplication.setPrefixPath("/Applications/QGIS3.app/Contents/MacOS", True)
QgsApplication.initQgis()
- set the main window and show it
mw = OurMainWindow()
mw.show()
app.exec_()
- "delete" our main window
mw = None - clean up QGIS
QgsApplication.exitQgis()
- end of source
History
#1 Updated by Giovanni Manghi almost 6 years ago
- Crashes QGIS or corrupts data changed from No to Yes
- Priority changed from Normal to High
- Subject changed from QGIS3.6.2 crush at QgsApplication.initQgis() on Mac to QGIS 3.4.2 crush at QgsApplication.initQgis() on Mac
#2 Updated by Peter Petrik almost 6 years ago
- Status changed from Open to Feedback
Unable to replicate on Mac 10.14.1 and QGIS 3.5 master.
Based on the attached crash report (crash in QgsAuthManager::authDatabaseConnection() const + 415 ) I suspect it could be related to packaging (system python installation) or corrupted user profile.
Can you please with test with clean user profile
#3 Updated by Ikuo Yamaga almost 6 years ago
- Assignee set to Ikuo Yamaga
Same crushed with 10.14.2 and 3.4.4. 3.2.2 Bonn was good.
My python3.6 was maybe clean. I don't touch anything and I created virtualenv for it.
What's mean "clean user profile" ? bash_profile or not.
#4 Updated by Ikuo Yamaga almost 6 years ago
- Assignee changed from Ikuo Yamaga to Peter Petrik
#5 Updated by Giovanni Manghi almost 6 years ago
What's mean "clean user profile" ? bash_profile or not.
QGIS 3 supports multiple (QGIS) user profiles, you can create new ones.
#6 Updated by Ikuo Yamaga almost 6 years ago
- File QGIS344crush.png added
- File our_app_3.py added
- File QGIS322runing.png added
- File Qgis344crush.txt added
I create new profile "debug" and set default profile to "debug". But crushed.
I think it was not concern to profile setting, since it was standalone application.
QGIS344 was no good. QGIS322 is good!
I'm testing by rename /Application/QGIS3.app.
--- on console
(venv) Ikuo-no-iMac:qgis3py yamaga$ python3 ./standalone/our_app_3.py
#7 Updated by Jürgen Fischer almost 6 years ago
- Subject changed from QGIS 3.4.2 crush at QgsApplication.initQgis() on Mac to QGIS 3.4.2 crash at QgsApplication.initQgis() on Mac
#8 Updated by Giovanni Manghi almost 6 years ago
- Status changed from Feedback to Open
- Affected QGIS version changed from 3.4.2 to 3.4.4
#9 Updated by Peter Petrik almost 6 years ago
I can replicate the issue when I drag 'n' drop the .py file to QGIS. running individual commands is OK
#10 Updated by Peter Petrik almost 6 years ago
- Subject changed from QGIS 3.4.2 crash at QgsApplication.initQgis() on Mac to Crash at QgsApplication.initQgis() on Mac
- Affected QGIS version changed from 3.4.4 to 3.5(master)
#11 Updated by Peter Petrik almost 6 years ago
- Status changed from Open to In Progress