Version: kipi-plugins 0.1.0-rc1 (using KDE KDE 3.4.2) Installed from: Compiled From Sources OS: Linux I use the printer/scanner HP PSC 1110, during a final scan (after clicking on the Final Scan button) if I click on the Stop button to stop the current scan process then DigiKam crashes with the following messages: Using host libthread_db library "/lib/tls/libthread_db.so.1". `shared object read from target memory' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread -1236486464 (LWP 996)] [KCrash handler] #4 0xb6d3ab82 in QImage::operator= () from /usr/lib/qt3/lib/libqt-mt.so.3 #5 0xbfceefd8 in ?? () #6 0xb7fe93a0 in _dl_runtime_resolve () at dl-runtime.c:136 #7 0xb5e50c89 in KIPIAcquireImagesPlugin::AcquireImageDialog::AcquireImageDialog () from /usr/lib/kde3/kipiplugin_acquireimages.so #8 0xb5e4d7f2 in Plugin_AcquireImages::slotAcquireImageDone () from /usr/lib/kde3/kipiplugin_acquireimages.so #9 0xb5e4d970 in Plugin_AcquireImages::qt_invoke () from /usr/lib/kde3/kipiplugin_acquireimages.so #10 0xb6d6b25d in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #11 0xb6b4c098 in ?? () from /usr/lib/qt3/lib/libqt-mt.so.3 #12 0xb7ae4004 in ?? () from /usr/lib/libkio.so.4 #13 0xbfcef0f8 in ?? () #14 0x0843cce8 in ?? () #15 0xbfcef118 in ?? () #16 0xb7fe93a0 in _dl_runtime_resolve () at dl-runtime.c:136 #17 0xb7972dcf in KScanDialog::finalImage () from /usr/lib/libkio.so.4 In Kooka, if I stop the current scan process then it does not crash.
I can confirm this bug, but funny it happens only with my HP PSC 1610 while with the canon scan N656U not.
SVN commit 527546 by anaselli: - fix bug 114519 BUG: 114519 M +49 -40 plugin_acquireimages.cpp --- trunk/extragear/libs/kipi-plugins/acquireimages/plugin_acquireimages.cpp #527545:527546 @@ -96,61 +96,70 @@ void Plugin_AcquireImages::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); - if ( !interface ) - { - kdError( 51000 ) << "Kipi interface is null!" << endl; - return; - } + if ( !interface ) + { + kdError( 51000 ) << "Kipi interface is null!" << endl; + return; + } - QString from(sender()->name()); + QString from(sender()->name()); - if (from == "scan_images") - { - m_scanDialog = KScanDialog::getScanDialog(kapp->activeWindow(), "KIPI Scan Images Plugin"); + if (from == "scan_images") + { + m_scanDialog = KScanDialog::getScanDialog(kapp->activeWindow(), "KIPI Scan Images Plugin"); - if ( m_scanDialog ) - { - m_scanDialog->setMinimumSize(400, 300); - - connect(m_scanDialog, SIGNAL(finalImage(const QImage &, int)), - this, SLOT(slotAcquireImageDone(const QImage &))); - } - else - { - KMessageBox::sorry(kapp->activeWindow(), i18n("No KDE scan-service available; check your system."), - i18n("KIPI's 'Scan Images' Plugin")); - kdDebug ( 51000 ) << "No Scan-service available, aborting!" << endl; - return; - } + if ( m_scanDialog ) + { + m_scanDialog->setMinimumSize(400, 300); - if ( m_scanDialog->setup() ) - m_scanDialog->show(); - } - else if (from == "screenshot_images") - { - m_screenshotDialog = new KIPIAcquireImagesPlugin::ScreenGrabDialog(interface, - kapp->activeWindow(), "KIPI ScreenshotImagesDialog"); - m_screenshotDialog->show(); - } + connect(m_scanDialog, SIGNAL(finalImage(const QImage &, int)), + this, SLOT(slotAcquireImageDone(const QImage &))); + + } else - { - kdWarning( 51000 ) << "The impossible happened... unknown flip specified" << endl; - return; - } + { + KMessageBox::sorry(kapp->activeWindow(), i18n("No KDE scan-service available; check your system."), + i18n("KIPI's 'Scan Images' Plugin")); + kdDebug ( 51000 ) << "No Scan-service available, aborting!" << endl; + return; + } + + if ( m_scanDialog->setup() ) + m_scanDialog->show(); + } + else if (from == "screenshot_images") + { + m_screenshotDialog = new KIPIAcquireImagesPlugin::ScreenGrabDialog(interface, + kapp->activeWindow(), "KIPI ScreenshotImagesDialog"); + m_screenshotDialog->show(); + } + else + { + kdWarning( 51000 ) << "The impossible happened... unknown flip specified" << endl; + return; + } } - ///////////////////////////////////////////////////////////////////////////////////////////////////// void Plugin_AcquireImages::slotAcquireImageDone(const QImage &img) { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + //FIXME: this is not a cleaned way to test if scan has been interrupted + // anyway it prevents a crash + QImage * pImg = (QImage*)&img; + if (!pImg ) + { + kdError(51000) << "Acquired image is null!" << endl; + return; + } + +KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); if ( !interface ) { - kdError( 51000 ) << "Kipi interface is null!" << endl; + kdError( 51000 ) << "Kipi interface is null!" << endl; return; }