tora-tool / tora

TOra is an open source SQL IDE for Oracle, MySQL and PostgreSQL dbs
http://torasql.com/
GNU General Public License v2.0
290 stars 58 forks source link

Crash during sql query typing #122

Closed mkyral closed 5 years ago

mkyral commented 5 years ago

Hi, I've moved to new laptop and Tora is randomly crashing there during commands typing in SQL editor.

System: Gentoo Qt libs: 5.11.1 Tora from git:

Git version v3.2-175-g763ab3bc-dirty
Git version major 3
Git version minor 2
Git version count 175
Git version sha1  g763ab3bc
Git version short 3.2
Git version dirty Yes
Git branch HEAD
Build tag v3.2-175-Release-g763ab3bc-dirty
Build date 2018-12-03

Backtrace

Application: tora (tora), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5d5046b780 (LWP 16482))]

Thread 8 (Thread 0x7f5d0b7fe700 (LWP 16506)):
[KCrash Handler]
#6  antlr3::BitsetList<antlr3::TraitsBase<Antlr3BackendImpl::UserTraits> >::bitsetLoad (this=0x0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3bitset.inl:59
#7  0x0000556c7e9e3f6a in antlr3::ANTLR_Exception<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, (antlr3::ExceptionType)3, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::displayRecognitionError (this=0x7f5cfc015130, tokenNames=0x556c7fbb4c00 <Antlr3BackendImpl::OracleDMLTokenNames>, str_stream=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3exception.inl:317
#8  0x0000556c7e9e4802 in antlr3::Parser<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::displayRecognitionError (this=this@entry=0x7f5cfc013ad0, tokenNames=0x556c7fbb4c00 <Antlr3BackendImpl::OracleDMLTokenNames>, ex=0x7f5cfc015130) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3parser.inl:121
#9  0x0000556c7e8dc2f0 in antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::displayRecognitionError (tokenNames=<optimized out>, this=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:263
#10 antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError<Antlr3BackendImpl::OracleDML> (this=this@entry=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:249
#11 0x0000556c7e9ae89b in antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError (this=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:208
#12 Antlr3BackendImpl::UserTraits<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::RecognizerType<antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError (this=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/OracleDMLTraits.hpp:48
#13 antlr3::Parser<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::preporterror (this=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3parser.inl:359
#14 Antlr3BackendImpl::OracleDML::seq_of_statements (this=this@entry=0x7f5cfc013ad0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/OracleDML.cc:12690
#15 0x0000556c7ebc3897 in SQLParser::OracleDMLStatement::parse (this=this@entry=0x7f5cfc00ea00) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/tsqlparseoracle2.cc:388
#16 0x0000556c7ebc4726 in SQLParser::OracleDMLStatement::OracleDMLStatement (this=0x7f5cfc00ea00, statement=..., name=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/tsqlparseoracle2.cc:340
#17 0x0000556c7ebca9be in Util::GenericFactoryImpl<SQLParser::Statement, Loki::Typelist<QString const&, Loki::Typelist<QString const&, Loki::NullType> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::createInstance<SQLParser::OracleDMLStatement> (parm1=..., parm2=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/loki-extra/include/loki/Factory_alt.h:413
#18 0x0000556c7e87362b in Util::GenericFactoryImpl<SQLParser::Statement, Loki::Typelist<QString const&, Loki::Typelist<QString const&, Loki::NullType> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::create (parm2=..., parm1=..., className=..., this=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/loki-extra/include/loki/Factory_alt.h:419
#19 toWorksheetTextWorker::process (this=this@entry=0x556c824d7fa0, text=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/editor/toworksheettext.cpp:810
#20 0x0000556c7e742320 in toWorksheetTextWorker::qt_static_metacall (_o=0x556c824d7fa0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999_build/src/editor/moc_toworksheettext.cpp:326
#21 0x00007f5d4dc7f4aa in QObject::event (this=0x556c824d7fa0, e=<optimized out>) at kernel/qobject.cpp:1251
#22 0x00007f5d4f5552bc in QApplicationPrivate::notify_helper (this=this@entry=0x556c81b81b40, receiver=receiver@entry=0x556c824d7fa0, e=e@entry=0x7f5d38008180) at kernel/qapplication.cpp:3727
#23 0x00007f5d4f55c89f in QApplication::notify (this=0x7ffd04f8d9e0, receiver=0x556c824d7fa0, e=0x7f5d38008180) at kernel/qapplication.cpp:3486
#24 0x00007f5d4dc4fc27 in QCoreApplication::notifyInternal2 (receiver=0x556c824d7fa0, event=event@entry=0x7f5d38008180) at kernel/qcoreapplication.cpp:1048
#25 0x00007f5d4dc5367a in QCoreApplication::sendEvent (event=0x7f5d38008180, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x556c824d7ed0) at kernel/qcoreapplication.cpp:1745
#27 0x00007f5d4dc53c48 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1599
#28 0x00007f5d4dcac243 in postEventSourceDispatch (s=0x7f5cfc004fd0) at kernel/qeventdispatcher_glib.cpp:276
#29 0x00007f5d4a39fed7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f5d4a3a0110 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f5d4dcababf in QEventDispatcherGlib::processEvents (this=0x7f5cfc000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7f5d0b7fde20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#34 0x00007f5d4da92f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#35 0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x556c824d7e00) at thread/qthread_unix.cpp:367
#36 0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#37 0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f5d0bfff700 (LWP 16505)):
#0  0x00007f5d4a3e59d9 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f5d4a39ff90 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f5d4dcabadb in QEventDispatcherGlib::processEvents (this=0x7f5d04000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7f5d0bffee20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007f5d4da92f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x556c824bf6b0) at thread/qthread_unix.cpp:367
#7  0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#8  0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f5d1941c700 (LWP 16503)):
#0  0x00007f5d4dcaa31a in QTimerInfoList::timerWait (this=0x7f5d0c004cf0, tm=...) at kernel/qtimerinfo_unix.cpp:413
#1  0x00007f5d4dcab89c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f5d1941bc54) at kernel/qeventdispatcher_glib.cpp:132
#2  0x00007f5d4dcab93e in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:165
#3  0x00007f5d4a39f5e8 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f5d4a39ffbb in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#6  0x00007f5d4dcabadb in QEventDispatcherGlib::processEvents (this=0x7f5d0c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7f5d1941be20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#8  0x00007f5d4da92f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#9  0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x556c81d75960) at thread/qthread_unix.cpp:367
#10 0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#11 0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f5d1a455700 (LWP 16486)):
#0  0x00007f5d4a39faea in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f5d4a3a0030 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f5d4dcabadb in QEventDispatcherGlib::processEvents (this=0x7f5d14000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7f5d1a454e20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007f5d4da92f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x556c81f688c0) at thread/qthread_unix.cpp:367
#7  0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#8  0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f5d2aa70700 (LWP 16485)):
#0  0x00007f5d4ca675ac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5d2ad5c2cb in util_queue_thread_func () from /usr/lib64/dri/i965_dri.so
#2  0x00007f5d2ad5bff7 in impl_thrd_routine () from /usr/lib64/dri/i965_dri.so
#3  0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#4  0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f5d33666700 (LWP 16484)):
#0  0x00007f5d4cd6ccd0 in read () from /lib64/libc.so.6
#1  0x00007f5d4a3e4650 in g_wakeup_acknowledge () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f5d4a39fb77 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f5d4a3a0030 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f5d4dcabadb in QEventDispatcherGlib::processEvents (this=0x7f5d2c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#6  0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7f5d33665df0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#7  0x00007f5d4da92f6a in QThread::exec (this=this@entry=0x7f5d4335bda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:525
#8  0x00007f5d430d3055 in QDBusConnectionManager::run (this=0x7f5d4335bda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#9  0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x7f5d4335bda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:367
#10 0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#11 0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f5d4077f700 (LWP 16483)):
#0  0x00007f5d4cd715f3 in poll () from /lib64/libc.so.6
#1  0x00007f5d48e207f7 in _xcb_conn_wait () from /usr/lib64/libxcb.so.1
#2  0x00007f5d48e2242a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f5d435e4ae6 in QXcbEventReader::run (this=0x556c81b9df70) at qxcbconnection.cpp:1388
#4  0x00007f5d4da9e7e6 in QThreadPrivate::start (arg=0x556c81b9df70) at thread/qthread_unix.cpp:367
#5  0x00007f5d4ca609aa in start_thread () from /lib64/libpthread.so.0
#6  0x00007f5d4cd7d15f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f5d5046b780 (LWP 16482)):
#0  0x00007f5d4ca675ac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5d48e20a02 in _xcb_conn_wait () from /usr/lib64/libxcb.so.1
#2  0x00007f5d48e2212f in wait_for_reply () from /usr/lib64/libxcb.so.1
#3  0x00007f5d48e22240 in xcb_wait_for_reply () from /usr/lib64/libxcb.so.1
#4  0x00007f5d435e345a in QXcbConnection::sync (this=0x556c81b90ec0) at qxcbconnection.cpp:2101
#5  0x00007f5d436068e3 in QXcbBackingStoreImage::preparePaint (this=0x556c822eedf0, region=...) at qxcbbackingstore.cpp:724
#6  0x00007f5d436069bc in QXcbBackingStore::beginPaint (this=this@entry=0x556c821c7e10, region=...) at qxcbbackingstore.cpp:763
#7  0x00007f5d4e374a3b in QBackingStore::beginPaint (this=0x556c81e44440, region=...) at painting/qbackingstore.cpp:134
#8  0x00007f5d4f56260d in QWidgetBackingStore::beginPaint (this=this@entry=0x556c821c92a0, toClean=..., widget=<optimized out>, backingStore=<optimized out>, returnInfo=returnInfo@entry=0x7ffd04f8d054, toCleanIsInTopLevelCoordinates=toCleanIsInTopLevelCoordinates@entry=true) at kernel/qwidgetbackingstore.cpp:335
#9  0x00007f5d4f565227 in QWidgetBackingStore::doSync (this=this@entry=0x556c821c92a0) at kernel/qwidgetbackingstore.cpp:1335
#10 0x00007f5d4f56586d in QWidgetBackingStore::sync (this=0x556c821c92a0) at kernel/qwidgetbackingstore.cpp:1156
#11 0x00007f5d4f580daf in QWidgetPrivate::syncBackingStore (this=0x556c81dbfcf0) at kernel/qwidget.cpp:1953
#12 0x00007f5d4f59a1c8 in QWidget::event (this=this@entry=0x556c81e3edf0, event=event@entry=0x7f5d3800b610) at kernel/qwidget.cpp:9220
#13 0x00007f5d4f6aff70 in QMainWindow::event (this=0x556c81e3edf0, event=0x7f5d3800b610) at widgets/qmainwindow.cpp:1348
#14 0x00007f5d4f5552bc in QApplicationPrivate::notify_helper (this=this@entry=0x556c81b81b40, receiver=receiver@entry=0x556c81e3edf0, e=e@entry=0x7f5d3800b610) at kernel/qapplication.cpp:3727
#15 0x00007f5d4f55c89f in QApplication::notify (this=0x7ffd04f8d9e0, receiver=0x556c81e3edf0, e=0x7f5d3800b610) at kernel/qapplication.cpp:3486
#16 0x00007f5d4dc4fc27 in QCoreApplication::notifyInternal2 (receiver=0x556c81e3edf0, event=event@entry=0x7f5d3800b610) at kernel/qcoreapplication.cpp:1048
#17 0x00007f5d4dc5367a in QCoreApplication::sendEvent (event=0x7f5d3800b610, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x556c81adca90) at kernel/qcoreapplication.cpp:1745
#19 0x00007f5d4dc53c48 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1599
#20 0x00007f5d4dcac243 in postEventSourceDispatch (s=0x556c81bdc2e0) at kernel/qeventdispatcher_glib.cpp:276
#21 0x00007f5d4a39fed7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f5d4a3a0110 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#23 0x00007f5d4a3a019c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#24 0x00007f5d4dcababf in QEventDispatcherGlib::processEvents (this=0x556c81bf1500, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#25 0x00007f5d43677251 in QPAEventDispatcherGlib::processEvents (this=0x556c81bf1500, flags=...) at qeventdispatcher_glib.cpp:69
#26 0x00007f5d4dc4e40b in QEventLoop::exec (this=this@entry=0x7ffd04f8d870, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#27 0x00007f5d4dc57d10 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1336
#28 0x0000556c7e70bee1 in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/main/main.cpp:365
ibre5041 commented 5 years ago

