| Summary: | kpdf crashes after clicking on "print preview". | ||
|---|---|---|---|
| Product: | [Unmaintained] kpdf | Reporter: | GMkl <gerald> |
| Component: | general | Assignee: | Albert Astals Cid <aacid> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | This file leads to crash on "print preview" | ||
|
Description
GMkl
2006-06-28 15:33:41 UTC
Created attachment 16818 [details]
This file leads to crash on "print preview"
Maybe there is a correspondance to bug #118303. SVN commit 555943 by aacid:
Reset the jpeg structures on reset.
BUGS: 129971
Fix will be on KDE 3.5.4
M +18 -7 DCTStream.cc
M +2 -0 DCTStream.h
--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/DCTStream.cc #555942:555943
@@ -54,7 +54,16 @@
DCTStream::DCTStream(Stream *strA):
FilterStream(strA) {
-
+ init();
+}
+
+DCTStream::~DCTStream() {
+ jpeg_destroy_decompress(&cinfo);
+ delete str;
+}
+
+void DCTStream::init()
+{
jpeg_create_decompress(&cinfo);
src.pub.init_source = str_init_source;
src.pub.fill_input_buffer = str_fill_input_buffer;
@@ -68,18 +77,20 @@
cinfo.src = (jpeg_source_mgr *)&src;
cinfo.err = jpeg_std_error(&jerr);
x = 0;
+ row_buffer = NULL;
}
-DCTStream::~DCTStream() {
- jpeg_destroy_decompress(&cinfo);
- delete str;
-}
-
void DCTStream::reset() {
int row_stride;
str->reset();
-
+
+ if (row_buffer)
+ {
+ jpeg_destroy_decompress(&cinfo);
+ init();
+ }
+
// JPEG data has to start with 0xFF 0xD8
// but some pdf like the one on
// https://bugs.freedesktop.org/show_bug.cgi?id=3299
--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/DCTStream.h #555942:555943
@@ -62,6 +62,8 @@
Stream *getRawStream() { return str; }
private:
+ void init();
+
unsigned int x;
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
|