Bug 132649 - Random crash when opening image in editor
Summary: Random crash when opening image in editor
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: DImg-Core (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-19 18:36 UTC by Heiner Lamprecht
Modified: 2019-07-28 01:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiner Lamprecht 2006-08-19 18:36:48 UTC
Version:           0.9.0-svn / 2006-08-18 (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs
Compiler:          gcc-4.1.0 64bit version
OS:                Linux

When editing an image in IE, digikam often crashes during preview.

Sample Backtrace (using refocus):

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47452230410336 (LWP 27490)]
[New Thread 1090525504 (LWP 27503)]
[KCrash handler]
#5  0x00002b2855298490 in malloc_consolidate () from /lib64/libc.so.6
#6  0x00002b285529a2f9 in _int_malloc () from /lib64/libc.so.6
#7  0x00002b285529bd76 in malloc () from /lib64/libc.so.6
#8  0x00002b2854e871ed in operator new () from /usr/lib64/libstdc++.so.6
#9  0x00002b2854e87309 in operator new[] () from /usr/lib64/libstdc++.so.6
#10 0x00002b284ff30acc in Digikam::DImg::allocateData (this=0x7fff5b010360)
    at /work/heiner/Develop/digikam/unstable/graphics/digikam/libs/dimg/dimg.cpp:254
#11 0x00002b284ff3351f in DImg (this=0x7fff5b010360, image=@0x7fff5b0103e0,
    w=515, h=805)
    at /work/heiner/Develop/digikam/unstable/graphics/digikam/libs/dimg/dimg.cpp:97
#12 0x00002b284ff335f0 in Digikam::DImg::copy (this=0x7fff5b0103e0, x=10,
    y=10, w=515, h=805)
    at /work/heiner/Develop/digikam/unstable/graphics/digikam/libs/dimg/dimg.cpp:771
#13 0x00002aaab0e16b68 in DigikamRefocusImagesPlugin::ImageEffect_Refocus::putPreviewData (this=0x7fff5b010a20)
    at /work/heiner/Develop/digikam/unstable/graphics/digikamimageplugins/refocus/imageeffect_refocus.cpp:322
#14 0x00002b284fe8da07 in Digikam::CtrlPanelDlg::customEvent (
    this=0x7fff5b010a20, event=0x2aaab2018470)
    at /work/heiner/Develop/digikam/unstable/graphics/digikam/libs/dialogs/ctrlpaneldlg.cpp:359
#15 0x00002b2852c3e556 in QObject::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#16 0x00002b2852c715c8 in QWidget::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#17 0x00002b2852be7a95 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#18 0x00002b2852be86c7 in QApplication::notify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#19 0x00002b285205b0a8 in KApplication::notify ()
   from /opt/kde3/lib64/libkdecore.so.4
#20 0x00002b2852be9169 in QApplication::sendPostedEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#21 0x00002b2852b9e1e5 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#22 0x00002b2852bfc7a1 in QEventLoop::enterLoop ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#23 0x00002b2852d9dfab in QDialog::exec ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#24 0x00002aaab0e14cc5 in ImagePlugin_Refocus::slotRefocus (this=0xdfd750)
    at /work/heiner/Develop/digikam/unstable/graphics/digikamimageplugins/refocus/imageplugin_refocus.cpp:67
#25 0x00002aaab0e14d38 in ImagePlugin_Refocus::qt_invoke (this=0xdfd750,
    _id=2, _o=0x7fff5b010ca0)
    at /work/heiner/Develop/digikam/unstable/graphics/digikamimageplugins/refocus/imageplugin_refocus.moc:82
#26 0x00002b2852c3ea8c in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#27 0x00002b2852c3f7a3 in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#28 0x00002b2851a41dbe in KAction::slotPopupActivated ()
   from /opt/kde3/lib64/libkdeui.so.4
#29 0x00002b2851a42063 in KAction::qt_invoke ()
   from /opt/kde3/lib64/libkdeui.so.4
#30 0x00002b2852c3ea8c in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#31 0x00002b2852f22c52 in QSignal::signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#32 0x00002b2852c575a5 in QSignal::activate ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#33 0x00002b2852d2d545 in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#34 0x00002b2852c71967 in QWidget::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#35 0x00002b2852be7a95 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#36 0x00002b2852be88bb in QApplication::notify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#37 0x00002b285205b0a8 in KApplication::notify ()
   from /opt/kde3/lib64/libkdecore.so.4