Do you have the SQL which failed to be parsed?

mkyral commented 5 years ago

It was a really stupid query like select * from some_table where columnX like 'aaa'; Then I do some edits to add more conditions, but I'm not able to do it for a long time. It always crash shortly.

As I wrote, I'm on new hardware, with newly installed Gentoo and I'm not sure, what exactly is wrong. Tora or some library on my system? I had no issue on old latop.

ibre5041 commented 5 years ago

The last commit added column name competition. The place where is crashes is new one. It runs in background thread, it parses the SQL you edit and it tries to deduce table alias mapping. Try to revert back to previous commit ec9f6bf80602e195923806f9ab4cc12dfbc0241d and check whether is still crashes.

mkyral commented 5 years ago

It still crashing with ec9f6bf. I had returned to Version v3.2-173-gf2b2cd9f-dirty and it seems to work. Yesterday I had no crash.

If I remember correctly, it often crashed during deleting of column name in where clause. (with Backspace). But not always.

mkyral commented 5 years ago

Today crashed again on v3.2-173-gf2b2cd9f-dirty, but I think that this is a little bit different. I did some sql query editing and wanted copy the updated command to clipboard. So I pressed Shift and several times Up to select all lines of query. And Tora crashed during this.

Application: tora (tora), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f61e652d780 (LWP 29379))]

