https://bugs.kde.org/show_bug.cgi?id=490203

            Bug ID: 490203
           Summary: Skanpage immediately crashes if you import a PDF
    Classification: Applications
           Product: Skanpage
           Version: 24.05.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: a.stipp...@gmx.net
          Reporter: skierp...@gmail.com
  Target Milestone: ---

Created attachment 171618
  --> https://bugs.kde.org/attachment.cgi?id=171618&action=edit
trivial PDF (exported from LibreOffice Writer) that crashes Skanpage on import

SUMMARY
See Summary

STEPS TO REPRODUCE
1. Open Skanpage
2. Click Import
3. Navigate to a PDF and open

OBSERVED RESULT
Immediate crash. I repeated with a different PDF.
The KDE Crash Reporter started up both times. The first time I don't know where
the report went, the second time I tried to see the backtrace and it overloaded
my 8GB Thinkpad, so I killed it.
I ran skanpage a third time under gdb and imported the attached trivial PDF,
and here's the partial backtrace:

Thread 1 "skanpage" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f8f28d in KSaneCore::Option::value (this=0x0) at
/usr/src/debug/ksanecore-24.05.0-1.fc40.x86_64/src/option.cpp:116
116         if (d->option != nullptr) {                                         
Missing separate debuginfos, use: dnf debuginfo-install
skanpage-24.05.0-1.fc40.x86_64
(gdb) bt
#0  0x00007ffff7f8f28d in KSaneCore::Option::value (this=0x0) at
/usr/src/debug/ksanecore-24.05.0-1.fc40.x86_64/src/option.cpp:116
#1  0x000055555558fb98 in Skanpage::importFile (this=0x7fffffffd720,
fileUrl=...)
    at /usr/src/debug/skanpage-24.05.0-1.fc40.x86_64/src/Skanpage.cpp:691
#2  Skanpage::qt_static_metacall (_o=0x7fffffffd720, _c=<optimized out>,
_id=<optimized out>, _a=0x7fffffff9cd8)
    at
/usr/src/debug/skanpage-24.05.0-1.fc40.x86_64/redhat-linux-build/src/skanpage_autogen/include/moc_Skanpage.cpp:463
#3  0x0000555555591574 in Skanpage::qt_metacall (this=0x7fffffffd720,
_c=QMetaObject::InvokeMetaMethod, _id=33, _a=0x7fffffff9cd8)
    at
/usr/src/debug/skanpage-24.05.0-1.fc40.x86_64/redhat-linux-build/src/skanpage_autogen/include/moc_Skanpage.cpp:631
#4  0x00007ffff63b3caa in QQmlObjectOrGadget::metacall
...

EXPECTED RESULT
1. Don't crash.
2. At a minimum Skanpage should detect mime type, sniff the file, etc. and warn
something like "Unsupported file type (application/pdf); supported image types
include JPG, PNG, ..." I don't know if it should have a "[Proceed to scan
anyway]" button.
3. (Enhancement) Skanpage should support PDF files.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.1.2
KDE Frameworks Version:  6.3.0
Qt Version: 6.7.2 (built against 6.7.1)

ADDITIONAL INFORMATION
 gImageReader (gimagereader-qt5) can scan PDFs fine. It's probably using
libpoppler to render PDF files and examine their structure to directly extract
any text.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to