Author Topic: Possible bug: .idx files are not removed if the user cancels the indexing?  (Read 75 times)

archfrog

  • Newbie
  • *
  • Posts: 2
Hi,

First of: Thanks for a great tool! 

A friend of mine uses Avidemux virtually every day.  Today, he ran into an obscure problem: His movie was 28+ minutes long, but he couldn't move any farther than 8 minutes into the movie.  He called me and I first thought it was a bug in Avidemux, until I realized that there was an .idx file for the .TS file he was working on.  So I deleted the .idx file and let Avidemux regenerate it, after which the entire 28+ minutes could be accessed in Avidemux.

I don't know exactly what he did to break the .idx file, but I guess he simply cancelled the initial indexing operation or perhaps closed the program while it was indexing.  I'm not sure about this, but I think there is a tiny bug in Avidemux that it does not delete the partial .idx file if the user cancels the sometimes lengthy operation of generating it.

He uses Avidemux v2.7.1, Windows 10 x64.  But I am pretty sure that if the bug really exists, it exists on most platforms or at least in both Windows builds.

This just for your information as we now know how to deal with the issue :-)


Cheers,
Archfrog

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 2269
Re: Possible bug: .idx files are not removed if the user cancels the indexing?
« Reply #1 on: November 06, 2018, 03:01:26 PM »
This is a know issue which is sort of a feature at the same time (one can examine the index file if something goes wrong) of the MpegTS demuxer. The MpegPS demuxer in the current git master has been modified to delete the index file automatically on cancel. Both have their drawbacks.

archfrog

  • Newbie
  • *
  • Posts: 2
Re: Possible bug: .idx files are not removed if the user cancels the indexing?
« Reply #2 on: November 06, 2018, 05:36:26 PM »
Thanks for your reply!

Perhaps a better solution than to either keep or delete the partial index file would be to explicitly prompt the user if he or she wants to reuse a partial index file?  I.e. three cases:

1. Missing index file: Simple regenerate it.
2. Partial index file: Ask the user if he or she wants to regenerate it because it is incomplete.
3. Complete index file: Simply reuse it.

That way developers and advanced users get to keep their index file, while the casual or average user has a real chance of understanding why his or her movies are "shorter than expected".  The average user is probably not overly smart on programming and therefore has absolutely no clue why his or her movie appears shorter in Avidemux than in other movie tools (such as Windows Media Player).

This of course requires that Avidemux can somehow detect that an index file is incomplete/partial.

Just my two cents :-)


Cheers,
archfrog