Version: (using KDE Devel) Installed from: Compiled sources OS: Linux I loaded a kvtml file, opened the Random Query dialog, then closed it after answering a few queries, everything worked fine. Then I went to Query Options, Queries tab and checked Use Advanced Learning Method. I the chose Recover Query to open the Random Query dialog again. Then I clicked the I Know It button, which in the code is the equivalent of answering the query correctly. At that point KVocTrain crashed. Sorry I did not save the stack trace, but I remember that kvoctrainApp::getTranslation was the one that caused the crash. I then repeated the above steps once or twice with the same results. Next time I checked the Use Advanced Learning Method before starting the query for the first time. Then it worked fine, but I noticed a weird thing: after a while it showed the number of answers that was greater that the total number of queries, in the box on the right, like 9/8, 10/8, 11/8 etc. This does not happen with the normal learning method. After that I tried to reproduce the initial crash problem but so far I could not. If I get it again, I will post more details. But the Advanced Learning Method does need more work IMHO.
OK, I got a crash when trying to start a new Random Query. Advanced Learning was enabled. Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 1100351136 (LWP 22801)] 0x414ab40e in __waitpid_nocancel () from /lib/tls/libpthread.so.0 #0 0x414ab40e in __waitpid_nocancel () from /lib/tls/libpthread.so.0 #1 0x40bfddd0 in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4 #2 <signal handler called> #3 0x4168df19 in raise () from /lib/tls/libc.so.6 #4 0x4179bebc in ?? () from /lib/tls/libc.so.6 #5 0x416205b0 in vtable for std::bad_alloc () from /usr/lib/libstdc++.so.5 #6 0x4168f771 in abort () from /lib/tls/libc.so.6 #7 0x00000000 in ?? () #8 0x00000020 in ?? () #9 0x00000000 in ?? () #10 0x00000000 in ?? () #11 0x00000000 in ?? () #12 0x00000000 in ?? () #13 0x00000000 in ?? () #14 0x00000000 in ?? () #15 0x00000000 in ?? () #16 0x00000000 in ?? () #17 0x00000000 in ?? () #18 0x00000000 in ?? () #19 0x00000000 in ?? () #20 0x00000000 in ?? () #21 0x00000000 in ?? () #22 0x00000000 in ?? () #23 0x00000000 in ?? () #24 0x00000000 in ?? () #25 0x00000000 in ?? () #26 0x00000000 in ?? () #27 0x00000000 in ?? () #28 0x00000000 in ?? () #29 0x00000000 in ?? () #30 0x00000000 in ?? () #31 0x00000000 in ?? () #32 0x00000000 in ?? () #33 0x00000000 in ?? () #34 0x00000000 in ?? () #35 0x00000000 in ?? () #36 0x00000000 in ?? () #37 0x00000000 in ?? () #38 0x00000000 in ?? () #39 0x00000000 in ?? () #40 0x00000000 in ?? () #41 0x00000000 in ?? () #42 0x00000000 in ?? () #43 0x09844246 in ?? () #44 0xbfffe9f0 in ?? () #45 0x414a0788 in ?? () #46 0x0806e0db in std::vector<QueryEntryRef, std::allocator<QueryEntryRef> >::_M_insert_aux () #47 0x41610044 in std::terminate () from /usr/lib/libstdc++.so.5 #48 0x416101b6 in __cxa_throw () from /usr/lib/libstdc++.so.5 #49 0x4161040f in operator new () from /usr/lib/libstdc++.so.5 #50 0x415fc6b9 in std::__default_alloc_template<true, 0>::allocate () from /usr/lib/libstdc++.so.5 #51 0x0806e0db in std::vector<QueryEntryRef, std::allocator<QueryEntryRef> >::_M_insert_aux () #52 0x0812a195 in QueryManager::select () #53 0x08098869 in kvoctrainApp::slotStartQuery () #54 0x080932f5 in kvoctrainApp::slotHeaderCallBack () #55 0x0807fda9 in kvoctrainApp::qt_invoke () #56 0x40fe2e9c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #57 0x40fe2ffd in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #58 0x4131ff12 in QPopupMenu::activated () from /usr/lib/libqt-mt.so.3 #59 0x410e2def in QPopupMenu::actSig () from /usr/lib/libqt-mt.so.3 #60 0x410e74aa in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3 #61 0x41018637 in QWidget::event () from /usr/lib/libqt-mt.so.3 #62 0x40f86aff in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3 #63 0x40f861f4 in QApplication::notify () from /usr/lib/libqt-mt.so.3 #64 0x40b78af9 in KApplication::notify () from /usr/lib/libkdecore.so.4 #65 0x40f1d471 in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3 #66 0x40f1b161 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3 #67 0x40f317d4 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #68 0x40f9a498 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #69 0x40f9a348 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #70 0x40f86d51 in QApplication::exec () from /usr/lib/libqt-mt.so.3 #71 0x08085e9f in main ()
Created attachment 6671 [details] This is the file that causes the crash above Check Use Advanced Learning Method, uncheck Swap Query Direction Randomly in Query Options. Open this file. Choose Learning/translation 1/Create Random Query. It should crash then.
OK, I am unable to create a new random query anymore when the advanced method is on. Without it everything works fine. Here is another crash I once got by just clicking on the KVocTrain menu bar: Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 1100351136 (LWP 23251)] 0x414ab40e in __waitpid_nocancel () from /lib/tls/libpthread.so.0 #0 0x414ab40e in __waitpid_nocancel () from /lib/tls/libpthread.so.0 #1 0x40bfddd0 in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4 #2 <signal handler called> #3 0x412a0c1b in QString::QString () from /usr/lib/libqt-mt.so.3 #4 0x080f0862 in kvoctrainDoc::getIdent () #5 0x0807bb6e in kvoctrainApp::aboutToShowLearn () #6 0x0807fef3 in kvoctrainApp::qt_invoke () #7 0x40fe2e9c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #8 0x40fe2cc4 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 #9 0x4132000e in QPopupMenu::aboutToShow () from /usr/lib/libqt-mt.so.3 #10 0x410e2bf0 in QPopupMenu::popup () from /usr/lib/libqt-mt.so.3 #11 0x410db444 in QMenuBar::openActPopup () from /usr/lib/libqt-mt.so.3 #12 0x410dd6f8 in QMenuBar::setActiveItem () from /usr/lib/libqt-mt.so.3 #13 0x410dcc9a in QMenuBar::mousePressEvent () from /usr/lib/libqt-mt.so.3 #14 0x41018626 in QWidget::event () from /usr/lib/libqt-mt.so.3 #15 0x40f86aff in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3 #16 0x40f861f4 in QApplication::notify () from /usr/lib/libqt-mt.so.3 #17 0x40b78af9 in KApplication::notify () from /usr/lib/libkdecore.so.4 #18 0x40f1d880 in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3 #19 0x40f1b161 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3 #20 0x40f317d4 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #21 0x40f9a498 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #22 0x40f9a348 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #23 0x40f86d51 in QApplication::exec () from /usr/lib/libqt-mt.so.3 #24 0x08085e9f in main () So let me know if you need any other info.
CVS commit by hedlund: Don't crash when using the Leitner method. BUG: 85142 M +5 -7 QueryManager.cpp 1.19 --- kdeedu/kvoctrain/kvoctrain/kvt-core/QueryManager.cpp #1.18:1.19 @@ -1,6 +1,4 @@ /*************************************************************************** - $Id$ - manage queries @@ -267,5 +265,5 @@ QuerySelection QueryManager::select(kvoc unsigned int lessonno; if (altlearn) - lessonno = 1; //We only use a single array in Leitner style + lessonno = 0; //We only use a single array in Leitner style else lessonno = expr->getLesson();