Syntax error in line xxxx (1 Viewer)

vuego

Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,637
    764
    Göteborg
    Home Country
    Sweden Sweden
    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:
    1
    00:00:05,000 --> 00:00:07,000
    No problem with this line.
     
    2
    00:00:08 --> 00:00:13,000
    This line will make MP throw
    a Syntax Error message box.
    Notice the missing ",000" on the second line.
    Attached log files and a sample .srt subtitle file.
     

    Attachments

    • test.swe.srt.zip
      277 bytes
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    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
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    Wrong location, but should be easy to apply the regex to C++ as well.

    Shouldn't the subtitle engine be updated in general first?
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    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
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    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.
     

    Attachments

    • srt.zip
      1.2 KB

    Users who are viewing this thread

    Top Bottom