Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt5,Debian,libtesseract4: Crash on recognition #279

Closed
SantosSi opened this issue Dec 27, 2017 · 9 comments
Closed

Qt5,Debian,libtesseract4: Crash on recognition #279

SantosSi opened this issue Dec 27, 2017 · 9 comments

Comments

@SantosSi
Copy link
Contributor

Application crashes when "Recognizing page 58 (58 of 66)" with a specific file (will send Sandro separately) running the newest master. Recently Debian updated libtesseract to version 4 on Testing.

gImageReader 3.2.3 (7639964)

#1 0x00007f9be50f84a1 in Splash::blitImage(SplashBitmap*, bool, int, int, SplashClipResult) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#2 0x00007f9be50f8912 in Splash::drawImage(bool ()(void, unsigned char*, unsigned char*), void ()(void, SplashBitmap*), void*, SplashColorMode, bool, int, int, double*, bool, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#3 0x00007f9be50e815f in SplashOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#4 0x00007f9be505339c in Gfx::doImage(Object*, Stream*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#5 0x00007f9be50548cf in Gfx::opXObject(Object*, int) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#6 0x00007f9be504d197 in Gfx::go(bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#7 0x00007f9be504d5df in Gfx::display(Object*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#8 0x00007f9be5096afb in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool ()(void), void*, bool ()(Annot, void*), void*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#9 0x00007f9be97ef209 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const () from /usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1
#10 0x00005616ed778cf1 in PDFRenderer::render(int, double) const ()
#11 0x00005616ed77b679 in Displayer::renderImage() ()
#12 0x00005616ed77aeb3 in Displayer::setup(int const*, int const*, double const*) ()
#13 0x00005616ed7e2d16 in OutputEditorHOCR::showPage(HOCRPage const*) ()
#14 0x00005616ed7e2eeb in OutputEditorHOCR::showItemProperties(QModelIndex const&) ()
#15 0x00005616ed7faf0a in OutputEditorHOCR::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#16 0x00007f9be6d9d8c2 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f9be7a90e64 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f9be6d709cd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f9be6dc7ac3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f9be2367fa7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f9be23681e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f9be236826c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f9be6dc70ef in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f9be6d6c2aa in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00005616ed7c3278 in Utils::busyTask(std::function<bool ()> const&, QString const&) ()
#28 0x00005616ed7ae078 in Recognizer::recognize(QList const&, bool) ()
#29 0x00005616ed7ad044 in Recognizer::recognizeMultiplePages() ()
#30 0x00005616ed7f8b37 in Recognizer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#31 0x00007f9be6d9cd55 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f9be7a82eb2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f9be7a8559c in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f9be7c0119c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f9be7c0868b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f9be7c09553 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007f9be7ac7b98 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007f9be7c0b80b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007f9be7a913bf in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007f9be7a90392 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007f9be7ae25c5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007f9be7ae4efa in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007f9be7a90e64 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007f9be72ce183 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#49 0x00007f9be72cfc65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#50 0x00007f9be72a7cab in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#51 0x00007f9bdb0cdd50 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#52 0x00007f9be2367fa7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007f9be23681e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007f9be236826c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007f9be6dc70ef in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#56 0x00007f9be6d6c2aa in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007f9be6d75214 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#58 0x00005616ed7ef4d3 in main ()

