Results 1 to 9 of 9

Thread: Weather crashes GB PVR on MVP

  1. #1
    Join Date
    Feb 2006
    Location
    UK
    Posts
    98

    Weather crashes GB PVR on MVP

    Decided it was time to update Weather programe (from Weather to Weather 2 v1.1.0.3 ) but unfortunately once installed Weather 2 just causes MVP's to go really slow and then crash...

    Done some investigating and have two observations
    1) I don't have PVRX2 running (all access is via MVPs). Which means when MVP is switched on it forces Weather 2 data download which hangs - this does not happen if I open PVRX2

    2) Recurring error - "FATAL UNHANDLED EXCEPTION:: System.IO.IOException: The process cannot access the file 'C:\Program Files\Devnz\GBPVR\Plugins\weather2\<unique directory name>\weather.xml' because it is being used by another process."

    Also looks similar to this issue reported by steeb http://forums.nextpvr.com/showthread.php?t=44462

    Regards,
    Jon
    Server: HP ML150 G3, 8GB RAM, 4x500Gb and 2x250GB SATA Disks, Hauppage Nova-T
    Software: GBPVR running in XenServer 5.5 VM - Win2003 SP2, GBPVR v1.4.7, VLC v1.0.2,
    Dongle: mvpmc-dongle.bin (Sep08)
    Plugins: Music v1
    Other: Current ffmpeg build
    Clients: 3xHauppauge MediaMVP(H4 SCART) & 4PCs

  2. #2
    Join Date
    Nov 2006
    Location
    Pennsylvania, USA
    Posts
    809
    I'm not sure why there are MVP problems. I haven't had tons of time to dig into it yet.

    Is the MVP the only instance of Weather2? Or do you have multiple clients? The error you give indicates that something else is updating the weather.xml file at the same time. If you could post all the logs in the logs folder, I can see if something else is accessing at the same time.
    Last edited by scb147; 2010-01-10 at 02:59 PM.

  3. #3
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,182
    I think there are definite problems with Weather2 on the MVP and NMT,

    Some of the things you should be aware of

    - you start processing in the ctor when the connection isn't even active. You should only do this on activate or initialise

    - MVP and NMT instance share the same PC so they are all fighting for config.xml There can be many instances plus the PC on the same machine.

    - I see lots of Fatal Errors

    Martin

  4. #4
    Join Date
    Nov 2006
    Location
    Pennsylvania, USA
    Posts
    809
    Quote Originally Posted by mvallevand View Post
    I think there are definite problems with Weather2 on the MVP and NMT,

    Some of the things you should be aware of

    - you start processing in the ctor when the connection isn't even active. You should only do this on activate or initialise
    What is ctor? The constructor? If so, how do I get things loaded at startup, because Activate isn't called until the plugin is loaded. The "Update at Startup" option is suppose to allow the information to update at startup of PVRX2, instead of at activate time.

    Quote Originally Posted by mvallevand View Post
    - MVP and NMT instance share the same PC so they are all fighting for config.xml There can be many instances plus the PC on the same machine.
    This is my hangup then. How does my plugin know how many instances are running? I'm assuming I need something in my code that allows only 1 instance to update, while the other instances only load their information off what has already been downloaded.

    Quote Originally Posted by mvallevand View Post
    - I see lots of Fatal Errors
    Other than the Fatal System.IO.IOException?

  5. #5
    Join Date
    Mar 2007
    Location
    Hartland, VT USA
    Posts
    158
    >>How does my plugin know how many instances are running
    I'd use a Mutex. The first instance grabs the mutex and runs the update, everyone else just waits.
    When the mutex is released, the other instances should see the data is new and not attempt to re-update.

  6. #6
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,182
    Quote Originally Posted by scb147 View Post
    What is ctor? The constructor? If so, how do I get things loaded at startup, because Activate isn't called until the plugin is loaded. The "Update at Startup" option is suppose to allow the information to update at startup of PVRX2, instead of at activate time.
    It depends on your requirement. For the NMT and MVP I think the constructor is called three times. The server itself can run after "startup" for hours and even days without the device even being turned on.


    This is my hangup then. How does my plugin know how many instances are running? I'm assuming I need something in my code that allows only 1 instance to update, while the other instances only load their information off what has already been downloaded.
    I haven't run Weather2 but you seem to cache a lot of stuff in the GBPVR folder. I don't know how you determine when to reload the information but if you checked the cache info file's date and time multiple instances wouldn't be a problem.

    Other than the Fatal System.IO.IOException?
    I see other errors, but I can correlate that one to the MVP/NMT session dieing which is causing frustration for client users.

    Martin

  7. #7
    Join Date
    Nov 2006
    Location
    Pennsylvania, USA
    Posts
    809
    Quote Originally Posted by mvallevand View Post
    It depends on your requirement. For the NMT and MVP I think the constructor is called three times. The server itself can run after "startup" for hours and even days without the device even being turned on.
    Why would the constructor get called three times? Shouldn't each MVP/NMT device only call a constructor one time?

    Quote Originally Posted by mvallevand View Post
    I haven't run Weather2 but you seem to cache a lot of stuff in the GBPVR folder. I don't know how you determine when to reload the information but if you checked the cache info file's date and time multiple instances wouldn't be a problem.
    I store local copies of the weather data, and the maps. This way, if PVRX2 is exited, and then entered before the next update time, it can just load from the local disk, instead of having to download all the stuff again. The only time I use the file date/time to update is at startup. Then I have a Timer that then handles updates.

    Quote Originally Posted by mvallevand View Post
    I see other errors, but I can correlate that one to the MVP/NMT session dieing which is causing frustration for client users
    If this is just since I've added update at startup, then I should suggest MVP/NMT users to use V1.1.0.0, as this doesn't have that capability.

    I haven't really dealt with multi-thread programs before, so this is mostly new to me. So like InVermont suggested, I should put a mutex on my update thread, so only one process is in that code at a time. I need to do some code re-work because I think my update process is a mess.

    Thanks for the info Martin.

  8. #8
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,182
    This problem is definitely not just at Startup, at Startup the client isn't even running.

    Martin

  9. #9
    Join Date
    Mar 2006
    Location
    Carterton, NZ
    Posts
    3,022
    I can confirm I was having some update related crashes on the NMT with the old version but I didn't have the time to investigate what was causing it, so it's not just started with the new version.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •