Bug 227313 - Gwenview does not save rotated JPEG images (Gwenview::JPEGErrorManager::errorExitCallBack: Bogus virtual array access; libjpeg error in src;) [libjpeg8]
Summary: Gwenview does not save rotated JPEG images (Gwenview::JPEGErrorManager::error...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 218107 228158 232476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-17 04:58 UTC by TioDuke
Modified: 2012-10-19 13:26 UTC (History)
11 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TioDuke 2010-02-17 04:58:05 UTC
Version:            (using KDE 4.4.0)
Compiler:          gcc (GCC) 4.4.3 
OS:                Linux
Installed from:    Archlinux Packages

I was trying to change a JPEG image's orientation but the "Save" option does not seem to be working. The thumbnail that appears on gwenview looks as if the file has correctly been modified and going to the next picture in the folder and coming back to the "supposedly" modified JPEG shows the picture as if changes have been saved, but when opening the file in a new gwenview instance and/or another applications the image is shown unmodified.

This isn't happening with other image formats (GIFs, PNGs, etc.) or when doing "Save as".

I have run gwenview from the console and here is the relevant output:

gwenview(3154)/kio (KIOConnection) 
KIO::ConnectionServer::listenForRemote: Listening on  
"local:/tmp/ksocket-sergio/gwenviewqV3154.slave-socket"                
gwenview(3154)/kio (KDirListerCache) KDirListerCache::listDir: Entry 
currently being listed: KUrl("trash:/") by (KDirLister(0x8ffa3c0) ,  
KDirLister(0x9078b58) )                                                                               
gwenview(3154)/kio (KDirListerCache) KDirListerCache::listDir: Entry 
currently being listed: KUrl("trash:/") by (KDirLister(0x8ffa3c0) ,  
KDirLister(0x9078b58) )                                                                               
gwenview(3154)/kio (KDirListerCache) KDirListerCache::slotResult: 
finished listing KUrl("trash:/")                                                              
gwenview(3154)/kio (KDirListerCache) KDirListerCache::listDir: Listing 
directory: KUrl("file:///home/sergio")                                                   
gwenview(3154)/kio (Slave) KIO::Slave::createSlave: createSlave "file" 
for KUrl("file:///home/sergio")                                                          
gwenview(3154)/kio (KIOConnection) 
KIO::ConnectionServer::listenForRemote: Listening on  
"local:/tmp/ksocket-sergio/gwenviewuI3154.slave-socket"                
gwenview(3154)/kdecore (services) KMimeTypeFactory::parseMagic: Now 
parsing  "/usr/local/share/mime/magic"                                                      
gwenview(3154)/kdecore (services) KMimeTypeFactory::parseMagic: Now 
parsing  "/usr/share/mime/magic"                                                            
gwenview(3154)/kdecore (services) KMimeTypeFactory::parseMagic: Now 
parsing  "/home/sergio/.local/share/mime/magic"                                             
gwenview(3154)/kio (KDirListerCache) KDirListerCache::slotResult: 
finished listing KUrl("file:///home/sergio")                                                  
gwenview(3154) Gwenview::JPEGErrorManager::errorExitCallBack: Bogus 
virtual array access                                                                        
gwenview(3154): libjpeg error in src                                            
                                                                                
gwenview(3154)/kio (KDirListerCache) KDirListerCache::slotFileDirty: 
"/home/sergio/100_5338.jpegju3154.new"                                                     
gwenview(3154)/kio (KDirListerCache) KDirListerCache::slotFileDirty: 
"/home/sergio"                                                                             
gwenview(3154)/kio (KDirListerCache) KDirListerCache::updateDirectory: 
KUrl("file:///home/sergio")                                                              
gwenview(3154)/kio (KDirListerCache) KDirListerCache::updateDirectory: 
update started in KUrl("file:///home/sergio")                                            
gwenview(3154)/kio (KDirListerCache) KDirListerCache::slotUpdateResult: 
finished update KUrl("file:///home/sergio")                                             
gwenview(3154)/kio (KDirListerCache) KDirListerCache::forgetDirs: 
KDirLister(0x8fb6608)  item moved into cache:  
KUrl("file:///home/sergio")                    
gwenview(3154)/kio (KDirListerCache) KDirListerCache::forgetDirs: 
KDirLister(0x8ffa3c0)  item moved into cache:  KUrl("trash:/")                                
gwenview(3154)/kdecore (KConfigSkeleton) 
KCoreConfigSkeleton::writeConfig:      


And here you have my system configuration:

kernel: 2.6.32-ARCH
xorg: 1.7.4.901
kde sc: 4.4.0
kdegraphics-common: 4.4.0 (libkexiv2.so.8.0.0)
exiv2: 0.18.2 (libexiv2.so.5.3.1)
libjpeg: 8 (libjpeg.so.8.0.0)
libpng: 1.4 (libpng14.so.14.0.0)

If you need more information, please let me know.
Thank you in advance.
Comment 1 Dario Andres 2010-02-17 13:59:41 UTC
"
gwenview(3154) Gwenview::JPEGErrorManager::errorExitCallBack: Bogus 
virtual array access                                                            
gwenview(3154): libjpeg error in src                                            
"

- Do you know if gwenview (or the whole kdegraphics module) was recompiled after the libjpeg update ?

Regards
Comment 2 TioDuke 2010-02-17 15:41:09 UTC
Yes, KDE SC 4.4 came after the libjpeg/libpng update.

Also, JPEGs are correctly displayed and there are no crashes. Issuing ldd over kdegraphics-common files shows that libjpeg8 is being used.
Comment 3 Krzysztof Sachanowicz 2010-02-17 16:04:26 UTC
I can confirm this bug in Mandriva Cooker.
Comment 4 Dario Andres 2010-02-24 00:41:39 UTC
Bug 228158 notes that saving a cropping/resized image works, so this may be only related to rotation. Bug 228158 also contains another shell output log.
Comment 5 Dario Andres 2010-02-24 00:41:41 UTC
*** Bug 228158 has been marked as a duplicate of this bug. ***
Comment 6 k17031965 2010-02-27 13:31:20 UTC
Hallo

Ich have the same bug.

Gentoo 64bit
kde-base/kde-meta-4.3.3
kde-base/gwenview-4.3.3

Next night i upgrade on kde-base/kde-meta-4.3.5 and kde-base/gwenview-4.3.5
Comment 7 Eugene Shalygin 2010-02-27 13:52:04 UTC
The problem is the same as in this Gentoo bug: http://bugs.gentoo.org/show_bug.cgi?id=306297

I've updated the files in gwenview/lib/libjpeg/ with files from jpeg-8 and it fixed the bug
Comment 8 Aurelien Gateau 2010-02-27 15:06:13 UTC
I can't reproduce it. Can you attach an image which causes the problem?

Note that saving a resized/cropped image is not lossless and so does not use libjpeg directly. This probably explain why images are correctly saved in this case.
Comment 9 Dario Andres 2010-02-27 15:07:34 UTC
@Aurelien: at bug 228483, the Digikam devs are tracking the same(or similar) problem, if you want to look for help.
Comment 10 Unknown 2010-02-28 21:45:07 UTC
Same problem here (Gentoo x86, KDE 4.4.0).
Comment 11 Aurelien Gateau 2010-03-04 09:21:44 UTC
SVN commit 1098735 by gateau:

Use separate copies of libjpeg internal files depending on libjpeg version
BUG:227313

 M  +14 -2     CMakeLists.txt  
 A             libjpeg-62 (directory)  
 A             libjpeg-62/README.jpeg   libjpeg/README.jpeg#1098734
 A             libjpeg-62/jinclude.h   libjpeg/jinclude.h#1098734 [License: UNKNOWN]
 A             libjpeg-62/jpegint.h   libjpeg/jpegint.h#1098734 [License: UNKNOWN]
 A             libjpeg-62/transupp.c   libjpeg/transupp.c#1098734 [License: UNKNOWN]
 A             libjpeg-62/transupp.h   libjpeg/transupp.h#1098734 [License: UNKNOWN]
 A             libjpeg-80 (directory)  
 A             libjpeg-80/README.jpeg  
 A             libjpeg-80/jinclude.h   libjpeg/jinclude.h#1098734 [License: UNKNOWN]
 A             libjpeg-80/jpegint.h   libjpeg/jpegint.h#1098734 [License: UNKNOWN]
 A             libjpeg-80/transupp.c   [License: UNKNOWN]
 A             libjpeg-80/transupp.h   [License: UNKNOWN]
 D             libjpeg/README.jpeg  
 D             libjpeg/jinclude.h  
 D             libjpeg/jpegint.h  
 D             libjpeg/transupp.c  
 D             libjpeg/transupp.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1098735
Comment 12 Andreas K. Huettel 2010-04-12 23:34:14 UTC
This is likely not fixed by above commit.

But, it is a dupe of bug 218107...
Comment 13 Aurelien Gateau 2010-06-01 00:10:03 UTC
*** Bug 218107 has been marked as a duplicate of this bug. ***
Comment 14 FiNeX 2010-08-03 00:17:10 UTC
*** Bug 232476 has been marked as a duplicate of this bug. ***
Comment 15 Tom Max 2010-10-09 15:50:33 UTC
the bus is still present here, mandriva 2010.1, kde 4.4.3

tom@localhost ~]$ rpm -qa | grep gwen
lib64gwenviewlib4-4.4.3-3.1mdv2010.1
gwenview-4.4.3-3.1mdv2010.1

this is the error I can see in the console:

gwenview(4377) Gwenview::JPEGErrorManager::errorExitCallBack: Invalid crop request 
gwenview(4377): libjpeg error in src

the fix reported above (SVN commit 1098735 ) should be in 4.4.2,
but the problem is still present in 4.4.3 
( http://websvn.kde.org/tags/KDE/ )
Comment 16 Misha Aizatulin 2010-11-01 02:01:28 UTC
I'm using gwenview 2.4.3 (KDE 4.4.4, SuSE 11.3) and the problem still persists.