Thread 8 (Thread 0x7f61a9b69700 (LWP 29417)):
[KCrash Handler]
#6  antlr3::BitsetList<antlr3::TraitsBase<Antlr3BackendImpl::UserTraits> >::bitsetLoad (this=0x0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3bitset.inl:59
#7  0x000055b73afa4e8a in antlr3::ANTLR_Exception<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, (antlr3::ExceptionType)3, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::displayRecognitionError (this=0x7f61940234b0, tokenNames=0x55b73c175c00 <Antlr3BackendImpl::OracleDMLTokenNames>, str_stream=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3exception.inl:317
#8  0x000055b73afa5722 in antlr3::Parser<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::displayRecognitionError (this=this@entry=0x7f61940d5740, tokenNames=0x55b73c175c00 <Antlr3BackendImpl::OracleDMLTokenNames>, ex=0x7f61940234b0) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3parser.inl:121
#9  0x000055b73ae9d210 in antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::displayRecognitionError (tokenNames=<optimized out>, this=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:263
#10 antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError<Antlr3BackendImpl::OracleDML> (this=this@entry=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:249
#11 0x000055b73af6f7bb in antlr3::BaseRecognizer<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits>, antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError (this=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3baserecognizer.inl:208
#12 Antlr3BackendImpl::UserTraits<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::RecognizerType<antlr3::CommonTokenStream<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> > >::reportError (this=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/OracleDMLTraits.hpp:48
#13 antlr3::Parser<antlr3::Traits<Antlr3BackendImpl::OracleDMLLexer, Antlr3BackendImpl::OracleDML, Antlr3BackendImpl::UserTraits> >::preporterror (this=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/libantlr3cpp-3.5.3/include/antlr3parser.inl:359
#14 Antlr3BackendImpl::OracleDML::seq_of_statements (this=this@entry=0x7f61940d5740) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/OracleDML.cc:12690
#15 0x000055b73b1847b7 in SQLParser::OracleDMLStatement::parse (this=this@entry=0x7f619403c890) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/tsqlparseoracle2.cc:388
#16 0x000055b73b185646 in SQLParser::OracleDMLStatement::OracleDMLStatement (this=0x7f619403c890, statement=..., name=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/parsing/tsqlparseoracle2.cc:340
#17 0x000055b73b18b8de in Util::GenericFactoryImpl<SQLParser::Statement, Loki::Typelist<QString const&, Loki::Typelist<QString const&, Loki::NullType> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::createInstance<SQLParser::OracleDMLStatement> (parm1=..., parm2=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/loki-extra/include/loki/Factory_alt.h:413
#18 0x000055b73ae34dcb in Util::GenericFactoryImpl<SQLParser::Statement, Loki::Typelist<QString const&, Loki::Typelist<QString const&, Loki::NullType> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::create (parm2=..., parm1=..., className=..., this=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/extlibs/loki-extra/include/loki/Factory_alt.h:419
#19 toWorksheetTextWorker::process (this=this@entry=0x55b73d93ce60, text=...) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/editor/toworksheettext.cpp:697
#20 0x000055b73ad03230 in toWorksheetTextWorker::qt_static_metacall (_o=0x55b73d93ce60, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999_build/src/editor/moc_toworksheettext.cpp:328
#21 0x00007f61e3d414aa in QObject::event (this=0x55b73d93ce60, e=<optimized out>) at kernel/qobject.cpp:1251
#22 0x00007f61e56172bc in QApplicationPrivate::notify_helper (this=this@entry=0x55b73d059ca0, receiver=receiver@entry=0x55b73d93ce60, e=e@entry=0x55b73d829ca0) at kernel/qapplication.cpp:3727
#23 0x00007f61e561e89f in QApplication::notify (this=0x7ffdc577df60, receiver=0x55b73d93ce60, e=0x55b73d829ca0) at kernel/qapplication.cpp:3486
#24 0x00007f61e3d11c27 in QCoreApplication::notifyInternal2 (receiver=0x55b73d93ce60, event=event@entry=0x55b73d829ca0) at kernel/qcoreapplication.cpp:1048
#25 0x00007f61e3d1567a in QCoreApplication::sendEvent (event=0x55b73d829ca0, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x55b73d93cd90) at kernel/qcoreapplication.cpp:1745
#27 0x00007f61e3d15c48 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1599
#28 0x00007f61e3d6e243 in postEventSourceDispatch (s=0x7f6194004fd0) at kernel/qeventdispatcher_glib.cpp:276
#29 0x00007f61e0461ed7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f61e0462110 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f61e3d6dabf in QEventDispatcherGlib::processEvents (this=0x7f6194000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7f61a9b68e20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#34 0x00007f61e3b54f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#35 0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x55b73d93ccc0) at thread/qthread_unix.cpp:367
#36 0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#37 0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f61aa36a700 (LWP 29416)):
#0  0x00007f61e04a79f4 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f61e0461889 in g_main_context_query () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f61e0462007 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f61e3d6dadb in QEventDispatcherGlib::processEvents (this=0x7f61a0000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7f61aa369e20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#6  0x00007f61e3b54f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#7  0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x55b73d90a2a0) at thread/qthread_unix.cpp:367
#8  0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#9  0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f61ab36c700 (LWP 29414)):
#0  0x00007f61e04a79d9 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f61e046206f in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f61e3d6dadb in QEventDispatcherGlib::processEvents (this=0x7f61a4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7f61ab36be20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007f61e3b54f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x55b73d3f74f0) at thread/qthread_unix.cpp:367
#7  0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#8  0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f61b09a8700 (LWP 29387)):
#0  0x00007f61e2e335f3 in poll () from /lib64/libc.so.6
#1  0x00007f61e0462089 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f61e3d6dadb in QEventDispatcherGlib::processEvents (this=0x7f61ac000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7f61b09a7e20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007f61e3b54f6a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x55b73d48ea30) at thread/qthread_unix.cpp:367
#7  0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#8  0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f61c0a85700 (LWP 29382)):
#0  0x00007f61e2b295ac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f61c0d712cb in util_queue_thread_func () from /usr/lib64/dri/i965_dri.so
#2  0x00007f61c0d70ff7 in impl_thrd_routine () from /usr/lib64/dri/i965_dri.so
#3  0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#4  0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f61c96a4700 (LWP 29381)):
#0  0x00007f61e2e2ecd0 in read () from /lib64/libc.so.6
#1  0x00007f61e04a6650 in g_wakeup_acknowledge () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f61e0461b77 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f61e0462030 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f61e3d6dadb in QEventDispatcherGlib::processEvents (this=0x7f61c4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#6  0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7f61c96a3df0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#7  0x00007f61e3b54f6a in QThread::exec (this=this@entry=0x7f61d940eda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:525
#8  0x00007f61d9186055 in QDBusConnectionManager::run (this=0x7f61d940eda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#9  0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x7f61d940eda0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:367
#10 0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#11 0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f61d6832700 (LWP 29380)):
#0  0x00007f61e2e335f3 in poll () from /lib64/libc.so.6
#1  0x00007f61deee27f7 in _xcb_conn_wait () from /usr/lib64/libxcb.so.1
#2  0x00007f61deee442a in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f61d9697ae6 in QXcbEventReader::run (this=0x55b73d0760d0) at qxcbconnection.cpp:1388
#4  0x00007f61e3b607e6 in QThreadPrivate::start (arg=0x55b73d0760d0) at thread/qthread_unix.cpp:367
#5  0x00007f61e2b229aa in start_thread () from /lib64/libpthread.so.0
#6  0x00007f61e2e3f15f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f61e652d780 (LWP 29379)):
#0  0x00007f61e2b295ac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f61deee2a02 in _xcb_conn_wait () from /usr/lib64/libxcb.so.1
#2  0x00007f61deee412f in wait_for_reply () from /usr/lib64/libxcb.so.1
#3  0x00007f61deee4240 in xcb_wait_for_reply () from /usr/lib64/libxcb.so.1
#4  0x00007f61d969645a in QXcbConnection::sync (this=0x55b73d069020) at qxcbconnection.cpp:2101
#5  0x00007f61d96b98e3 in QXcbBackingStoreImage::preparePaint (this=0x55b73d793730, region=...) at qxcbbackingstore.cpp:724
#6  0x00007f61d96b99bc in QXcbBackingStore::beginPaint (this=this@entry=0x7f61d0008070, region=...) at qxcbbackingstore.cpp:763
#7  0x00007f61e4436a3b in QBackingStore::beginPaint (this=0x7f61d00078a0, region=...) at painting/qbackingstore.cpp:134
#8  0x00007f61e562460d in QWidgetBackingStore::beginPaint (this=this@entry=0x55b73d6eaed0, toClean=..., widget=<optimized out>, backingStore=<optimized out>, returnInfo=returnInfo@entry=0x7ffdc577d5d4, toCleanIsInTopLevelCoordinates=toCleanIsInTopLevelCoordinates@entry=true) at kernel/qwidgetbackingstore.cpp:335
#9  0x00007f61e5627227 in QWidgetBackingStore::doSync (this=this@entry=0x55b73d6eaed0) at kernel/qwidgetbackingstore.cpp:1335
#10 0x00007f61e562786d in QWidgetBackingStore::sync (this=0x55b73d6eaed0) at kernel/qwidgetbackingstore.cpp:1156
#11 0x00007f61e5642daf in QWidgetPrivate::syncBackingStore (this=0x55b73d136340) at kernel/qwidget.cpp:1953
#12 0x00007f61e565c1c8 in QWidget::event (this=this@entry=0x55b73d0eba50, event=event@entry=0x55b73d82f140) at kernel/qwidget.cpp:9220
#13 0x00007f61e5771f70 in QMainWindow::event (this=0x55b73d0eba50, event=0x55b73d82f140) at widgets/qmainwindow.cpp:1348
#14 0x00007f61e56172bc in QApplicationPrivate::notify_helper (this=this@entry=0x55b73d059ca0, receiver=receiver@entry=0x55b73d0eba50, e=e@entry=0x55b73d82f140) at kernel/qapplication.cpp:3727
#15 0x00007f61e561e89f in QApplication::notify (this=0x7ffdc577df60, receiver=0x55b73d0eba50, e=0x55b73d82f140) at kernel/qapplication.cpp:3486
#16 0x00007f61e3d11c27 in QCoreApplication::notifyInternal2 (receiver=0x55b73d0eba50, event=event@entry=0x55b73d82f140) at kernel/qcoreapplication.cpp:1048
#17 0x00007f61e3d1567a in QCoreApplication::sendEvent (event=0x55b73d82f140, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x55b73cfb4a90) at kernel/qcoreapplication.cpp:1745
#19 0x00007f61e3d15c48 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1599
#20 0x00007f61e3d6e243 in postEventSourceDispatch (s=0x55b73d0b44d0) at kernel/qeventdispatcher_glib.cpp:276
#21 0x00007f61e0461ed7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f61e0462110 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#23 0x00007f61e046219c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#24 0x00007f61e3d6dabf in QEventDispatcherGlib::processEvents (this=0x55b73d0c9950, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#25 0x00007f61d972a251 in QPAEventDispatcherGlib::processEvents (this=0x55b73d0c9950, flags=...) at qeventdispatcher_glib.cpp:69
#26 0x00007f61e3d1040b in QEventLoop::exec (this=this@entry=0x7ffdc577ddf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#27 0x00007f61e3d19d10 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1336
#28 0x000055b73acccdf1 in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/dev-db/tora-9999/work/tora-9999/src/main/main.cpp:365
mkyral commented 5 years ago