#38 0x00002b2852b909ad in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#39 0x00002b2852b8f2d3 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#40 0x00002b2852b9e25f in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#41 0x00002b2852bfc7a1 in QEventLoop::enterLoop ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#42 0x00002b2852bfc64a in QEventLoop::exec ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#43 0x00000000004030ce in main (argc=1, argv=0x7fff5b011c78)
    at /work/heiner/Develop/digikam/unstable/graphics/digikam/digikam/main.cpp:273
Comment 1 caulier.gilles 2006-08-24 09:32:08 UTC
Yes, i can reproduce this crash on some computer but not everywhere. I suspect a problem in common plugin dialog implementation.

Gilles
Comment 2 Heiner Lamprecht 2006-08-24 11:58:12 UTC
I changed the type of the variable "size" in "int DImg::allocateData()" from int to ullong, and it seems to help a lot:

  ullong size = m_priv->width * m_priv->height * (m_priv->sixteenBit ? 8 : 4);

instead of:

  int size = m_priv->width * m_priv->height * (m_priv->sixteenBit ? 8 : 4);

I'm not 100% sure, because the crash only occured randomly.  But while stressing digikam, nothing happend.

The only crashes still remaining are related to debugging information.  They occur in lines, where kdDebug() is called.  I'll keep on investigating on this.


    Heiner
Comment 3 caulier.gilles 2006-08-24 12:06:17 UTC
This crash is strange, because it only appear with only one image plugins dialog type (here the common dialog used by Refocus, Noise Reduction, Unsharp Mask, etc.)

To have recently works many time with Add Border plugin witch use another common dialog type, no crash appear. Both dialog type use a separate thread to compute image manipulation algorithms.

I don't understand why your fix help a lot. The allocateData() method is used in both dialog (via the DImg class in fact). 

Marcel, can you reproduce this crash in your computer ?

Gilles
Comment 4 caulier.gilles 2006-08-24 12:07:47 UTC
Note: I suspect than the crash is relevant of gui event. This is why it can be difficult to reproduce it.

Gilles
Comment 5 Heiner Lamprecht 2006-08-24 17:12:23 UTC
On Thursday 24 August 2006 12:07, Gilles Caulier wrote:
>
> ------- Additional Comments From caulier.gilles free fr 
> 2006-08-24 12:07 ------- Note: I suspect than the crash is
> relevant of gui event. This is why it can be difficult to
> reproduce it.


Well, it is difficult ;-(

I removed most debugging lines (kdDebug() ...), which made the 
program somehow more stable.  But it still crashes a lot.  Working 
is nearly impossible at the moment.  I invested a lot in a new 
computer, and now this ;-(

Does anybody have any idea what to do or where to look at?  Are 
there any other users here, who have a x86_64 system?

My system:

uname -a
Linux tharbad 2.6.16.21-0.13-smp #1 SMP Mon Jul 17 17:22:44 UTC 2006 
x86_64 x86_64 x86_64 GNU/Linux

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 3
cpu MHz         : 2800.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr 
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm 
syscall lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr
bogomips        : 6030.80
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 3
cpu MHz         : 2800.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr 
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm 
syscall lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr
bogomips        : 6021.74
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:
Comment 6 Gerhard Kulzer 2006-08-24 22:13:32 UTC
Am Donnerstag, 24. August 2006 12:06 schrieb Gilles Caulier:
[bugs.kde.org quoted mail]

I had this crash from time to time since the 0.8 version. As far as I can 
remember it occured in refocus plugin only. The sensitivity never changed.

Gerhard

--
www.gerhard.fr
Comment 7 Marcel Wiesweg 2006-08-25 17:50:14 UTC
I have not been able to reproduce this here so far.
If anyone can reliably reproduce it, some debug statements in DImg::allocateData might help. But from the backtrace, width is 515 and height 805 which is all right.
Comment 8 caulier.gilles 2006-08-27 20:55:51 UTC
Marcel, i can reproduce the crash, and it's relevant of HyperThreading option enable in your computer (if you have)...

In fact, this bug is a dupplicate of #133026. Look my last comments in this file.

Gilles

*** This bug has been marked as a duplicate of 133026 ***
Comment 9 caulier.gilles 2019-07-28 01:46:04 UTC
Fixed with bug #133026