Thread 13 (Thread 0x7f9b98ec2700 (LWP 18636)):
#0 0x00007f9be623be4e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f9be6239898 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 12 (Thread 0x7f9b996c3700 (LWP 18635)):
#0 0x00007f9be623be4e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f9be6239898 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 11 (Thread 0x7f9b99ec4700 (LWP 18634)):
#0 0x00007f9be623be4e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f9be6239898 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 10 (Thread 0x7f9ba0ff5700 (LWP 18633)):
#0 0x00007f9be5b2db4b in ppoll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f9be6dc2dc1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007f9be6cf4d2b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3 0x00007f9be6cea95b in QProcess::waitForFinished(int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00005616ed789cf7 in MainWindow::signalHandler(int) ()
#5
#6 0x00007f9be9eb435b in ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const () from /usr/lib/libtesseract.so.4
#7 0x00007f9be9e9893e in WERD_CHOICE::remove_unichar_ids(int, int) () from /usr/lib/libtesseract.so.4
#8 0x00007f9be9e8ac7d in WERD_RES::MergeAdjacentBlobs(int) () from /usr/lib/libtesseract.so.4
#9 0x00007f9be9d14c4e in tesseract::Tesseract::write_results(PAGE_RES_IT&, char, unsigned char) () from /usr/lib/libtesseract.so.4
#10 0x00007f9be9d14d2f in tesseract::Tesseract::output_pass(PAGE_RES_IT&, TBOX const*) () from /usr/lib/libtesseract.so.4
#11 0x00007f9be9cfaf3f in tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) () from /usr/lib/libtesseract.so.4
#12 0x00007f9be9ce48b0 in tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) () from /usr/lib/libtesseract.so.4
#13 0x00005616ed7ad9e8 in Recognizer::recognize(QList const&, bool)::{lambda()#1}::operator()() const ()
#14 0x00005616ed7af31d in std::_Function_handler<bool (), Recognizer::recognize(QList const&, bool)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#15 0x00005616ed7c4922 in std::function<bool ()>::operator()() const ()
#16 0x00005616ed7c46d6 in BusyTaskThread::run() ()
#17 0x00007f9be6b9022d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#19 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 9 (Thread 0x7f9ba3931700 (LWP 18632)):
#0 0x00007f9be5dfbb26 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f9be6b9165b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00005616ed77d5cc in Displayer::scaleThread() ()
#3 0x00005616ed7831f7 in void std::__invoke_impl<void, void (Displayer::&)(), Displayer&>(std::__invoke_memfun_deref, void (Displayer::&)(), Displayer&) ()
#4 0x00005616ed782fbd in std::__invoke_result<void (Displayer::&)(), Displayer&>::type std::__invoke<void (Displayer::&)(), Displayer&>(void (Displayer::&)(), Displayer&) ()
#5 0x00005616ed782c36 in void std::_Bind<void (Displayer::(Displayer))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) ()
#6 0x00005616ed781f98 in void std::_Bind<void (Displayer::(Displayer))()>::operator()<, void>() ()
#7 0x00005616ed78082e in std::_Function_handler<void (), std::_Bind<void (Displayer::(Displayer))()> >::_M_invoke(std::_Any_data const&) ()
#8 0x00005616ed77f5f4 in std::function<void ()>::operator()() const ()
#9 0x00005616ed77f2b0 in Displayer::ScaleThread::run() ()
#10 0x00007f9be6b9022d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 8 (Thread 0x7f9bababf700 (LWP 17762)):
#0 0x00007f9be5b2da5d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f9bb051bfba in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#2 0x00007f9bb051bb61 in avahi_simple_poll_run () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#3 0x00007f9bb051bd38 in avahi_simple_poll_iterate () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#4 0x00007f9bb051bf53 in avahi_simple_poll_loop () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#5 0x00007f9bb051c017 in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#6 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 7 (Thread 0x7f9bb3a8d700 (LWP 17761)):
#0 0x00007f9be5dfbb26 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f9bb933623b in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#2 0x00007f9bb9336157 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#3 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 6 (Thread 0x7f9bb48b4700 (LWP 17760)):
#0 0x00007f9be5dfbb26 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f9bb933623b in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#2 0x00007f9bb9336157 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#3 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7f9bc251a700 (LWP 17759)):
#0 0x00007f9be5b2da5d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f9bc252abaf in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7f9bc3148700 (LWP 17758)):
#0 0x00007f9be5dfbb26 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f9be6b9165b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00005616ed7f4bfa in Utils::AsyncQueueScannerSane::Request::dequeue() ()
#3 0x00005616ed7ef9e0 in ScannerSane::run() ()
#4 0x00005616ed7fb3df in ScannerSane::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#5 0x00007f9be6d9cd55 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007f9be6b8a0b7 in QThread::started(QThread::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007f9be6b90214 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f9bc9dd5700 (LWP 17757)):
#0 0x00007f9be5b2da5d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f9be2368159 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f9be236826c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f9be6dc70ef in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007f9be6d6c2aa in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f9be6b8b35a in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007f9be863ae45 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7 0x00007f9be6b9022d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f9bd8741700 (LWP 17756)):
#0 0x00007f9be5b2da5d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f9bdca3d150 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007f9bdca3eee9 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007f9bdb06b029 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4 0x00007f9be6b9022d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5 0x00007f9be5df5519 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f9be5b37a4f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f9bea5d2fc0 (LWP 17754)):
#0 0x00007f9be50e9052 in Splash::pipeRunSimpleXBGR8(SplashPipe*) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#1 0x00007f9be50f84a1 in Splash::blitImage(SplashBitmap*, bool, int, int, SplashClipResult) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#2 0x00007f9be50f8912 in Splash::drawImage(bool ()(void, unsigned char*, unsigned char*), void ()(void, SplashBitmap*), void*, SplashColorMode, bool, int, int, double*, bool, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#3 0x00007f9be50e815f in SplashOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#4 0x00007f9be505339c in Gfx::doImage(Object*, Stream*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#5 0x00007f9be50548cf in Gfx::opXObject(Object*, int) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#6 0x00007f9be504d197 in Gfx::go(bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#7 0x00007f9be504d5df in Gfx::display(Object*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#8 0x00007f9be5096afb in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool ()(void), void*, bool ()(Annot, void*), void*, bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.72
#9 0x00007f9be97ef209 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const () from /usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1
#10 0x00005616ed778cf1 in PDFRenderer::render(int, double) const ()
#11 0x00005616ed77b679 in Displayer::renderImage() ()
#12 0x00005616ed77aeb3 in Displayer::setup(int const*, int const*, double const*) ()
#13 0x00005616ed7e2d16 in OutputEditorHOCR::showPage(HOCRPage const*) ()
#14 0x00005616ed7e2eeb in OutputEditorHOCR::showItemProperties(QModelIndex const&) ()
#15 0x00005616ed7faf0a in OutputEditorHOCR::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#16 0x00007f9be6d9d8c2 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f9be7a90e64 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f9be6d709cd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f9be6dc7ac3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f9be2367fa7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f9be23681e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f9be236826c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f9be6dc70ef in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f9be6d6c2aa in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00005616ed7c3278 in Utils::busyTask(std::function<bool ()> const&, QString const&) ()
#28 0x00005616ed7ae078 in Recognizer::recognize(QList const&, bool) ()
#29 0x00005616ed7ad044 in Recognizer::recognizeMultiplePages() ()
#30 0x00005616ed7f8b37 in Recognizer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#31 0x00007f9be6d9cd55 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f9be7a82eb2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f9be7a8559c in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f9be7c0119c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f9be7c0868b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f9be7c09553 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007f9be7ac7b98 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007f9be7c0b80b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007f9be7a913bf in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007f9be7a90392 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007f9be7ae25c5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007f9be7ae4efa in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007f9be7a8959c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007f9be7a90e64 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007f9be6d6e258 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007f9be72ce183 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#49 0x00007f9be72cfc65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#50 0x00007f9be72a7cab in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#51 0x00007f9bdb0cdd50 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#52 0x00007f9be2367fa7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007f9be23681e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007f9be236826c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007f9be6dc70ef in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#56 0x00007f9be6d6c2aa in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007f9be6d75214 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#58 0x00005616ed7ef4d3 in main ()

