After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643389 - Error opening some types of previously saved files
Error opening some types of previously saved files
Status: RESOLVED FIXED
Product: gnome-subtitles
Classification: Other
Component: sublib
unspecified
Other All
: High normal
: ---
Assigned To: Maintainers of GNOME subtitles
Maintainers of GNOME subtitles
Depends on:
Blocks:
 
 
Reported: 2011-02-27 02:35 UTC by Pawel57
Modified: 2011-09-19 23:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
samples (8.24 KB, application/x-7z-compressed)
2011-02-28 22:21 UTC, Pawel57
  Details
Proposed patch for #643389 (19.67 KB, patch)
2011-06-06 19:56 UTC, Pawel57
none Details | Review
Revised proposed patch for #643389 (23.21 KB, patch)
2011-06-16 00:11 UTC, Pawel57
none Details | Review

Description Pawel57 2011-02-27 02:35:07 UTC
Some types of subtitles written by the Gnome-Subtitles to a file, then they are not recognized at the opening. Applies to:
MPSub.sub
PhoenixJapanimationSociety.pjs
Sofni.sub
SubCreator1x.txt

Type AQTitle.aqt opens, but it looks very bad;-)
Comment 1 Pedro Castro 2011-02-27 20:21:15 UTC
Pawel, can you attach some examples?
Comment 2 Pawel57 2011-02-28 22:21:11 UTC
Created attachment 182139 [details]
samples
Comment 3 Pawel57 2011-02-28 22:22:38 UTC
I enclose examples obtained in the configuration:
WinXP_PL> VMware Player> Ubuntu10.10PL> Gnome-Subtitles1.1.0.3

Very quickly, you can test the conversion with the help SubLibGUI [Windows]
http://sourceforge.net/projects/streaman/files/Useful_Tools/SubLib/

Click the "All Formats". The results are identical.

Interesting fact: for conversion to MPsub, from  “\gnome-subtitles\etc\samples\
CC Mayer and Bette Animation.srt” opens correctly and on my test file will not open!
Comment 4 Pawel57 2011-06-04 11:53:18 UTC
I fixed those bugs now.
Most of the mistakes come from the decimal point, others is redundant or missing characters in file formats.
By the way I discovered a few other bugs, so cumulative patch send you a little later.

In all the formats I want to improve:
at the input - more liberal treatment the decimal separator - "[,.]"
at the output - more restrictive treatment the decimal separator - "\." , so as to _not_ use System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator.
Comment 5 Pawel57 2011-06-06 19:56:15 UTC
Created attachment 189359 [details] [review]
Proposed patch for #643389 