Maybe one more important note. Query was not correct, I run it before and Oracle returned parse error. It usually means, that Tora "closes" connection.

When I correct the query and re-run it, Tora first tells me that I'm not connected. But when I run the same query again, Tora connects and shows me correct result (selected rows).

mkyral commented 5 years ago

@ibre5041 This "query" always causes Tora crash.

select * from dual where dummy bwetwe

Just paste it and wait a while.

Also when I'm writing 'order by', tora crash before I'm able type the second word 'by'

select * from dual order

ibre5041 commented 5 years ago

Thx, I will check.

ZippyDufus commented 5 years ago

Hello, I just built to commit d69c5ad4aab453e896f122d02a10d9353da90248 (Jan 14) and I get always a crash using the same mal-formed select statement above comment: select * from dual where dummy bwetwe.

Moreover, I'm getting crashes just by pasting in the query above.

I first noticed this issue on this commit with my comment

Further, I am speculating that the query string isn't being parsed from the worksheet entry screen properly and maybe submitting some unseen binary garbage at the end of the query to the query processor:

  1. As per my submitted issue #120, highlighting of the query is ignored.
  2. Sometimes, when I first enter or paste in a query it is parsed as invalid. Adding a linefeed at the end resolves this.

I don't have a stack trace but below is the command line output:

