Re: [QGIS-Developer] QgsO2 (OAuth2 ) crash in exitQgis() on uWSGI

2021-04-28 Thread Radim Blazek
Promemoria, it is crashing whenever Q_GLOBAL_STATIC variable is accessed because uwsgi is calling C/C++ libs atexit before python atexit. https://github.com/unbit/uwsgi/issues/859 https://github.com/unbit/uwsgi/pull/1879 This workaround can clear project aux storage tmp file

Re: [QGIS-Developer] QgsO2 (OAuth2 ) crash in exitQgis() on uWSGI

2021-04-26 Thread Radim Blazek
I forgot to say that QgsApplication.exitQgis() / QgsProject.clear() is invoked by python atexit.register. If it is called before atexit, it works. exitQgis() in atexit is used in TestCase, it should work? Radim On Mon, Apr 26, 2021 at 1:40 PM Radim Blazek wrote: > > On Mon, Apr 26, 2021 at

Re: [QGIS-Developer] QgsO2 (OAuth2 ) crash in exitQgis() on uWSGI

2021-04-26 Thread Radim Blazek
On Mon, Apr 26, 2021 at 1:25 PM Alessandro Pasotti wrote: > no clues sorry, but if you don't need the oauth2 plugin you can just rm/mv > the liboauth2authmethod.so and you should be fine. Hi, thanks, I found QGIS_AUTHMETHOD_FILE envar which also does the job. Now it crashes in

Re: [QGIS-Developer] QgsO2 (OAuth2 ) crash in exitQgis() on uWSGI

2021-04-26 Thread Alessandro Pasotti
On Mon, Apr 26, 2021 at 1:19 PM Radim Blazek wrote: > Hi, > we are getting crash in OAuth2 plugin when QgsApplication.exitQgis() > is called from Django application running on uWSGI/nginx. We need to > call exitQgis() to cleanup temporary files. It works OK if it is run > as Django script from

[QGIS-Developer] QgsO2 (OAuth2 ) crash in exitQgis() on uWSGI

2021-04-26 Thread Radim Blazek
Hi, we are getting crash in OAuth2 plugin when QgsApplication.exitQgis() is called from Django application running on uWSGI/nginx. We need to call exitQgis() to cleanup temporary files. It works OK if it is run as Django script from command line. Unfortunately it does not print full backtrace