@manisandro
Copy link
Owner

Looks like poppler is crashing. Does it happen also if you just browse to page 58? What version of poppler do you have? I can't reproduce this with poppler-0.61.1.

@SantosSi
Copy link
Contributor Author

No crash when browsing page 58.
libpoppler-dev 0.61.1-2

@manisandro
Copy link
Owner

If debian provides debug symbols (something like poppler-dbg) and the crash is reproducible, please file a bug to poppler upstream with the complete stacktrace (which should then at least contain line numbers for the poppler-related frames). Running gImageReader in valgrind can also produce some usefull debugging output.

Closing here since this is a poppler issue.

@SantosSi
Copy link
Contributor Author

SantosSi commented Dec 27, 2017

Not sure this is poppler related: recognizing with language setting EN does work fine, when seleting DE it crashes.

@manisandro
Copy link
Owner

reproducibly so? The stack trace definitely points to poppler :s

@manisandro
Copy link
Owner

And always and just page 58, or does it depend on previous operations?

@manisandro
Copy link
Owner

The ugly theory is that there is a tesseract memory corruption which corrupts memory which poppler is reading. If it is an issue which appeared only with tesseract-4.0 alpha, then this is certainly a possiblity. In that case it would be tesseracts fault... Try running gimagereader through valgrind to see if you get complaints about out of bound writes or similar.

@SantosSi
Copy link
Contributor Author

