Syntax error in line xxxx

Discussion in '1.2.x' started by vuego, July 16, 2012.

  1. vuego
    • Team MediaPortal

    vuego Documentation Group

    Joined:
    August 5, 2006
    Messages:
    1,551
    Likes Received:
    643
    Occupation:
    Alchemist, Astrobiologist, Exotic dancer
    Location:
    Göteborg
    Ratings:
    +847 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    MediaPortal Version: 1.2.3

    Description
    I started getting this error when playing a specific video file. I have several plugins installed and the error message doesn't give much clue of what the problem is. After clicking OK the video plays normally however I did not get any subtitles displayed. Turns out the .srt file was missing a decimal.

    Syntax error.png



    The error message isn't very HTPC friendly and doesn't help the user understand what's going on.
    Proposal: Skip the Windows popup window and instead display a message in MediaPortal's GUI which mentions that the subtitle won't be loaded. Even better would be if the subtitle reader could be smart enough to add the missing decimal :)

    Steps to Reproduce:
    Play a video with an external subtitle file that's missing a decimal like in this example:
    Code (Text):
    1. 1
    2. 00:00:05,000 --> 00:00:07,000
    3. No problem with this line.
    4.  
    5. 2
    6. 00:00:08 --> 00:00:13,000
    7. This line will make MP throw
    8. a Syntax Error message box.
    9.  
    Notice the missing ",000" on the second line.
    Attached log files and a sample .srt subtitle file.
     

    Attached Files:

    Last edited: July 16, 2012
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Scythe42
    • Team MediaPortal

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    15,852
    Likes Received:
    5,976
    Gender:
    Male
    Location:
    France
    Ratings:
    +9,863 / 9
    Home Country:
    France France
    Show System Specs
    Thanks for srt sample :)
     
  5. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    15,852
    Likes Received:
    5,976
    Gender:
    Male
    Location:
    France
    Ratings:
    +9,863 / 9
    Home Country:
    France France
    Show System Specs
    From my test on current branch fix, it seems that it's an error from MPC-HC Engine that lead to do not load .SRT.
    Testing with ffdshow engine and only culprit line is not displayed.
    Will try later with MPC-HC to confirm.
     
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    15,852
    Likes Received:
    5,976
    Gender:
    Male
    Location:
    France
    Ratings:
    +9,863 / 9
    Home Country:
    France France
    Show System Specs
    Hey,
    Was quick, i can confirm it's MPC-HC subtitle code to fix :)

    MPC-HC_Error_SRT.PNG

    So i assume the current fix it's when using subtitle renderer (TV side) :p
     
    • Like Like x 1
  7. Scythe42
    • Team MediaPortal

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
    Wrong location, but should be easy to apply the regex to C++ as well.

    Shouldn't the subtitle engine be updated in general first?
     
    • Like Like x 1
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    15,852
    Likes Received:
    5,976
    Gender:
    Male
    Location:
    France
    Ratings:
    +9,863 / 9
    Home Country:
    France France
    Show System Specs
    There is a branch with latest MPC-HC Engine, i have tested on it and on master and it's the same.
    I have ask MPC-HC guys to know if they can fix it :p
     
  9. Scythe42
    • Team MediaPortal

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
    Provide them with my regex. They can export it to C++ from Expresso and also test it in there on various SRT files.

    It's designed to load the whole file and then return the individual components in each matching block with captures.
     

    Attached Files:

    • srt.zip
      File size:
      1.2 KB
      Uploaded:
      December 21, 2012
      Views:
      279
    • Like Like x 1
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    15,852
    Likes Received:
    5,976
    Gender:
    Male
    Location:
    France
    Ratings:
    +9,863 / 9
    Home Country:
    France France
    Show System Specs
    • Like Like x 3
Loading...

Users Viewing Thread (Users: 0, Guests: 1)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!