Open joaoponceleao opened 1 year ago
@SrNetoChan is this the same error you are seeing?
Yes @gillins the first one is the one I saw, I couldn't investigate more to understand what it implies.
The rest of the errors described by @joaoponceleao are sort of expected. We have no builds with saga or grass (but installing by your own would probably fix it) and about plugins... Well, they are not designed to work with conda. You can install the package using conda, or you can install pip using conda. That way any installation from plugins should use that pip. I would prefer the first option.
@SrNetoChan just tested this on linux_aarch64
and I don't see any of the above errors - all seems to be fine. What is it about the OSX build that is causing this? And is it also a problem on x86 OSX?
I have no idea. I have limited access to the Mac OS M1 machine, so I didn't get to try much more and see what is failing. There's that error an a bunch of warnings, but for general purpose, everything seems to work fine.
Ah fair enough, I don't have access to OSX either - will leave it for someone with more OSX experience to investigate and resolve. Good to hear it works fine though!
I suspect it may be more to do with the OS (Ventura) and its new permissions system rather than the arm architecture. I can try installing it under rosetta to see but best would be someone with an M1 testing it under the previous Monterey OS.
My system configuration:
macBook pro M1 Pro 16 GB SO Ventura 13.0.1
confirm error @joaoponceleao :
An error occurred during execution of following code: faulthandler.enable(file=fault_handler_file)
Traceback (most recent call last):
File "'', line 1, in
PermissionError: [Errno 1] Operation not permitted
Notifications from terminal :
(qgis3_283_env) ivano@MBP-di-Ivano ~ % qgis
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Populating font family aliases took 182 ms. Replace uses of missing font family "FreeSans" with one that exists to avoid this cost.
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: Broken filename passed to function
"<font color=\"red\">An error occurred during execution of following code:<br><tt>faulthandler.enable(file=fault_handler_file)</tt></font><br><pre><br>Traceback (most recent call last):<br> File \"<string>\", line 1, in <module><br>PermissionError: [Errno 1] Operation not permitted<br><br></pre>Python version:<br>3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:29:41) [Clang 14.0.6 ]<br><br>QGIS version:<br>3.28.3-Firenze 'Firenze', exported<br><br>Python path:<br>['/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python', '/Users/ivano/Library/Application Support/QGIS/QGIS3/profiles/ivangeek/python', '/Users/ivano/Library/Application Support/QGIS/QGIS3/profiles/ivangeek/python/plugins', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python/plugins', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python/plugins', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python', '/Users/ivano', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python311.zip', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11/lib-dynload', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11/site-packages']"
If you run the installation in an environment with intel packages (rosetta), everything is fine without any error reports.
(qgis3_283_ros) ivano@MBP-di-Ivano ~ % qgis
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Populating font family aliases took 339 ms. Replace uses of missing font family "FreeSans" with one that exists to avoid this cost.
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: Broken filename passed to function
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: Broken filename passed to function
Note the difference in performance in (ms).
So I would not say that the problems could be related to the Ventura operating system.
qgis3_283_env
## Package Plan ##
environment location: /opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env
added / updated specs:
- qgis
The following packages will be downloaded:
package | build
---------------------------|-----------------
blosc-1.21.3 | h1d6ff8b_0 28 KB conda-forge
brotlipy-0.7.0 |py311he2be06e_1005 353 KB conda-forge
ca-certificates-2022.12.7 | h4653dfc_0 142 KB conda-forge
ceres-solver-2.1.0 | ha0d94fb_1 974 KB conda-forge
cffi-1.15.1 | py311hae827db_3 272 KB conda-forge
coverage-7.1.0 | py311he2be06e_0 343 KB conda-forge
cryptography-39.0.1 | py311h507f6e9_0 1.1 MB conda-forge
curl-7.88.0 | h9049daf_0 139 KB conda-forge
draco-1.5.6 | hffc8910_0 710 KB conda-forge
eigen-3.4.0 | hc021e02_0 1.2 MB conda-forge
exiv2-0.27.6 | h98a1b47_1 925 KB conda-forge
fontconfig-2.14.2 | h82840c6_0 232 KB conda-forge
freetype-2.12.1 | hd633e50_1 559 KB conda-forge
future-0.18.3 | pyhd8ed1ab_0 357 KB conda-forge
gdal-3.6.2 | py311h43bd5d3_7 1.5 MB conda-forge
geotiff-1.7.1 | hdcdc974_6 110 KB conda-forge
gflags-2.2.2 | hc88da5d_1004 85 KB conda-forge
glib-2.74.1 | hb5ab8b9_1 473 KB conda-forge
glib-tools-2.74.1 | hb5ab8b9_1 96 KB conda-forge
glog-0.6.0 | h6da1cb0_0 95 KB conda-forge
gmp-6.2.1 | h9f76cd9_0 557 KB conda-forge
gsl-2.7 | h6e638da_0 2.6 MB conda-forge
gst-plugins-base-1.22.0 | h8b7775e_0 1.8 MB conda-forge
gstreamer-1.22.0 | hcb7b3dd_0 1.3 MB conda-forge
hdf5-1.12.2 |nompi_ha7af310_101 2.8 MB conda-forge
jpeg-9e | h1a8c8d9_3 213 KB conda-forge
kealib-1.5.0 | hfd766a6_0 126 KB conda-forge
krb5-1.20.1 | h69eda48_0 1.0 MB conda-forge
laz-perf-3.3.0 | hffc8910_0 96 KB conda-forge
lcms2-2.14 | h481adae_1 200 KB conda-forge
libaec-1.0.6 | hb7217d7_1 27 KB conda-forge
libclang-14.0.6 |default_h81a5282_0 127 KB conda-forge
libclang13-14.0.6 |default_he70ec0d_0 7.4 MB conda-forge
libcurl-7.88.0 | h9049daf_0 315 KB conda-forge
libdeflate-1.17 | h1a8c8d9_0 47 KB conda-forge
libgdal-3.6.2 | hfc7748e_7 7.5 MB conda-forge
libgfortran-5.0.0 |11_3_0_hd922786_27 143 KB conda-forge
libgfortran5-11.3.0 | hdaf2cc0_27 1.0 MB conda-forge
libllvm14-14.0.6 | hf6e71e7_1 24.9 MB conda-forge
libnetcdf-4.9.1 |nompi_h66d6d65_100 636 KB conda-forge
libnghttp2-1.51.0 | hae82a92_0 549 KB conda-forge
libogg-1.3.4 | h27ca646_1 203 KB conda-forge
libopus-1.3.1 | h27ca646_1 247 KB conda-forge
libpng-1.6.39 | h76d750c_0 253 KB conda-forge
libpq-15.2 | h1a28acd_0 2.3 MB conda-forge
libprotobuf-3.21.12 | hb5ab8b9_0 1.7 MB conda-forge
libspatialite-5.0.1 | h14115fc_23 2.7 MB conda-forge
libtasn1-4.19.0 | h1a8c8d9_0 114 KB conda-forge
libtiff-4.5.0 | h5dffbdd_2 339 KB conda-forge
libvorbis-1.3.7 | h9f76cd9_0 249 KB conda-forge
libwebp-1.2.4 | h999c80f_1 76 KB conda-forge
libxslt-1.1.37 | h1bd8bc4_0 231 KB conda-forge
llvm-openmp-15.0.7 | h7cfbb63_0 257 KB conda-forge
lz4-c-1.9.4 | hb7217d7_0 138 KB conda-forge
markupsafe-2.1.2 | py311he2be06e_0 25 KB conda-forge
metis-5.1.0 | h9f76cd9_1006 4.1 MB conda-forge
mock-5.0.1 | pyhd8ed1ab_0 31 KB conda-forge
mpfr-4.1.0 | h6d7a090_1 379 KB conda-forge
mysql-common-8.0.31 | h518ea0a_0 1.9 MB conda-forge
mysql-libs-8.0.31 | hcb599eb_0 1.9 MB conda-forge
nitro-2.7.dev6 | hb7217d7_5 496 KB conda-forge
nspr-4.35 | hb7217d7_0 216 KB conda-forge
nss-3.88 | h789eff7_0 1.7 MB conda-forge
numpy-1.24.2 | py311h60f8152_0 6.4 MB conda-forge
openjpeg-2.5.0 | hbc2ba62_2 300 KB conda-forge
openssl-3.0.8 | h03a7124_0 2.0 MB conda-forge
packaging-23.0 | pyhd8ed1ab_0 40 KB conda-forge
pdal-2.5.1 | h0b95922_1 2.6 MB conda-forge
pip-23.0.1 | pyhd8ed1ab_0 1.3 MB conda-forge
plotly-5.13.0 | pyhd8ed1ab_0 4.2 MB conda-forge
poppler-23.01.0 | h9564b9f_0 1.4 MB conda-forge
poppler-data-0.4.12 | hd8ed1ab_0 2.2 MB conda-forge
postgresql-15.2 | h45c140d_0 4.0 MB conda-forge
proj-9.1.1 | h13f728c_2 2.4 MB conda-forge
psycopg2-2.9.3 | py311hcffe8fe_2 160 KB conda-forge
pygments-2.14.0 | pyhd8ed1ab_0 805 KB conda-forge
pyopenssl-23.0.0 | pyhd8ed1ab_0 124 KB conda-forge
pyproj-3.4.1 | py311hef8691e_1 417 KB conda-forge
pyqt-5.15.7 | py311h7203e35_3 3.7 MB conda-forge
pyqt5-sip-12.11.0 | py311ha397e9f_3 69 KB conda-forge
pyqtwebkit-5.15.9 | py311he2d8cc6_1 123 KB conda-forge
python-3.11.0 |h3ba56d0_1_cpython 13.8 MB conda-forge
python_abi-3.11 | 3_cp311 6 KB conda-forge
pytz-2022.7.1 | pyhd8ed1ab_0 182 KB conda-forge
pyyaml-6.0 | py311he2be06e_5 189 KB conda-forge
qca-2.3.5 | h70399c6_2 768 KB conda-forge
qgis-3.28.3 | py311h1f0c9b3_1 64.5 MB conda-forge
qjson-0.9.0 | hf490b44_1009 55 KB conda-forge
qscintilla2-2.13.4 | py311he2d8cc6_0 1.2 MB conda-forge
qt-main-5.15.8 | hfe8d25c_6 48.3 MB conda-forge
qtkeychain-0.13.2 | hf490b44_2 32 KB conda-forge
qtwebkit-5.212 | hbfb98c5_8 9.6 MB conda-forge
qwt-6.2.0 | hf490b44_5 3.4 MB conda-forge
requests-2.28.2 | pyhd8ed1ab_0 55 KB conda-forge
setuptools-67.3.2 | pyhd8ed1ab_0 565 KB conda-forge
sip-6.7.7 | py311ha397e9f_0 556 KB conda-forge
suitesparse-5.10.1 | h7cd81ec_1 2.0 MB conda-forge
tbb-2021.7.0 | hffc8910_1 116 KB conda-forge
tenacity-8.2.1 | pyhd8ed1ab_0 22 KB conda-forge
tiledb-2.13.2 | h9bd36d0_0 3.8 MB conda-forge
tzcode-2022g | h1a8c8d9_0 60 KB conda-forge
urllib3-1.26.14 | pyhd8ed1ab_0 110 KB conda-forge
zstd-1.5.2 | hf913c23_6 301 KB conda-forge
------------------------------------------------------------
Total: 264.1 MB
In rosetta2 environment we have: qgis3_283_ros
## Package Plan ##
environment location: /opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_ros
added / updated specs:
- qgis
The following packages will be downloaded:
package | build
---------------------------|-----------------
ceres-solver-2.1.0 | h636452b_1 1.3 MB conda-forge
cffi-1.15.1 | py311ha86e640_3 274 KB conda-forge
coverage-7.1.0 | py311h5547dcb_0 343 KB conda-forge
cryptography-39.0.1 | py311h61927ef_0 1.1 MB conda-forge
curl-7.88.0 | h6df9250_0 140 KB conda-forge
draco-1.5.6 | hb8565cd_0 754 KB conda-forge
exiv2-0.27.6 | h882e36a_1 951 KB conda-forge
fontconfig-2.14.2 | h5bb23bf_0 232 KB conda-forge
gdal-3.6.2 | py311h619941e_7 1.5 MB conda-forge
geotiff-1.7.1 | hd690177_6 113 KB conda-forge
gflags-2.2.2 | hb1e8313_1004 92 KB conda-forge
glog-0.6.0 | h8ac2a54_0 98 KB conda-forge
gmp-6.2.1 | h2e338ed_0 774 KB conda-forge
gst-plugins-base-1.22.0 | h37e1711_0 2.3 MB conda-forge
gstreamer-1.22.0 | h1d18e73_0 1.7 MB conda-forge
hdf5-1.12.2 |nompi_h48135f9_101 3.0 MB conda-forge
jpeg-9e | hb7f2c08_3 226 KB conda-forge
kealib-1.5.0 | h5c1f988_0 138 KB conda-forge
krb5-1.20.1 | h049b76e_0 1.1 MB conda-forge
laz-perf-3.3.0 | hb8565cd_0 100 KB conda-forge
lcms2-2.14 | h29502cd_1 221 KB conda-forge
libaec-1.0.6 | hf0c8a7f_1 29 KB conda-forge
libclang-13.0.1 |default_he082bbe_0 8.0 MB conda-forge
libcurl-7.88.0 | h6df9250_0 335 KB conda-forge
libdeflate-1.17 | hac1461d_0 66 KB conda-forge
libgdal-3.6.2 | hc39f1fd_7 8.3 MB conda-forge
libgfortran-5.0.0 |11_3_0_h97931a8_27 143 KB conda-forge
libgfortran5-11.3.0 | h082f757_27 1.4 MB conda-forge
libllvm13-13.0.1 | h64f94b2_2 25.3 MB conda-forge
libnetcdf-4.9.1 |nompi_h5456b97_100 686 KB conda-forge
libnghttp2-1.51.0 | he2ab024_0 594 KB conda-forge
libpq-15.2 | h3640bf0_0 2.2 MB conda-forge
libprotobuf-3.21.12 | hbc0c0cd_0 1.8 MB conda-forge
libspatialite-5.0.1 | hd6e941a_23 2.9 MB conda-forge
libssh2-1.10.0 | h47af595_3 222 KB conda-forge
libtiff-4.5.0 | hee9004a_2 383 KB conda-forge
libwebp-1.2.4 | h70a068d_1 76 KB conda-forge
libzip-1.9.2 | h6db710c_1 117 KB conda-forge
llvm-openmp-15.0.7 | h61d9ccf_0 287 KB conda-forge
lz4-c-1.9.4 | hf0c8a7f_0 153 KB conda-forge
markupsafe-2.1.2 | py311h5547dcb_0 24 KB conda-forge
metis-5.1.0 | h2e338ed_1006 4.1 MB conda-forge
mpfr-4.1.0 | h0f52abe_1 400 KB conda-forge
mysql-common-8.0.31 | hc4b2c72_0 1.9 MB conda-forge
mysql-libs-8.0.31 | h8658499_0 1.9 MB conda-forge
nitro-2.7.dev6 | hf0c8a7f_5 528 KB conda-forge
nss-3.88 | h78b00b3_0 1.8 MB conda-forge
numpy-1.24.2 | py311ha9d2c9f_0 7.2 MB conda-forge
openjpeg-2.5.0 | h13ac156_2 322 KB conda-forge
pdal-2.5.1 | he374a05_1 3.0 MB conda-forge
poppler-23.01.0 | h6e9091c_0 1.5 MB conda-forge
postgresql-15.2 | hbea33b9_0 4.3 MB conda-forge
proj-9.1.1 | hf909084_2 2.5 MB conda-forge
psycopg2-2.9.3 | py311h557c174_2 159 KB conda-forge
pyproj-3.4.1 | py311hdc3c720_1 419 KB conda-forge
pyqt-5.15.7 | py311h8771221_3 3.9 MB conda-forge
pyqt5-sip-12.11.0 | py311h78fa98d_3 73 KB conda-forge
pyqtwebkit-5.15.9 | py311heb9b8d8_1 122 KB conda-forge
python_abi-3.11 | 3_cp311 6 KB conda-forge
qca-2.3.5 | h0943339_2 791 KB conda-forge
qgis-3.28.3 | py311h8deab50_1 68.0 MB conda-forge
qjson-0.9.0 | h86624fb_1009 58 KB conda-forge
qscintilla2-2.13.4 | py311h6f08df8_0 1.2 MB conda-forge
qt-main-5.15.8 | h1d3b3f8_6 43.3 MB conda-forge
qtkeychain-0.13.2 | hdb26607_2 32 KB conda-forge
qtwebkit-5.212 | h11e631a_8 11.2 MB conda-forge
qwt-6.2.0 | h86624fb_5 3.4 MB conda-forge
sip-6.7.7 | py311h814d153_0 559 KB conda-forge
suitesparse-5.10.1 | h7aff33d_1 2.5 MB conda-forge
tbb-2021.7.0 | hb8565cd_1 152 KB conda-forge
tiledb-2.13.2 | h8b9cbf0_0 4.4 MB conda-forge
zstd-1.5.2 | hbc0c0cd_6 399 KB conda-forge
------------------------------------------------------------
Total: 239.5 MB
I don't know enough of Mac system, but if you use an environment with roseta, then it is not using arm architecture. Right?
Apart from that error, have you noticed anything that does not work when running QGIS on arm?
Apart from that error, have you noticed anything that does not work when running QGIS on arm?
The qgis3_283_env environment created is arm, while the one named qgis3_283_ros is in rosetta. I have exposed both configurations.
Apart from that error, have you noticed anything that does not work when running QGIS on arm?
I am testing it, for now I had to remove some non-compatible plugins.
If possible, report which plugins and the errors here, so we can track down what can be the problem (s).
Thanks!
It seems the issue is taking place during python startup here: https://github.com/qgis/QGIS/blob/1a0936b6fcc1bba776dd1dc69f5e2cd9312f9e22/src/python/qgspythonutilsimpl.cpp#L228 Don't understand why though. I thought it was to do with osx ventura's security settings that require you to grant full disk access to applications, but according to @ivn951 the issue does not show up under rosetta.
I want to create a new clean environment and reinstall everything. I will update you.
I created a new environment and reinstalled QGIS 3.283. The error is reported again.
An error occurred during execution of following code: faulthandler.enable(file=fault_handler_file)
Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 1] Operation not permitted
Python version: 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:29:41) [Clang 14.0.6 ]
QGIS version: 3.28.3-Firenze 'Firenze', exported
Python path: ['/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python/plugins', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python/plugins', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/share/qgis/python', '/Users/ivano', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python311.zip', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11/lib-dynload', '/opt/homebrew/Caskroom/miniforge/base/envs/qgis3_283_env/lib/python3.11/site-packages']
If you have any suggestions I will proceed with testing.
I confirm that in Rosetta environment, no error.
I confirm that in Rosetta environment, no error.
Interesting - thanks for running the tests. Is this something we need to report upstream?
Interesting - thanks for running the tests. Is this something we need to report upstream?
I doubt it, since it works in Rosetta. I would look at other gui applications installed through conda to see if they had to make any adjustments for arm. This error does not show up if you launch the QGIS binary inside the conda environment folder directly from the finder, for instance. But you get other issues since the conda env was not activated.
What I don't understand is that with Rosetta 2 the permissions required to access or write to the file specified as fault_handler_file are overridden or bypassed? Which in the ARM architecture is not possible?
Interesting - thanks for running the tests. Is this something we need to report upstream?
@gillins Maybe we should report this upstream. In the terminal the error (operation not permitted) occurs during faulthandler.enable(file=fault_handler_file)
, but the File object is "". There is an issue here with qgspythonutilsimpl.cpp, (https://github.com/qgis/QGIS/blob/ec43447292044d953a7854b0d40bdde446b1d449/src/python/qgspythonutilsimpl.cpp#L227). The default for faulthandler.enable
is file=sys.stderr
. I still don't understand why it would work in Rosetta.......
Btw. Faulthandler is enabled if you open up the python console after qgis starts.
But there is a check for !faultHandlerLogPath.isEmpty()
above....
This is taking place on a ubuntu docker image running on the m1 too apparently. See: https://github.com/camptocamp/docker-qgis-server/issues/590
This seems a different error from above?
Would be good to let the qgis
maintainers know about what we are seeing, but without access to Apple Silicon I'm not sure what else we can do.
@gillins My laptop is Apple Silicon. Is there anything you'd like me check out?
Thanks @joaoponceleao. Would be good to print the values of faultHandlerLogPath
and see what is going on that might be different from x86....
Sorry @gillins. I'm afraid that might be beyond my abilities. I'm used to debugging qgis plugins in the terminal, but not qgis itself (and would rather not have to build it from source).
On a, possibly related note(?), python uses an env variable for faulthandler (PYTHONFAULTHANDLER). Starting conda's arm qgis with that env set to anything, will cause a fatal error:
Fatal Python error: _PyFaulthandler_Init: failed to enable faulthandler Python runtime state: core initialized PermissionError: [Errno 1] Operation not permitted
Doing the same with the x86 oficial release (launching it from terminal) causes no errors.
I'm afraid I know very little about OSX so I guess we are stuck for now. Can you find anything about this behaviour changing in recent OSX versions?
Next step would be to try running this in the qgis python console:
import faulthandler
_log = open('/some/path/which/is/definitely/writable.txt', 'wt')
faulthandler.enable(file=_log)
And see if the permission exception is raised. Also testing this in a standalone (non qgis) python session.
That will determine if the fault lies with qgis or conda/upstream python.
Thanks @nyalldawson No exceptions raised, and the log file is created. Tested on the python console of the official qgis binary, of conda qgis, and on the python of conda qgis env (these were installed with mamba if that makes any difference). What I haven't figured out is what log file, if any, Qgis is trying to create upon startup (the terminal does reference quite a few 'Warning: Broken filename passed to function' msgs just before the PermissionError shows up though).
Yes. It would be nice to know the exact folder it's trying to write. For some reason it works fine on mac normal builds. But not on arm. Maybe we could use a normal build to force an error and generate the report to understand where it should be by default?
Don't the nightly builds log more to the terminal? We could always add a nightly to conda whenever there is an issue.
We could create a branch with the debugging option enabled, even for the stable version. But we should check with the conda forge community if that is ok. Alternatively, we can build it locally in a testing machine enabling the debugging.
I will try the latter as soon as possible in a borrowed machine
This is how the log file name is generated:
QStandardPaths.standardLocations( QStandardPaths.TempLocation )[0] + "/qgis-python-crash-info-" + str( QCoreApplication.applicationPid() )
What's that return in the qgis python console?
But we should check with the conda forge community if that is ok.
Publishing debug packages, in a similar fashion we do dev packages, from a branch and publishing in a "qgis_debug" is OK. We never formalized that but it would be something similar to the cfep-05 instructions.
I have installed qgis 3.30 with with python 3.11 using a brand new mamba-forge installation on a Mac arm64. I was not able to reproduce the error.
Running the code suggested by @nyalldawson I got no errors either.
QStandardPaths.standardLocations( QStandardPaths.TempLocation )[0] + "/qgis-python-crash-info-" + str( QCoreApplication.applicationPid() )
@nyalldawson the return for QStandardPaths.standardLocations( QStandardPaths.TempLocation )[0] + "/qgis-python-crash-info-" + str( QCoreApplication.applicationPid() )
is '/private/var/folders/vc/y37_q_3159j58xbbds0pm8440000gn/T/qgis-python-crash-info-27652'
File exists, folder is writable. Official QGIS binary chooses the same folder to write to.
@joaoponceleao shouldn't make a difference, but what installer did you use? conda? Mamba? What version?
@SrNetoChan I was curious to find out if something was wrong with my conda, so I did a new installation. Issue persists with a fresh install.
Mambaforge installed through homebrew. Environments are on a custom location $HOME/.conda-envs
, instead of /opt/homebrew/Caskroom/mambaforge
. Mamba info gives:
Mamba 1.4.1
Conda 23.1.0
Python 3.10.10.final.0
Mamba qgis environment gives: QGIS 3.30.3 py311hecefc68_1 Python 3.11.4 h47c9636_0_cpython All packages from conda-forge
@SrNetoChan you've seen this error with an older version of QGIS on OSX arm64 right?
@gillins yes I did. So I am now wondering what changed in my installation. I will try miniconda instead of mamba-forge and I will try older versions of qgis.
My mamba-forge installation was not from homebrew, but using the follwing command:
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh
@SrNetoChan that type of installation shouldn’t make a difference, but perhaps there is something going on in my zshrc. I’ll try with a minimal profile.
@SrNetoChan that type of installation shouldn’t make a difference, but perhaps there is something going on in my zshrc. I’ll try with a minimal profile. @joaoponceleao indeed, but since we can't find a solid replication, I am trying to find what could be different.
Please noticed that an recent contact of my from twitter also reported this error, and I not sure he has any very customized terminal.
@SrNetoChan Yes, I do not have a custom terminal in fact you can consider my install on clean MacBook Air m1 as until now I only used it to consume/stream videos mainly
This looks similar: https://github.com/qgis/QGIS/issues/52987 report says "this does only happens ~ half of the time when starting QGIS" which may imply some some sort of race condition?
I get the error on startup...
Some debugged via QGIS python console:
>>> print (qgis.utils.__qgis_fault_handler_file)
<_io.TextIOWrapper name='/private/var/folders/kv/sb*TRIM*gn/T/qgis-python-crash-info-48809' mode='wt' encoding='utf-8'>
>>> import faulthandler
>>> faulthandler.is_enabled()
True
Patch to remove the ?faulty? faulthandler
https://github.com/DingoBits/qgis-arm64-apple/blob/main/patches/qgis_disable_py_faulthandler.patch
That seems to simply remove the functionality. No? I wouldn't use it.
@SrNetoChan That repo does not use conda. It updates the homebrew build of the official binaries to arm64. If he did this, it would imply that it's not a conda issue but one of the dependencies no?
Solution to issue cannot be found in the documentation.
Issue
Hi,
The latest qgis for mac arm gives a faulthandler error on startup:
Haven't tested to see how it affects QGIS.
Related ( I can split this into a separate issue): I also noticed some errors due to missing python modules which usually come included with QGIS due to a number of plugins requiring them: matplotlib, pandas, scipy. Which brings me to the following error messages in the qgis log on startup:
I imagine this is due to a plugin trying to install scipy. QGIS allows plugins to install modules when they're missing. Naturally, we can install ourselves in the conda env, but something should be done about the above errors: I don't see why a plugin would use the system pip to install rather than QGIS's own pip (in this case the conda env).
Finally, getting the following errors, presumably due to current settings from the official package. Would be nice to fix those without having to change the QGIS preferences that are used by the official packages too.
Installed packages
Environment info