Yes, page 58 with or without other pages before and always only with language DE, but not with language EN.
Ran valgrind without additional parameters:
==9108== Memcheck, a memory error detector
==9108== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9108== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==9108== Command: ./gimagereader-qt5
==9108==
==9108== Conditional jump or move depends on uninitialised value(s)
==9108== at 0x989D39A: nextOnPixelInRasterLow (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x989D5BF: nextOnPixelInRaster (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x989E6C9: pixConnCompBB (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x985813C: ??? (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x9858881: ??? (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x98592DD: bmfCreate (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x4F35EDF: tesseract::Tesseract::Tesseract() (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EDFFDE: tesseract::TessBaseAPI::Init(char const*, int, char const*, tesseract::OcrEngineMode, char**, int, GenericVector const*, GenericVector const*, bool, bool ()(STRING const&, GenericVector)) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EE04D5: tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector const*, GenericVector const*, bool) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x1A6AD2: tesseract::TessBaseAPI::Init(char const*, char const*) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x19D65A: Config::setDataLocations(int) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x2294AD: Config::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (in gImageReader/build/gimagereader-qt5)
==9108==
==9108== Conditional jump or move depends on uninitialised value(s)
==9108== at 0x989D44E: nextOnPixelInRasterLow (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x989D5BF: nextOnPixelInRaster (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x989E6C9: pixConnCompBB (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x985813C: ??? (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x9858881: ??? (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x98592DD: bmfCreate (in /usr/lib/x86_64-linux-gnu/liblept.so.5.0.1)
==9108== by 0x4F35EDF: tesseract::Tesseract::Tesseract() (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EDFFDE: tesseract::TessBaseAPI::Init(char const*, int, char const*, tesseract::OcrEngineMode, char**, int, GenericVector const*, GenericVector const*, bool, bool ()(STRING const&, GenericVector)) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EE04D5: tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector const*, GenericVector const*, bool) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x1A6AD2: tesseract::TessBaseAPI::Init(char const*, char const*) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x19D65A: Config::setDataLocations(int) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x2294AD: Config::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (in gImageReader/build/gimagereader-qt5)
==9108==
Failed to open /usr/local/share/xml/iso-codes/iso_639.xml for reading
Failed to open /usr/local/share/xml/iso-codes/iso_3166.xml for reading
Detected 248 diacritics
start >= 0 && start + num <= length_:Error:Assert failed:in file ratngs.cpp, line 324
==9108== Thread 10 QThread:
==9108== Invalid read of size 4
==9108== at 0x50B235B: ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x509693D: WERD_CHOICE::remove_unichar_ids(int, int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x5088C7C: WERD_RES::MergeAdjacentBlobs(int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4F12C4D: tesseract::Tesseract::write_results(PAGE_RES_IT&, char, unsigned char) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4F12D2E: tesseract::Tesseract::output_pass(PAGE_RES_IT&, TBOX const*) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EF8F3E: tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EE28AF: tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x1E09E7: Recognizer::recognize(QList const&, bool)::{lambda()#1}::operator()() const (in gImageReader/build/gimagereader-qt5)
==9108== by 0x1E231C: std::_Function_handler<bool (), Recognizer::recognize(QList const&, bool)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x1F7921: std::function<bool ()>::operator()() const (in gImageReader/build/gimagereader-qt5)
==9108== by 0x1F76D5: BusyTaskThread::run() (in gImageReader/build/gimagereader-qt5)
==9108== by 0x812D22C: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.2)
==9108== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9108==
==9108==
==9108== Process terminating with default action of signal 11 (SIGSEGV)
==9108== at 0x925524E: raise (raise.c:46)
==9108== by 0x1BCD03: MainWindow::signalHandler(int) (in gImageReader/build/gimagereader-qt5)
==9108== by 0x9494AEF: ??? (in /lib/x86_64-linux-gnu/libc-2.25.so)
==9108== by 0x50B235A: ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x509693D: WERD_CHOICE::remove_unichar_ids(int, int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x5088C7C: WERD_RES::MergeAdjacentBlobs(int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4F12C4D: tesseract::Tesseract::write_results(PAGE_RES_IT&, char, unsigned char) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4F12D2E: tesseract::Tesseract::output_pass(PAGE_RES_IT&, TBOX const*) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EF8F3E: tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x4EE28AF: tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) (in /usr/lib/libtesseract.so.4.0.0)
==9108== by 0x1E09E7: Recognizer::recognize(QList const&, bool)::{lambda()#1}::operator()() const (in gImageReader/build/gimagereader-qt5)
==9108== by 0x1E231C: std::_Function_handler<bool (), Recognizer::recognize(QList const&, bool)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (in gImageReader/build/gimagereader-qt5)
==9108==
==9108== HEAP SUMMARY:
==9108== in use at exit: 167,186,945 bytes in 376,265 blocks
==9108== total heap usage: 3,931,458 allocs, 3,555,193 frees, 984,816,146 bytes allocated
==9108==
==9108== LEAK SUMMARY:
==9108== definitely lost: 80,253 bytes in 11 blocks
==9108== indirectly lost: 1,491 bytes in 38 blocks
==9108== possibly lost: 437,140 bytes in 1,336 blocks
==9108== still reachable: 166,668,061 bytes in 374,880 blocks
==9108== of which reachable via heuristic:
==9108== newarray : 8,963,640 bytes in 23,828 blocks
==9108== multipleinheritance: 194,720 bytes in 242 blocks
==9108== suppressed: 0 bytes in 0 blocks
==9108== Rerun with --leak-check=full to see details of leaked memory
==9108==
==9108== For counts of detected and suppressed errors, rerun with: -v
==9108== Use --track-origins=yes to see where uninitialised values come from
==9108== ERROR SUMMARY: 508 errors from 3 contexts (suppressed: 0 from 0)
Speicherzugriffsfehler

@manisandro
Copy link
Owner

Ok yes this is a tesseract memory-corruption issue. Please take it to tesseract-upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants