New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanner deadlocks on incorrectly identified files #476

Closed
adamcik opened this Issue Jul 22, 2013 · 2 comments

Comments

2 participants
@adamcik
Member

adamcik commented Jul 22, 2013

A file named anything.log with the following content blocks our scanner. Typefind things this is audio/mpeg, mpegversion=(int)1, layer=(int)1, probability=40 which is clearly wrong. And since we wait for the first audio data to get to the sink before trying the next file we get stuck.

Exact Audio Copy V1.0 beta 3 from 29. August 2011
Used drive  : hp      CDDVDW SN-208BB   Adapter: 0  ID: 1

Fix for this could simply be a per file timeout. Additionally we could consider a white and/or blacklist for extension to filter out files that are "obviously" wrong.

@adamcik

This comment has been minimized.

Member

adamcik commented Jul 30, 2013

Within next_uri we need:

  • A call to gobject.timeout_add(...) which registers a callback to process_timeout, this should be done as we start processing a new track, so in the end of the function.
  • Each time next_uri gets called, the first thing it needs to do is to de-register the previous timeout (if there is one) using gobject.source_remove(...)
  • process_timeout should be similar to process_error and should just reuse the same error callback for simplicity. Feel free to simplify the error callback signature to a single message argument as part of this. The timeout callback also needs to set the stored id that we would use to remove the source back to none so that next_uri doesn't try to remove a timeout that has been called.

As for the timeout size, it should probably just be a config variable scan_timeout or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment