Summary: | gwenview-1.2.0_pre4 quits randomly when browsing images forward and backward in full screen mode | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | polarbear <polar88bear> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | polar88bear |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
polarbear
2005-03-23 03:39:46 UTC
This has been already fixed in CVS. I have the same problem on 1.2 release version... is it resolved then??? gwenview: WARNING: [int GVImageUtils::inmem_fill_input_buffer(jpeg_decompress_struct*)] Image is incomplete Not a JPEG file: starts with 0xff 0xd9 SVN commit 427490 by gateau: - Reworked the JPEG error manager from jpegformattype a bit - Moved it to imageutils/jpegerrormanager.h - Use it in imageutils/jpegcontent.cpp BUG: 107737 CCBUG: 102239 M +3 -23 gvcore/jpegformattype.cpp M +2 -1 imageutils/Makefile.am M +22 -8 imageutils/jpegcontent.cpp A imageutils/jpegerrormanager.h [License: GPL (v2+)] --- trunk/extragear/graphics/gwenview/gvcore/jpegformattype.cpp #427489:427490 @@ -44,6 +44,7 @@ // Local #include "jpegformattype.h" +#include "imageutils/jpegerrormanager.h" namespace Gwenview { @@ -60,26 +61,6 @@ //----------------------------------------------------------------------------- // -// JPEGErrorManager -// (Does not follow HACKING naming recommandation to be consistent with -// jpeg_error_mgr naming) -// -//----------------------------------------------------------------------------- -struct JPEGErrorManager : public jpeg_error_mgr { - jmp_buf jmp_buffer; - - static void errorExitCallBack (j_common_ptr cinfo) { - JPEGErrorManager* myerr = (JPEGErrorManager*) cinfo->err; - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message)(cinfo, buffer); - kdWarning() << buffer << endl; - longjmp(myerr->jmp_buffer, 1); - } -}; - - -//----------------------------------------------------------------------------- -// // JPEGSourceManager // (Does not follow HACKING file recommandation to be consistent with // jpeg_source_mgr naming) @@ -211,15 +192,14 @@ // structs for the jpeglib jpeg_decompress_struct mDecompress; - JPEGErrorManager mErrorManager; + ImageUtils::JPEGErrorManager mErrorManager; JPEGSourceManager mSourceManager; }; JPEGFormat::JPEGFormat() { memset(&mDecompress, 0, sizeof(mDecompress)); - mDecompress.err = jpeg_std_error(&mErrorManager); - mErrorManager.error_exit=JPEGErrorManager::errorExitCallBack; + mDecompress.err = &mErrorManager; jpeg_create_decompress(&mDecompress); mDecompress.src = &mSourceManager; mState = INIT; --- trunk/extragear/graphics/gwenview/imageutils/Makefile.am #427489:427490 @@ -28,7 +28,8 @@ jpegcontent.h \ jinclude.h \ jpegint.h \ - transupp.h + transupp.h \ + jpegerrormanager.h METASOURCES = AUTO --- trunk/extragear/graphics/gwenview/imageutils/jpegcontent.cpp #427489:427490 @@ -45,6 +45,7 @@ #include "imageutils/imageutils.h" #include "imageutils/jpegcontent.h" #include "imageutils/jpeg-data.h" +#include "imageutils/jpegerrormanager.h" namespace ImageUtils { @@ -186,11 +187,15 @@ jpeg_saved_marker_ptr mark; // Init JPEG structs - struct jpeg_error_mgr jsrcerr; + JPEGErrorManager errorManager; - // Initialize the JPEG decompression object with default error handling - srcinfo.err = jpeg_std_error(&jsrcerr); + // Initialize the JPEG decompression object + srcinfo.err = &errorManager; jpeg_create_decompress(&srcinfo); + if (setjmp(errorManager.jmp_buffer)) { + kdError() << k_funcinfo << "libjpeg fatal error\n"; + return false; + } // Specify data source for decompression setupInmemSource(&srcinfo); @@ -370,17 +375,26 @@ // Init JPEG structs struct jpeg_decompress_struct srcinfo; struct jpeg_compress_struct dstinfo; - struct jpeg_error_mgr jsrcerr, jdsterr; jvirt_barray_ptr * src_coef_arrays; jvirt_barray_ptr * dst_coef_arrays; - // Initialize the JPEG decompression object with default error handling - srcinfo.err = jpeg_std_error(&jsrcerr); + // Initialize the JPEG decompression object + JPEGErrorManager srcErrorManager; + srcinfo.err = &srcErrorManager; jpeg_create_decompress(&srcinfo); + if (setjmp(srcErrorManager.jmp_buffer)) { + kdError() << k_funcinfo << "libjpeg error in src\n"; + return; + } - // Initialize the JPEG compression object with default error handling - dstinfo.err = jpeg_std_error(&jdsterr); + // Initialize the JPEG compression object + JPEGErrorManager dstErrorManager; + dstinfo.err = &dstErrorManager; jpeg_create_compress(&dstinfo); + if (setjmp(dstErrorManager.jmp_buffer)) { + kdError() << k_funcinfo << "libjpeg error in dst\n"; + return; + } // Specify data source for decompression d->setupInmemSource(&srcinfo); |