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 crashes on MacOS 13.0 when using fix geometries #50888

Closed
1 of 2 tasks
Vishu26 opened this issue Nov 14, 2022 · 19 comments · Fixed by #52360
Closed
1 of 2 tasks

QGIS crashes on MacOS 13.0 when using fix geometries #50888

Vishu26 opened this issue Nov 14, 2022 · 19 comments · Fixed by #52360
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Linux macOS Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore

Comments

@Vishu26
Copy link

Vishu26 commented Nov 14, 2022

What is the bug or the crash?

QGIS crashes the moment I use fix geometries on a set of polygons. To be specific, the vector data format that I am using is .geojson and .shp. I also tried to use fix geometries on a single polygon, but that also crashes. Currently I am using QGIS 3.28 on MacOS 13.0.

Steps to reproduce the issue

The only step I followed is to load the .geojson or .shp file and use fix geometries in the processing toolbox.

Versions

QGIS version 3.28.0-Firenze QGIS code revision ed3ad04
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 13.0
       
Active Python plugins
quick_map_services 0.19.32
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.6

QGIS version
3.28.0-Firenze
QGIS code revision
ed3ad0430f
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.3.2
PROJ version
8.1.1
EPSG Registry database version
v10.028 (2021-07-07)
GEOS version
3.9.1-CAPI-1.14.2
SQLite version
3.35.2
PDAL version
2.3.0
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.11.5
OS version
macOS 13.0

Active Python plugins
quick_map_services
0.19.32
processing
2.12.99
sagaprovider
2.12.99
grassprovider
2.12.99
db_manager
0.1.20
MetaSearch
0.3.6

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

@Vishu26 Vishu26 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 14, 2022
@nicogodet
Copy link
Member

You didn’t check « I tried with a new profile ». Did you try ?

Do you have a stack trace ?

Does it happen with every dataset or just two mentioned ?
Share both layers of you can.

@nicogodet nicogodet added the Feedback Waiting on the submitter for answers label Nov 14, 2022
@Vishu26
Copy link
Author

Vishu26 commented Nov 16, 2022

I tried with different datasets and a new profile. But nothing solves the problem.

@nicogodet
Copy link
Member

Could you share one of the dataset that fails ?

@Vishu26
Copy link
Author

Vishu26 commented Nov 17, 2022

You can take any dataset for inspection. All of them cause a crash. For example let's take a shape file from - https://www.diva-gis.org/gdata

@Vishu26
Copy link
Author

Vishu26 commented Nov 17, 2022

I am attaching a video of the crash.

qgis_bug.mov

@nicogodet
Copy link
Member

I just tried with https://biogeo.ucdavis.edu/data/diva/adm/AFG_adm.zip
No crash on Windows with 3.28.0

It could be a MacOS specific issue but I can't confirm as I don't have a Mac...

@nicogodet nicogodet added Processing Relating to QGIS Processing framework or individual Processing algorithms Crash/Data Corruption macOS and removed Feedback Waiting on the submitter for answers labels Nov 17, 2022
@resistor4u
Copy link

problem is present on three separate macs (each running 10.15.7 with QGIS 3.28.0 from standard installation). attaching here a crash log generated by one of the macs.

QGIS_2022-12-08-105033.txt

@resistor4u
Copy link

this may also be helpful: I tried running the same workflow from my bash terminal using QGIS internal tools. I ran,

qgis_process run native:fixgeometries --distance_units=feet --area_units=ac --ellipsoid=EPSG:7019 --INPUT=./shapefiles/510104_20211027/S_FLD_HAZ_AR.shp --METHOD=1 --OUTPUT=./shapefiles/510104_20211027/test.shp

Here's the traceback:

Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/bin/../../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/user/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/densityanalysis/__init__.py", line 3, in classFactory
    return DensityAnalysis(iface)
  File "/Users/user/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/densityanalysis/densityanalysis.py", line 21, in __init__
    self.canvas = iface.mapCanvas()
AttributeError: 'NoneType' object has no attribute 'mapCanvas'

error starting plugin: densityanalysis


----------------
Inputs
----------------

INPUT:	/Users/user/shapefiles/invalid_geometries.shp
METHOD:	1
OUTPUT:	/Users/user/shapefiles/valid_geometries_test.shp

Using ellipsoid:	EPSG:7019
Using distance unit:	feet
Using area unit:	acres

Caught unhandled QgsException:  "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later"

@nicogodet
Copy link
Member

Could have been introduced by #50070

@justinbb
Copy link
Contributor

justinbb commented Jan 2, 2023

The crash log indicates that the crash is due to an unhandled exception.
The exception message in the traceback provided by @resistor4u indicates "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later".
The current Mac builds use GEOS 3.9.1.
There is likely no good reason for this, i.e. just a matter of coordination between the different left hands and right hands of the project to make sure that the robot that produces the Mac version has access to up-to-date packages.
But isn't there an automatic process somewhere to make sure that dependencies are validated without fallible human interaction? Isn't there a build master (human or robot) to pass messages between the right hands and the left hands?

@gioman gioman added the Regression Something which used to work, but doesn't anymore label Jan 9, 2023
@jctull
Copy link

jctull commented Jan 26, 2023

This issue occurs using 3.28.2 on MacOS 12.6.2. This is another example of the lagging Mac package making QGIS unusable on MacOS systems. Unfortunately, it is not clear if there is a maintainer on the qgis-mac-packager at this time.

@justinbb
Copy link
Contributor

After investigation, the QGIS-Mac-Packager project is essentially abandoned, and this issue with an old GEOS is only one problem among very many. Even bigger issues are that the Mac has moved on to a new architecture (Apple Silicon / ARM), and that Qt 5 is on its way out and QGIS itself is on the verge of moving to Qt 6.
The future of Mac QGIS is being actively discussed here: #46299 and it is very promising. Working, up-to-date QGIS can be obtained using either MacPorts or Homebrew. The challenge still to be resolved is getting one of these efforts into signed, notarized binaries for easy distribution. Please, QGIS leadership, talk with people on that ticket, they're a good way along toward keeping this software viable on Mac.

@agiudiceandrea
Copy link
Contributor

@justinbb maybe it would be more effective to share the discussion on this topic with the developers by sending a message to the qgis-developer mailing list.

@zackarno
Copy link

zackarno commented Feb 9, 2023

same issue on MacOS 13.2 (Q 3.28.2).

@oeon
Copy link

oeon commented Mar 9, 2023

Got this on:
Version 3.30.0 RC
Version 3.28.4 LTR

Looks like I'll keep 3.22.16-Białowieża around as my LTR, as it's the last working version this tool's working with.

@oskarlin
Copy link

I have the exact problem. Running MacOS 12.6.2. It works with QGIS 3.26.3 but no later versions.

@tudorbarascu
Copy link
Member

It's reproducible on Debian Bullseye also

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Mar 22, 2023

It's reproducible on Debian Bullseye also

@tudorbarascu, could you please provide any stacktrace or error message?

@tudorbarascu
Copy link
Member

tudorbarascu commented Mar 23, 2023

@agiudiceandrea
It crashes completely so I cannot get the stacktrace (I get this in terminal if I run QGIS from there).

Warning: Qt Concurrent has caught an exception thrown from a worker thread.
This is not supported, exceptions thrown in worker threads must be
caught before control returns to Qt Concurrent.
terminate called after throwing an instance of 'QgsNotSupportedException'
Aborted

My debug environment for 3.22 has libgeos 3.10 and does not crash - I'll rebuild and get back.

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 Linux macOS Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.