I did as I wrote above.
They should therefore not encounter some problems (and like #642674).
Only (and the only one) floating point group ElapsedTime for MPsub uses CultureInfo.InvariantCulture in the input. But it's probably not a crime :-).
At the exit none.

Please do not hesitate to write to me if you will notice any similar errors.
Comment 6 Pawel57 2011-06-16 00:11:43 UTC
Created attachment 190008 [details] [review]
Revised proposed patch for #643389

I introduced amendments to AQTitle, MacSUB, SubCreator1x.
I added more comments and marked the place where you will have to come back, eg in connection with #652412.

It seems to me also reasonable to change the type FABSubtitler and AdobeEncoreDVD from time to frame based.
Notation "hh:mm:ss:ff" only looks like time, but it is a number (integer) of frames.
fn = (((hh*60)+mm)*60+ss)*FPS+ff

Cheers,
Paweł
Comment 7 Pedro Castro 2011-09-11 21:45:20 UTC
Hi there Pawel, and sorry for taking so long to reply and review your patches.

Thanks for your deep review of existing subtitle formats. You've found many bugs that really needed to be fixed.

You can review the committed changes here: http://git.gnome.org/browse/gnome-subtitles/ . If you still find some bug, or a change I forgot to apply, please tell me.

Those messages that should be displayed as warnings have been added as comments to the respective subtitle format class, and mentioned in bug #653677. I've also opened bug #658765 to deal with support for empty lines.

Regarding Adobe Encore DVD and FAB Subtitler, the "Times" is needed for the parser to detect the parsing groups used. If we change to Frames, the only real benefit would be for "Frames mode" to be initially selected in Gnome Subtitles after opening these files. Btw, what do you mean with "Warning of necessary input the proper settings for FPS." ?

Thanks again.
Comment 8 Pawel57 2011-09-15 22:11:41 UTC
Hi Pedro!

Format Phoenix Japanimation Society does not work yet.
Text must be in quotes. Just as it corrected in the patch (id=190008).

It seems to me that it too soon this bug was closed.
As long as, a file saved by the GS can not be by GS opened, this bug is present.

Identified problems:
1. Empty lines - excluded to Bug #658765 Support files with empty lines
2. To more lines in text: KaraokeLyricsVKT, KaraokeLyricsLRC, Panimator, Sofni.
3. To long time: AdvancedSubStationAlpha, KaraokeLyricsLRC, Panimator, SubStationAlpha.
4. Negative time: MPSub, Panimator.
5. Special characters: '#' in MPSub

> Regarding AdobeEncoreDVD and FABSubtitler...
I'll open a new bug to exclude from this thread.

Cheers,
Paweł
Comment 9 Pedro Castro 2011-09-15 22:33:10 UTC
Pawel, thanks for noticing this. My fault for missing that part of your patch.

2. KaraokeLyricsVKT and KaraokeLyricsLRC don't support multiple lines, so this goes into bug #653677. Panimator actually had a problem with an extra blank line I've just fixed, but besides that, what problems with more lines do you see in Panimator and Sofni?

3. to 5. should also go into bug #653677.

Cheers
Comment 10 Pawel57 2011-09-15 23:31:50 UTC
Pedro, separate the two issues.

The formal standard and open a file by GS.
At the output - more restrictive - in accordance with the formal standard, can be corrected later. (Another matter that most often we don't have such formal detailed descriptions.)
At the input - more liberal - can allow much more. To just do not generate an error by GS.
And it is unacceptable that the error appeared when opening a file saved by GS.
I only check that case now.

Panimator and Sofni generate an error if the number of lines > 2.

Cheers,
Paweł
Comment 11 Pawel57 2011-09-15 23:57:57 UTC
Sorry.
Panimator and Sofni does not generate an error, just put lines > 2 (3, 4, ...) in the IncompleteSubtitles. But it is also a bug :-(
Comment 12 Pedro Castro 2011-09-17 12:26:02 UTC
(In reply to comment #11)
> Panimator and Sofni does not generate an error, just put lines > 2 (3, 4, ...)
> in the IncompleteSubtitles. But it is also a bug :-(
To be honest, I've considered removing that feature which I've never really used  in Gnome Subtitles. Can you detail what text appears in IncompleteSubtitles? Is it empty text?
Comment 13 Pawel57 2011-09-18 02:20:43 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Panimator and Sofni does not generate an error, just put lines > 2 (3, 4, ...)
> > in the IncompleteSubtitles. But it is also a bug :-(
> To be honest, I've considered removing that feature which I've never really
> used  in Gnome Subtitles.
Oh no! Only recently I started to use, and may prove more useful than you think.

> Can you detail what text appears in
> IncompleteSubtitles? Is it empty text?
No, usually not empty. It's hard to describe, you better check yourself.
Soon as possible, these:
http://sourceforge.net/projects/streaman/files/Useful_Tools/SubLib/
Comment 14 Pedro Castro 2011-09-18 21:07:05 UTC
Alright, Sofni and Panimator are now fixed. About incomplete subtitles, the best will be to create a new bug if text still appears as incomplete.
Comment 15 Pawel57 2011-09-19 17:52:11 UTC
Alright, Sofni and Panimator accept even the 4 lines :-)

But MACSub still only 2 :-(

Besides, due to too many lines, nothing jumps to the incomplete subtitles.

By the way, testing whether the incomplete subtitles is empty when you open the file, gives the important confirmation that all OK. If it contains whatever, could at least give a message to the user.
Comment 16 Pedro Castro 2011-09-19 21:32:15 UTC
Pawel, MacSUB is also fixed now. Did you detect any other error related to this bug?
Comment 17 Pawel57 2011-09-19 23:05:54 UTC
Everything OK. :-)