Bug 100894 - Crash when entering Image Editor
Summary: Crash when entering Image Editor
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: DImg-Core (show other bugs)
Version: 0.7.2
Platform: Compiled Sources Other
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-05 16:04 UTC by Stephan van den Akker
Modified: 2022-01-08 05:10 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0
Sentry Crash Report:


Attachments
patch to fix imlib2 error (705 bytes, patch)
2005-04-06 03:24 UTC, Renchi Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan van den Akker 2005-03-05 16:04:37 UTC
Version:           0.7.2 (using KDE KDE 3.3.0)
Installed from:    SuSE RPMs
Compiler:          gcc 3.3.4 
OS:                Other

How to reproduce:

When viewing a picture 'full screen' in the Image Editor that is (almost) exactly the same width as the screen (1280 pixels in my case) the image editor crashes. No crash when Image Editor is not in full screen mode.

Expected behaviour: No Crash.

Anticipating your next question: My computer has imlib2 version 1.1.1-2.2 (installed through Online Update by SuSE some time ago).

KDE backtrace reports:
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1100186816 (LWP 12813)]
[KCrash handler]
#7  0x40731b4e in __imlib_RenderImage () from /usr/lib/libImlib2.so.1
#8  0x40713927 in imlib_render_image_part_on_drawable_at_size ()
   from /usr/lib/libImlib2.so.1
#9  0x401704f5 in Digikam::ImlibInterface::paintOnDevice ()
   from /opt/kde3/lib/libdigikam.so.0
#10 0x40173b98 in Canvas::paintViewport () from /opt/kde3/lib/libdigikam.so.0
#11 0x4017414c in Canvas::viewportPaintEvent ()
   from /opt/kde3/lib/libdigikam.so.0
#12 0x410c6c3a in QScrollView::eventFilter ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x40fa998e in QObject::activate_filters ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0x40fa9a70 in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x40fdeecf in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x40f4685f in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x40f48423 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x40bd8a91 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#19 0x40f127b0 in QWidget::repaint () from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0x40f47686 in QApplication::sendPostedEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40f47724 in QApplication::sendPostedEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40ef3890 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40f5e7b1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0x40f5e5f6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x40f482ef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x0804aa56 in main ()
Comment 1 Stephan van den Akker 2005-03-05 16:08:15 UTC
Errors in bugreport:
Digikam was compiled from source, not installed from SuSE RPM's.
OS = SuSE Linux 9.2
Comment 2 Renchi Raju 2005-03-06 17:07:15 UTC
the crash is inside libimlib2. upgrade to the latest available libimlib2 (1.2.0) and the problem should disappear.
Comment 3 Stephan van den Akker 2005-03-07 22:08:00 UTC
Upgraded to imlib2 version 1.2.0, but i'm afraid the problem remains...

KDE Backtrace now reports:
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1100157472 (LWP 22956)]
[KCrash handler]
#7  0x40728f6e in __imlib_RenderImage (d=0x80580a8, im=0x8d118f0, w=56627291, 
    m=0, v=0x805ca90, cm=32, depth=24, sx=256, sy=512, sw=128, sh=88, dx=0, 
    dy=0, dw=128, dh=128, antialias=1 '\001', hiq=1 '\001', blend=1 '\001', 
    dither_mask=0 '\0', cmod=0x8ce14f8, op=147921136) at rend.c:434
#8  0x40708df7 in imlib_render_image_part_on_drawable_at_size (
    source_x=147921136, source_y=147921136, source_width=147921136, 
    source_height=147921136, x=147921136, y=147921136, width=147921136, 
    height=147921136) at api.c:1912
#9  0x401704e5 in Digikam::ImlibInterface::paintOnDevice ()
   from /opt/kde3/lib/libdigikam.so.0
#10 0x40173b88 in Canvas::paintViewport () from /opt/kde3/lib/libdigikam.so.0
#11 0x4017413c in Canvas::viewportPaintEvent ()
   from /opt/kde3/lib/libdigikam.so.0
#12 0x410bfc3a in QScrollView::eventFilter ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x40fa298e in QObject::activate_filters ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0x40fa2a70 in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x40fd7ecf in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x40f3f85f in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x40f41423 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x40bd1a91 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#19 0x40f0ba96 in QWidget::repaint () from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0x40fdc421 in QWidget::repaint () from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40ece322 in QETWidget::translateConfigEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40edba22 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40eec908 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0x40f577b1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x40f575f6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x40f412ef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0x0804aa46 in main ()
Comment 4 Renchi Raju 2005-03-29 02:38:21 UTC
still the same source of error. to test it out i tried with exact same image size and screen dimensions. In my case, it doesn't crash, but it triggers a bug which causes a corrupted display. I had reported this problem earlier to the imlib2 authors and i had anticipated that the bug is fixed, but looks like its not :(. i'm in the process of removing imlib2 dependency from digikam and that should fix the problem. since this is not a digikam bug, but an imlib2 one, i am going to close this report
Comment 5 Stephan van den Akker 2005-04-05 20:27:30 UTC
I received the following message from the enlightenment crew:

The following issue has been RESOLVED.
======================================================================
<http://xcomputerman.com/bugs/view.php?id=275> 
======================================================================
Reported By:                stephan66
Assigned To:                raster
======================================================================
Project:                    Imlib2
Issue ID:                   275
Category:                   Other
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             03-13-2005 14:13 CST
Last Modified:              04-05-2005 05:09 CDT
======================================================================
Summary:                    Imlib2 crash on display of unscaled image in Digikam
Description: 
OS: SuSE Linux 9.2
Digikam 0.7.2 (using KDE KDE 3.3.0), using Imlib2 version 1.1.1 or 1.2.0
Digikam compiled from sources (gcc 3.3.4)
Imlib2 installed from SuSE RPM's (version 1.1.1) and upgraded with Packman
RPM's (version 1.2.0).

How to reproduce:

When viewing a picture 'full screen' in the Image Editor that is (almost)
exactly the same width as the screen (1280 pixels in my case) the image
editor crashes. No crash when Image Editor is not in full screen mode. 

When viewing a small picture in the Image Editor, and reducing the Image
Editor window to exactly the size of the image crashes Digikam.

Renchi Raju (Main developer of Digikam) reported to me that the problem is
in Imlib2, and upgrading to version 1.2.0 would make the problem
disappear. However, the problem remains. The problem could be related to
bug # 110.
======================================================================

----------------------------------------------------------------------
 raster - 04-05-05 05:09 
----------------------------------------------------------------------
0000008 0x40708df7 in imlib_render_image_part_on_drawable_at_size (
    source_x=147921136, source_y=147921136, source_width=147921136,
    source_height=147921136, x=147921136, y=147921136, width=147921136,
    height=147921136) at api.c:1912

see that bit of the backtrace - notice the co-ordinates are all
"completeyl bizarre" huge numbers? digikam is passing in completely bogus
values for these parameters and imlib2 is falling over itself trying to do
what it was asked to do.  :(  i'd suggest making sure that values passed
aren't bogus  :) 

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-13-05 14:13 stephan66      New Issue                                    
04-05-05 05:09 raster         Status                   new => resolved     
04-05-05 05:09 raster         Resolution               open => fixed       
04-05-05 05:09 raster         Assigned To               => raster          
04-05-05 05:09 raster         Note Added: 0000682                          
============================================================



Maybe this helps solve the problem,

Greetings,

Stephan van den Akker
Comment 6 Renchi Raju 2005-04-06 01:56:08 UTC
reopening with fresh info
Comment 7 Renchi Raju 2005-04-06 03:24:27 UTC
Created attachment 10524 [details]
patch to fix imlib2 error

the problem is with imlib2 (digikam is passing the correct values to imlib2 -
look at the first line in your backtrace, the values are reasonable). attached
is a patch which fixes the issue in imlib2 (essentially there was an
out-of-bound error in copying to a buffer and the jump used to access this
buffer). Please report to imlib2 authors
Comment 8 Renchi Raju 2005-04-06 03:25:43 UTC
upstream error. patch supplied
Comment 9 Renchi Raju 2005-05-08 19:04:19 UTC
*** Bug 105284 has been marked as a duplicate of this bug. ***
Comment 10 Renchi Raju 2005-05-16 17:42:37 UTC
*** Bug 105697 has been marked as a duplicate of this bug. ***
Comment 11 Renchi Raju 2005-07-10 22:20:56 UTC
*** Bug 108747 has been marked as a duplicate of this bug. ***
Comment 12 Renchi Raju 2005-08-20 06:49:36 UTC
*** Bug 111026 has been marked as a duplicate of this bug. ***
Comment 13 Tom Albers 2006-02-04 20:43:03 UTC
*** Bug 119580 has been marked as a duplicate of this bug. ***