Prevent Server From Crashing If...
#1
Hey guys,

Would be ideal to add some error handling traps to prevent SWMC from crashing when the 'Recorded TV' directory is not accessible. The reason I ask is because I am using an ISCSI drive from my nas box. I am experiencing an issue right now with my nas where sometimes I must reboot it. Once I reboot it the drive goes offline from my htpc for a minute or two. ServerWMC can't access the folder on the drive so it crashes. I then have to add a mouse to fix it. I hate having to do all of that. Would it be ideal to just ignore the folder if missing after the server has successful started. Only check for the folder at start up. With the folder missing none of the clients can launch live tv anyway so whether it crashes or don't there would not be a downside. However, the upside will be it would be fully functional when the drive gets connected again without me having to manually start the application manually.

Or the server can monitor the folder status until it reconnects. I wouldn't like that idea too much since that would hurt my cpu. Big Grin
Reply
#2
I agree we really need to fix this, I didn't even know we had this issue. I really need you to provide a swmc log after you get this crash. If it really is a CTD you can get the log of the previous run in the debug tab by opening the log folder.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#3
Great. Now that I need to replicate this to send the log it refuses to happen. I really hate when that happens.

I think here's the real issue. Keyword "think'. The folder 'Recorded TV' is shared for ServerWMC to work. If it isn't shared the application crashes or throws an error about it. Sometimes when the drives disconnect and reconnects, it does not come back with the folder 'shared'. I have to manually share it again. Today, to send you the log I rebooted the nas box, the drive disappears and comes back with the folder still being shared and serverwmc did not crash.

If that is really the case, perhaps you can handle the folder sharing through the server without user's input. In that scenario whether the drive goes missing or not the share will still be there when it reconnects and also no need to worry about user getting the sharing part wrong. Here's the steps I have tried in windows and it seems to work. Keep in mind I need to do more testing.

1. Create a symbolic link in serverwmc directory to the "local Recorded TV folder path.
Code:
mklink /D "C:\Recorded TV" "R:\Recorded TV"
"in my case R drive
2. Share the symbolic link as a network share.
Code:
net share "Recorded TV"="C:\Recorded TV" /GRANT:Everyone,FULL
code]

Now you don't need the user to enter the network path to the recorded folder. You already know what is it so you can fill it out yourself.

hostname\Recorded TV

Let me know what you think.
Reply
#4
By the way doing so is causing serverwmc to through an error saying the unc path is wrong even though all the clients are still working and access the folder without an issue.

http://pastebin.com/raw.php?i=5iRgqPx0
Reply
#5
I have thought of doing this, but for some bizarre reason Windows requires admin privileges to create symbolic links. So you'd need to run swmc as admin to pull this off, maybe this is true of the net share command too.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#6
Yeah I saw that on the doc for symbolic link. I didn't have to deal with it since I turned UAC off long time ago. How about prompting the user to run the install as admin. Would that cause issue with automatic updates?

Also how does swmc determine if the unc path is correct? In my case it states that its wrong at start up but still works. We both know it's not wrong.
Reply

Logout Mark Read Team Forum Stats Members Help
Prevent Server From Crashing If...0