Bug report #19716

DB Manager Virtual Layers Always Crashes on query error

Added by Hadrien Bois about 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.2 Regression?:No
Operating System:win10x64 Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:Yes Copied to github as #:27541

Description

DB Manager Virtual Layers Always Crashes on query error. If there are no errors in the sql query it works fine, but if I make a sql mistake in the code, it always crashes. Did not crash in 3.0.

Pasted from error message:

User Feedback

Report Details

Crash ID: 64cec76a14e602614eb14097e30f819dcafc6082

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 :
std::_String_alloc<std::_String_base_types<char,std::allocator<char> > >::_Getal :
QgsTask::subTaskStatusChanged :
QMetaCallEvent::placeMetaCall :
QObject::event :
std::_String_alloc<std::_String_base_types<char,std::allocator<char> > >::_Getal :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.2-Bonn
QGIS code revision: 26842169e9
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: 10.0.17134

points.gpkg (116 KB) Hadrien Bois, 2018-08-28 02:42 PM

DBManager_before_crash.jpg (155 KB) Hadrien Bois, 2018-08-28 02:49 PM

History

#1 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Feedback

I can't reproduce. Can you share some data and an example of a query which crashes?

#2 Updated by Hadrien Bois about 6 years ago

Nyall Dawson wrote:

I can't reproduce. Can you share some data and an example of a query which crashes?

Just now, I created a new layer on a new project, with 2 fields and 4 points I placed. In DB Manager, virtual layers, tried

select * from 'points noname'

and got a list of the 4 points. I tried the same query two more time using selekt and selectt instead of select, got an error and qgis crashed both times. It pops up a small windows called Dtabase Error, with the text: An error occured and a blank field

This also happened in qgis 3.2.1 Also, I would use qgis 3.0 to get around these crashes, but recently qgis 3.0 has started giving me this python error on load (with a blank python path). I uninstalled and reinstalled qgis 3.0 but it doesn't change. This makes me lose the DB Manager and all vector functions:

--------------------------------------
Couldn't load qgis.user.
Python support will be disabled.

traceback.print_exception() failed

Python version:

QGIS version:
3.0.3-Girona 'Girona', 8a899c8758

Python path:

----------------------------------------------------------------
Here is the copied crash report from my sql test with an error in the query on qgis 3.2:

User Feedback

Report Details

Crash ID: 64cec76a14e602614eb14097e30f819dcafc6082

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 :
std::_String_alloc<std::_String_base_types<char,std::allocator<char> > >::_Getal :
QgsTask::subTaskStatusChanged :
QMetaCallEvent::placeMetaCall :
QObject::event :
std::_String_alloc<std::_String_base_types<char,std::allocator<char> > >::_Getal :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.2.2-Bonn
QGIS code revision: 26842169e9
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: 10.0.17134

#3 Updated by Giovanni Manghi about 6 years ago

Hadrien Bois wrote:

Nyall Dawson wrote:

I can't reproduce. Can you share some data and an example of a query which crashes?

Just now, I created a new layer on a new project, with 2 fields and 4 points I placed. In DB Manager, virtual layers, tried

select * from 'points noname'

I cannot confirm the crash, on master/linux.
Anyway when running a wrong query the error dialog here shows completely empty, which is a bug/regression of its own.

#4 Updated by Jürgen Fischer over 5 years ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.

Also available in: Atom PDF