This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Strigi bugfix release?

Tags: None
(comma "," separated)
Perey
Registered Member
Posts
4
Karma
0
OS

Strigi bugfix release?

Wed Dec 01, 2010 3:46 pm
When can we look forward to a new release of Strigi? I ask because a particular bug in the FLAC indexer (Bug #234398) is causing me grief, but a fix was committed back in April. And so that you don't think me selfish, I'm sure there are a few other people who are looking forward to fixes made since 0.7.2 was released... :)

And just in case it helps anybody else, here's a more detailed description of my particular problem.
  • OS: Kubuntu 10.10 (KDE 4.5.1)
  • Symptom: The option "Enable Strigi Desktop File Indexer" (System Settings -> Desktop Search) kept unticking itself. Nepomuk search from Dolphin never turned up anything.
  • Investigation: I could manually turn Strigi on by ticking the aforementioned option and clicking Apply. The Search Service icon appeared in the tray. Clicking on it brought up the indexer's current status. This window would disappear, and (sometimes) a Nepomuk Service Stub crash window would pop up.
  • Observation: This would consistently happen just after it told me it was indexing a particular directory. I deleted two directories (both containing build files from one or another source package) that caused it to crash, but then it started crashing at a subfolder of Music.
  • Google Is Your My Friend: I found the aforementioned bug. I also installed strigi-tools and used xmlindexer to confirm the crash was being caused by my FLAC files -- every FLAC file tested produced this output:
    Code: Select all
    $ xmlindexer SomeFile.flac
    <?xml version='1.0' encoding='UTF-8'?>
    <metadata>
    Floating point exception
  • Workaround: I've added "*.flac" to the indexing exclusions. :( I'm also digging into the source code(!) and the FLAC spec(!!) to see if the problem is only with some FLAC files and can therefore be worked around another way.

EDIT: All right, I've got it figured out. The problem is that I have FLAC files that have "unknown" samples listed in their metadata. If these FLACs had just been created with the number of samples specified, all would be well. Unfortunately just re-encoding with the flac command-line tool doesn't work; it doesn't like having an unknown number of samples any more than Strigi does. However, there's a fix on the Doom9 forums (scroll down to Kweek's post dated 26th June 2007, 17:15). I've adapted the steps there to produce a shell script that will fix all "unknown sample count" FLACs in the current directory.
Code: Select all
#!/bin/bash
# Fix FLAC files that have a sample count of "unknown" (0) in their metadata.
# Such FLAC files cause Strigi (as of 0.7.2) to crash (due to division by
# zero) and also don't agree with the command-line flac encoder.
# Fix found at http://forum.doom9.org/archive/index.php/t-125966.html

for flac in *.flac; do
    # How many samples does this file say it has?
    scount=`metaflac --show-total-samples "$flac"`

    if [ $scount -eq 0 ]; then
        # This file needs fixing!
        echo "Needs fixing: $flac"

        # These files will hold the data
        meta=`mktemp`
        raw=`mktemp`
        echo "  Metadata in $meta, audio in $raw"

        # Back up the existing file
        cp -p "$flac" "$flac~"
        echo "  Backup created"

        # Get the FLAC's important statistics
        srate=`metaflac --show-sample-rate "$flac"`
        chan=`metaflac --show-channels "$flac"`
        bps=`metaflac --show-bps "$flac"`
        echo "  $srate Hz, $chan channels, $bps bits per second"

        # Dump the metadata and raw audio
        echo "  Dumping..."
        metaflac --export-tags-to=$meta "$flac"
        flac -s -d "$flac" -f -o $raw --force-raw-format --endian=little --sign=signed

        # Recreate the file
        echo "  Recreating..."
        flac -s --best --force-raw-format --endian=little --sample-rate=$srate --channels=$chan --bps=$bps --sign=signed -f -o "$flac" - < $raw
        metaflac --import-tags-from=$meta "$flac"

        # Keep original modification time
        touch --reference="$flac~" "$flac"
    fi
done
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Strigi bugfix release?

Fri Dec 03, 2010 4:37 am
I would suggest contacting the maintainer of Strigi, Jos van den Oever for this information.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Perey
Registered Member
Posts
4
Karma
0
OS

Re: Strigi bugfix release?

Sat Dec 04, 2010 4:41 pm
Ah, thanks. I wasn't certain who the maintainer was; Jos van den Oever's Strigi webpage points to the (outdated) Sourceforge page, and the Ubuntu package page doesn't list him either. And since I noticed a fair bit of Strigi dialogue going on here (including the developer who fixed the bug I mentioned ;) ), I thought I'd post my question and workaround here.

I've contacted Jos now.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell