-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
initGUI() results in Segmentation fault on macOS in standalone PyQgis #40378
Comments
Have you raised your issue also on the developers mailing list? |
Output from lldb:
# test_qgis.py
import qgis.testing import start_app
start_app() |
No I did not. Should I do so and if yes where? |
@tillhainbach you'll reach a much wider audience that can tell you if there is anything wrong in your code
https://qgis.org/en/site/forusers/support.html#mailing-lists |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
the system sqlite is picked, but it is not compatible with the sqlite bundled with QGIS. The modified script should work
|
Nice! Thank you! Should this be added to the documentation for future reference? I'll can open a PR if someone points me to the correct project-repo. |
no sure if required for docs, maybe @DelazJ can shed a light? |
I'm not sure if it has to be documented but when it comes to python, better ask @elpaso eg. |
Based on Peter's answer in qgis/QGIS#40378
I stumbled upon this exact issue and the workaround to use |
they have different version, they have different exported symbols and also differently mangled. We cannot use macOS native sqlite3 since they do not ship headers. |
Thank you for providing that information. Is this situation specific to MacOS or linux also has similar problems with |
linux is fine |
Describe the bug
When trying to use PyQgis for standalone python-qgis scripts or trying to run Unittest using qgis.testing, python/pyqgis crashes with segmentation fault: 11.
Also reported here:
https://stackoverflow.com/questions/64678135/segmentation-fault-11-when-using-initqgis-macos
Reproduced the error with QGIS for macOS 3.16.1 and nightly build.
How to Reproduce
in
qgis_test_script.sh
failing example:
this should work:
QGIS and OS versions
macOS 10.15.7
QGIS: 3.16.1 and 3.17-master (nightly build)
The text was updated successfully, but these errors were encountered: