[QGIS-Developer] Drag and drop to PostGIS crash

Sandro Santilli strk at kbt.io
Tue May 30 00:40:32 PDT 2017


On Tue, May 30, 2017 at 04:39:01PM +1000, Nyall Dawson wrote:
> On 30 May 2017 at 16:30, Radim Blazek <radim.blazek at gmail.com> wrote:
> > Hi,
> >
> > QGIS3 crashes when a vector is dragged and drop to PostGIS in browser
> > in qgspostgresconn.cpp on
> >
> >     // sharing connection between threads is not safe
> >     // See https://issues.qgis.org/issues/13141
> >     Q_ASSERT( QApplication::instance()->thread() == QThread::currentThread() );
> >
> > the issue mentioned above is about something different (loading items
> > in thread) and it is marked as resolved.
> 
> Works OK here if I remove that assert... can you test and confirm that
> it's safe to remove? I don't know the history here...

IIRC that comment was mine, and was there because the PostgreSQL
connection pooler was not thread safe so using it from different
thread might cause hard-to-debug issues. If this is confirmed then
the fact you see things working OK is not really reassuring.

For some reason I think https://github.com/qgis/QGIS/pull/2690 was
also meant to improve that weird shared connection handling by
deprecating some methods.

--strk;


More information about the QGIS-Developer mailing list