From 89cfdc1197b4f302d4444f4521a73515b8acb84d Mon Sep 17 00:00:00 2001 From: re2zero Date: Wed, 22 Oct 2025 16:06:58 +0800 Subject: [PATCH] chore: Update version to 1.5.7 and fix coredump issue - Updated version to 1.5.7 in changelog - Commented out debug logs to prevent coredump during application destruction - Added AI configuration directories to .gitignore Log: Update version and address stability issues. Bug: https://pms.uniontech.com/bug-view-337973.html --- .gitignore | 6 +++++- debian/changelog | 7 +++++++ src/dpdfannot.cpp | 16 ++++++++-------- src/dpdfdoc.cpp | 6 +++--- src/dpdfglobal.cpp | 11 ++++++----- src/dpdfpage.cpp | 6 +++--- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 4d3dfc1..2a9e666 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,8 @@ debian/*.log build/ -.vscode/ \ No newline at end of file +.vscode/ + +# AI configuration +.promptx/ +.spec-workflow/ \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 1076e1f..ddae482 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +deepin-pdfium (1.5.7) unstable; urgency=medium + + * update version to 1.5.7 + * fix: coredump when application destruction. + + -- re2zero Wed, 22 Oct 2025 15:25:13 +0800 + deepin-pdfium (1.5.6) unstable; urgency=medium * update version to 1.5.6 diff --git a/src/dpdfannot.cpp b/src/dpdfannot.cpp index 082ec5d..51a10a6 100644 --- a/src/dpdfannot.cpp +++ b/src/dpdfannot.cpp @@ -7,19 +7,19 @@ DPdfAnnot::AnnotType DPdfAnnot::type() { - qDebug() << "Getting annotation type:" << m_type; + // qDebug() << "Getting annotation type:" << m_type; return m_type; } void DPdfAnnot::setText(QString text) { - qDebug() << "Setting annotation text:" << text; + // qDebug() << "Setting annotation text:" << text; m_text = text; } QString DPdfAnnot::text() { - qDebug() << "Getting annotation text:" << m_text; + // qDebug() << "Getting annotation text:" << m_text; return m_text; } @@ -173,19 +173,19 @@ void DPdfLinkAnnot::setUrl(QString url) QString DPdfLinkAnnot::url() const { - qDebug() << "Getting link annotation URL:" << m_url; + // qDebug() << "Getting link annotation URL:" << m_url; return m_url; } void DPdfLinkAnnot::setFilePath(QString filePath) { - qDebug() << "Setting link annotation file path:" << filePath; + // qDebug() << "Setting link annotation file path:" << filePath; m_filePath = filePath; } QString DPdfLinkAnnot::filePath() const { - qDebug() << "Getting link annotation file path:" << m_filePath; + // qDebug() << "Getting link annotation file path:" << m_filePath; return m_filePath; } @@ -199,7 +199,7 @@ void DPdfLinkAnnot::setPage(int index, float left, float top) int DPdfLinkAnnot::pageIndex() const { - qDebug() << "Getting link annotation page index:" << m_index; + // qDebug() << "Getting link annotation page index:" << m_index; return m_index; } @@ -223,7 +223,7 @@ int DPdfLinkAnnot::linkType() const bool DPdfLinkAnnot::isValid() const { bool valid = (Goto == m_linkType) ? (m_index != -1) : true; - qDebug() << "Checking link annotation validity:" << valid; + // qDebug() << "Checking link annotation validity:" << valid; return valid; } diff --git a/src/dpdfdoc.cpp b/src/dpdfdoc.cpp index c5d68fb..b6675c7 100755 --- a/src/dpdfdoc.cpp +++ b/src/dpdfdoc.cpp @@ -132,18 +132,18 @@ DPdfDocPrivate::DPdfDocPrivate() DPdfDocPrivate::~DPdfDocPrivate() { DPdfMutexLocker locker("DPdfDocPrivate::~DPdfDocPrivate()"); - qDebug() << "Cleaning up DPdfDocPrivate resources"; + // qDebug() << "Cleaning up DPdfDocPrivate resources"; qDeleteAll(m_pages); if (nullptr != m_docHandler) { - qDebug() << "Closing PDF document handler"; + // qDebug() << "Closing PDF document handler"; FPDF_CloseDocument(reinterpret_cast(m_docHandler)); } if (!m_tempFilePath.isEmpty() && QFile::exists(m_tempFilePath)) { QFile::remove(m_tempFilePath); - qDebug() << "Temporary file deleted:" << m_tempFilePath; + // qDebug() << "Temporary file deleted:" << m_tempFilePath; } } diff --git a/src/dpdfglobal.cpp b/src/dpdfglobal.cpp index 3e28f9a..5e7d207 100755 --- a/src/dpdfglobal.cpp +++ b/src/dpdfglobal.cpp @@ -28,25 +28,26 @@ void DPdfGlobal::init() void DPdfGlobal::destory() { - qDebug() << "Destroying PDF library"; + // qDebug() << "Destroying PDF library"; if (initialized) { FPDF_DestroyLibrary(); initialized = false; - qDebug() << "PDF library destroyed successfully"; + // qDebug() << "PDF library destroyed successfully"; } else { - qDebug() << "PDF library was not initialized"; + // qDebug() << "PDF library was not initialized"; } } DPdfGlobal::DPdfGlobal() { - qDebug() << "Creating DPdfGlobal instance"; + // qDebug() << "Creating DPdfGlobal instance"; init(); } DPdfGlobal::~DPdfGlobal() { - qDebug() << "Destroying DPdfGlobal instance"; + // don’t print logs when application destruction which cause coredump + // qDebug() << "Destroying DPdfGlobal instance"; destory(); } diff --git a/src/dpdfpage.cpp b/src/dpdfpage.cpp index 682dfe4..1d2f9ff 100755 --- a/src/dpdfpage.cpp +++ b/src/dpdfpage.cpp @@ -149,14 +149,14 @@ DPdfPagePrivate::DPdfPagePrivate(DPdfDocHandler *handler, int index, qreal xRes, DPdfPagePrivate::~DPdfPagePrivate() { - qDebug() << "Destroying page private object for index:" << m_index; + // qDebug() << "Destroying page private object for index:" << m_index; if (m_textPage) { - qDebug() << "Closing text page"; + // qDebug() << "Closing text page"; FPDFText_ClosePage(m_textPage); } if (m_page) { - qDebug() << "Closing PDF page"; + // qDebug() << "Closing PDF page"; FPDF_ClosePage(m_page); }