NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) XSuite (Xrecord, XSearch, XGuide, CDK Scheduler) v
1 2 3 4 Next »
Old problem... simple fix? index out of bounds

 
  • 0 Vote(s) - 0 Average
Old problem... simple fix? index out of bounds
JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#1
2008-09-20, 04:51 PM
I must have some garbage in a saved video, because XRecord stopped being able to load my archived videos ages ago...

Figured I would try again, and am still seeing the same behavior.

From the log:
Code:
2008-09-20 09:44:38.161    INFO    [1]    xxx = C:\Program Files\Devnz\GBPVR\media\art\camp rock.mix
2008-09-20 09:44:38.270    VERBOSE    [1]    ReturnToMainMenu()
2008-09-20 09:44:38.270    VERBOSE    [1]    XRecord is currently active
2008-09-20 09:44:38.270    VERBOSE    [1]    XRecord.Deactivate() called
2008-09-20 09:44:38.301    VERBOSE    [1]    ReturnToMainMenu()@2
2008-09-20 09:44:38.301    VERBOSE    [1]    System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at RecordingViewerPlugin.ShowImportData..ctor(String strFile)
   at RecordingViewerPlugin.XVideoRecordingsBox.searchDirectories(String directory, ArrayList ignoreList)
   at RecordingViewerPlugin.XVideoRecordingsBox.searchDirectories(String directory, ArrayList ignoreList)
   at RecordingViewerPlugin.XVideoRecordingsBox.initialize()
   at RecordingViewerPlugin.RecordingTask.initializeDatabase()
   at RecordingViewerPlugin.RecordingTask.render(Boolean& requiresMoreRendering)
   at GBPVRX2.MenuTask.x9006c1ed9ccb79de.GetRenderList()
   at GBPVRX2.x0061b801bdf12d35.xdb012c437aec4a40(Boolean xd23bf32f3b17e3be)
   at GBPVRX2.x0061b801bdf12d35.xdae9991ab918b397(Object xdf2e3583f942db7b, KeyEventArgs xc4f45905cb1fc7ba)
   at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at GBPVRX2.x0061b801bdf12d35.WndProc(Message& m)

Its barfing in showimportdata... It would be cool if instead of bombing out when it ran into something it didn't like, it just tossed that show info (or otherwise gracefully handled it)

I'm happy to enable more logging/debugging if that will help.
fla
Offline

Posting Freak

Posts: 804
Threads: 39
Joined: Mar 2006
#2
2008-09-20, 06:42 PM
I got a similar crash once for the reason mentionned here. It's possible some of your ".dat" files have carriage returns, line feeds and tabs in program descriptions. Is your EPG coming from xmltv import? GBPVR's xmltv import does not cleanup these bad characters and xsuite just trusts the data in gbpvr.db3 and stores it in a ".dat" file.

I just looked at my dat files with notepad and cleaned up the ones like this:

description=

[INDENT]The Daily[/INDENT]

Show

and fixed them to look like this:

description=The Daily Show

I ran xrecord in the debugger and easily identified the bad dat file. If you have many dat files and can't find the bad one, you can zip them (just the .dat not the media) and I could easily do the same for yours. I don't have the time with work to make a new xsuite version these days.

The problem never came back so my xmltv source must have suffered from a temporary bug.
JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#3
2008-09-22, 09:28 PM
Ok, I will use grep to find the bad data... Thanks (sorry to hear about no new versions... really like xsuite)
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#4
2008-09-24, 04:55 AM
JohnInSJ Wrote:sorry to hear about no new versions... really like xsuite

Just a "me too" on this. My fave plugin besides Moviewiz. Still works though ... :-)

k.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
yofive
Offline

Junior Member

Posts: 24
Threads: 5
Joined: Mar 2007
#5
2008-09-25, 02:06 AM (This post was last modified: 2008-09-25, 02:39 AM by yofive.)
Quick question for the Newbie. How do I use debug mode to find to corrupt .dat file? I would totally appreciate it since I use only Xrecord. Thanks in advance! steve

Also, I have having serious trouble getting Xrecord to work again. It continues to give me the "Index was outside the bounds of the array" error. Can anybody take a quick look at my logs to see what the problem is? I would really appreciate it.
fla
Offline

Posting Freak

Posts: 804
Threads: 39
Joined: Mar 2006
#6
2008-09-26, 04:42 AM
There must be a bad .dat file in one of the video paths that xrecord is searching but the logs don't show the problematic filename. If you zip the dat files I could take a look. The source code for XRecord is on sourceforge so it's not a debug mode that's available unless you download the code and build XRecord.

If I have time I might create a version with more robust .dat file reading.
JohnInSJ
Offline

Member

Posts: 172
Threads: 31
Joined: Dec 2005
#7
2008-09-29, 04:35 PM (This post was last modified: 2008-09-29, 04:55 PM by JohnInSJ.)
Ah, source is on sourceforge... lemme take a quick peek.

Edit...

Could you not protect us from death by bad data simply by adding a try/catch block?
Code:
public ShowImportData(string strFile)
{
    TextReader outputReader = new StreamReader(strFile);
    try {
      // rest of current code lines 54-131 goes here
    }
    catch(Exception) // catches without assigning to a variable
    {
        //  put some default values in
        // dunno what is needed, if anything
                title        = strFile;
               description  = "WARNING: bad data in .dat file, skipped!";
                fullfilename = "";
                filename     = "";
                starttime    = "";
                endtime      = "";
                channel      = "";
                subtitle     = "";
                recordedtime = "";
                image = "";
    }
    // line 132-end goes here
I could do the checkout/build/post dance if you want, but it might be easier for you to do... An alternative to the above is to move the try/catch inside of the while loop, but this should work and at least allow XRecord to load up the files and just provide no data for those with borked .dat files.
yofive
Offline

Junior Member

Posts: 24
Threads: 5
Joined: Mar 2007
#8
2008-10-11, 02:29 AM
thank you both. I have isolated to corrupt file via trial and error and can't find anything wrong with the .dat file. However, after deleting it, my xrecord is back up and running. Is there any short .bat type file I could run on a dir to detect a corrupt .dat file or is that too difficult of a thing? Cheers, steve
fla
Offline

Posting Freak

Posts: 804
Threads: 39
Joined: Mar 2006
#9
2008-10-11, 12:56 PM
Can you post the bad .dat file so I can see what went wrong? A new version of XRecord that doesn't crash on bad .dat files is good but also avoiding generating new bad .dat files would be even better.
fla
Offline

Posting Freak

Posts: 804
Threads: 39
Joined: Mar 2006
#10
2009-03-07, 03:58 PM
This is fixed now. The bad dat file names should now appear in the UI and logs and it shouldn't crash anymore. It only took 6 months. :o I should work at Microsoft...
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Digital VS analog recording problem skreien 1 2,476 2008-05-01, 12:55 AM
Last Post: KingArgyle
  Problem installing on 1.0.16? dshoup 8 3,219 2007-12-14, 04:02 AM
Last Post: fla

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode