Bug report #20047

SQL queries on virtual layers frequently crashes QGIS

Added by matthieu carlini almost 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.2.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:27869

Description

SQL requests on virtual layers frequently crashes Dbmanager. It's seems the 2.18 vesion was more stable and produces warnings when the syntax was false.

bug trace :
h2. User Feedback

Report Details

Crash ID: 97c4a26ce5944b183c4a407fda1d371d18d64510

Stack Trace

QBasicMutex::unlockInternal :
QgsTask::processSubTasksForTermination :
QgsTask::cancel :
PyInit__core :
PyCFunction_FastCallDict :
PyObject_GenericGetAttr :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallFunctionObjArgs :
PyObject_Call :
PyInit_sip :
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::shrink_to_fit :
PyInit__core :
QgsTask::subTaskStatusChanged :
QMetaCallEvent::placeMetaCall :
QObject::event :
PyInit__core :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.1-Bonn
QGIS code revision: 1edf372fb8
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601


Related issues

Duplicates QGIS Application - Bug report #20029: SQL query including "row_number" on a virtual layer crash... Closed 2018-10-05

History

#1 Updated by Alessandro Pasotti almost 2 years ago

  • Subject changed from dbmanager to SQL queries on virtual layers frequently crashes QGIS

#2 Updated by Alessandro Pasotti almost 2 years ago

  • Duplicates Bug report #20029: SQL query including "row_number" on a virtual layer crashes QGIS added

#3 Updated by Nyall Dawson almost 2 years ago

If anyone's looking into this, here's my findings:
- it's windows only
- the exception thrown in sqlite when the expression is invalid is not caught, despite there being code in place to catch this. I've seen this before with msvc builds - it just decides not to catch for some reason.

No idea on how to fix this though!

#4 Updated by Giovanni Manghi almost 2 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

see also #20029 (edited)

#5 Updated by Hugo Mercier over 1 year ago

Nyall Dawson wrote:

- the exception thrown in sqlite when the expression is invalid is not caught, despite there being code in place to catch this. I've seen this before with msvc builds - it just decides not to catch for some reason.

It reminds me of C++ exceptions that are not caught when crossing DLL boundaries and when .exe/.dll are compiled against different versions of the runtime ... don't know if this is related.

I'll try to find details about the exact exception that is not caught

Also available in: Atom PDF