Bug 498515

Summary: baloo_file_extractor not indexes a particular file
Product: [Frameworks and Libraries] frameworks-baloo Reporter: Igor Zhuravlov <zhuravlov.ip>
Component: Baloo File DaemonAssignee: baloo-bugs-null
Status: RESOLVED NOT A BUG    
Severity: normal CC: tagwerk19
Priority: NOR    
Version First Reported In: 5.102.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: PNG file which crashes baloo_file_extractor with SIGSEGV

Description Igor Zhuravlov 2025-01-11 03:52:59 UTC
Created attachment 177275 [details]
PNG file which crashes baloo_file_extractor with SIGSEGV

SUMMARY
baloo_file_extractor not indexes a PNG file attached.

STEPS TO REPRODUCE
1. Place a file attached to any folder which the Baloo is configured to index.
2. Or run `balooctl index` explicitly.

OBSERVED RESULT

> balooctl index /home/user/tmp/ic_folder_black_18dp.png
Indexing /home/user/tmp/ic_folder_black_18dp.png
File(s) indexed

> balooctl failed
The following files could not be indexed:
/home/user/tmp/ic_folder_black_18dp.png

EXPECTED RESULT
File must be indexed without problems, so `balooctl failed` command should output nothing.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 5.14.21-150500.55.88-default #1 SMP PREEMPT_DYNAMIC x86_64
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
The file attached is available online: https://github.com/jsoftware/gui_cobrowser/blob/master/bin/ic_folder_black_18dp.png
Comment 1 tagwerk19 2025-01-11 08:02:47 UTC
(In reply to Igor Zhuravlov from comment #0)
> SUMMARY
> baloo_file_extractor not indexes a PNG file attached.
I'm not able to reproduce - although I'm trying on more recent systems. I've tested on Neon Unstable which has frameworks 6.11.0 and
Fedora 40 that has Frameworks 6.5.0

There's always a chance that you've got a corrupt file, you can check with the PNG validator:
    http://www.libpng.org/pub/png/apps/pngcheck.html
However I've looked at the attached file and it seems OK (this is with F40...)
    $ pngcheck ic_folder_black_18dp.png 
    zlib warning:  different version (expected 1.3.0.zlib-ng, using 1.3.1.zlib-ng)
    OK: ic_folder_black_18dp.png (18x18, 16-bit grayscale+alpha, non-interlaced, 84.7%).

You can see what Baloo has indexed with
    $ balooshow -x ic_folder_black_18dp.png
and confirm that it only has a single version indexed
    $ baloosearch -i ic_folder_black_18dp.png
If baloosearch returns more than one hit, then something else is wrong...
Comment 2 Igor Zhuravlov 2025-01-11 08:22:05 UTC
The problem now is gone: this PNG file was indexed ok. What I've done:
1) simplified the Baloo config - reduced excluded directories list to a few;
2) purged the Baloo index DB;
3) rebooted PC.

Thank you for hints!