QObject::connect: Cannot connect DotGraphView::removeEdge(const QString&) to (null)::removeEdge(const QString&)
QObject::connect: Cannot connect DotGraphView::removeNodeNamed(const QString&) to (null)::removeNodeNamed(const QString&)
QObject::connect: Cannot connect DotGraphView::removeElement(const QString&) to (null)::removeElement(const QString&)
QSqlQuery::exec: empty query
QObject::connect: No such slot toResultPlanView::slotStop()
ORA-24550: signal received: [si_signo=11] [si_errno=0] [si_code=1] [si_int=0] [si_ptr=(nil)] [si_addr=0x8]
kpedbg_dmp_stack()+404<-kpeDbgCrash()+210<-kpeDbgSignalHandler()+122<-skgesig_sigactionHandler()+229<-__sighandler()<-_ZN6antlr310BitsetListINS_10TraitsBaseIN17Antlr3BackendImpl10UserTraitsEEEE10bitsetLoadEv()+68

I'm using a fully-updated Fedora 29 Linux.

Update: rebuilt to commit 763ab3bc7cd001dd82a407697bd93d96cd3740cd and problem goes away.

ibre5041 commented 5 years ago

Can you please try with last two commits? I seems it can not be repoduced on windows.

mkyral commented 5 years ago

Hi, I just tested v3.2-183-g553e69bc-dirty. I tried various queries and edit actions and no crash at all. So it looks correct now.

Thanks.

ZippyDufus commented 5 years ago

For the record, this appears to fix the crashing issue with Fedora 29 as well.

Good work!