SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Clients Development

Notices

SageTV Clients Development This forum is for discussions relating to SageTV Open Source Clients Development.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-21-2017, 01:50 PM
nyplayer nyplayer is online now
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,818
SagetvMiniClient Crashing....on ShieldTV.

Since the latest release of the Windows Sage ... The MiniClient when going into Videos Folders it crashes.... Running on my ShieldTV.

log attached.... see bottom of the log.
Attached Files
File Type: zip sagetv_0.zip (171.3 KB, 147 views)
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 08-21-2017 at 01:52 PM.
Reply With Quote
  #2  
Old 08-21-2017, 03:13 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by nyplayer View Post
Since the latest release of the Windows Sage ... The MiniClient when going into Videos Folders it crashes.... Running on my ShieldTV.

log attached.... see bottom of the log.
Are you able to test using a placeshifter? Just trying to narrow down if this is an Android issue or a server issue?
Reply With Quote
  #3  
Old 08-21-2017, 03:14 PM
nyplayer nyplayer is online now
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,818
Quote:
Originally Posted by stuckless View Post
Are you able to test using a placeshifter? Just trying to narrow down if this is an Android issue or a server issue?
Yes I can will post back.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #4  
Old 08-21-2017, 03:33 PM
nyplayer nyplayer is online now
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,818
Update it works on PlaceShifter.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #5  
Old 08-22-2017, 05:44 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by nyplayer View Post
Update it works on PlaceShifter.
That's good to know... we can focus on Android... Sadly, though, that going to make it harder Google has locked down the log file access, so it's pretty hard to get logs on an android device.

When it crashes, do you get the option to send a crash report? If so, do that, and it will send me the logs.

I see some tools like this..
https://play.google.com/store/apps/d...rg.jtb.alogrec
That appear to redirect the logcat output to the sdcard, not sure if that can help us get the logs or not. But somehow, we'll need to get the logging info.

The MiniClient has a settings option to write the log to sdard, but that's only helpful if I'm catching the and logging the error, which in this case, I'm not (since it's crashing)
Reply With Quote
  #6  
Old 08-22-2017, 09:10 AM
nyplayer nyplayer is online now
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,818
Quote:
Originally Posted by stuckless View Post
That's good to know... we can focus on Android... Sadly, though, that going to make it harder Google has locked down the log file access, so it's pretty hard to get logs on an android device.

When it crashes, do you get the option to send a crash report? If so, do that, and it will send me the logs.

I see some tools like this..
https://play.google.com/store/apps/d...rg.jtb.alogrec
That appear to redirect the logcat output to the sdcard, not sure if that can help us get the logs or not. But somehow, we'll need to get the logging info.

The MiniClient has a settings option to write the log to sdard, but that's only helpful if I'm catching the and logging the error, which in this case, I'm not (since it's crashing)
This is the log from the miniClient.
Attached Files
File Type: zip sagetv-miniclient.zip (18.8 KB, 139 views)
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #7  
Old 08-22-2017, 09:44 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by nyplayer View Post
This is the log from the miniClient.
You have hit this issue
https://github.com/OpenSageTV/sagetv...ient/issues/73

sagetv gives me a filename in which to cache the image from the server... this filename is too large for android, and I'll need to find another caching strategy. I just don't know of a good reliable strategy, yet. I open to suggestions. I can use a hash, but a hash may result in collisions

In your case the image filename is...

Code:
file-C3a5cProgram20Files2028x86295cSageTV5cSageTV5cGeneratedThumbnails5cNAS2dBE2dB82d48backupVIDEOSAdventures20of20Superman20195220Complete20SeriesAdventures20of20Superman20Season202Adventures20of20Superman202d202x01202d20Five20Minutes20To20Doomavi2ejpg-1498275906000-512-384
Reply With Quote
  #8  
Old 08-22-2017, 09:55 AM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by stuckless View Post
You have hit this issue
https://github.com/OpenSageTV/sagetv...ient/issues/73

sagetv gives me a filename in which to cache the image from the server... this filename is too large for android, and I'll need to find another caching strategy. I just don't know of a good reliable strategy, yet. I open to suggestions. I can use a hash, but a hash may result in collisions

In your case the image filename is...

Code:
file-C3a5cProgram20Files2028x86295cSageTV5cSageTV5cGeneratedThumbnails5cNAS2dBE2dB82d48backupVIDEOSAdventures20of20Superman20195220Complete20SeriesAdventures20of20Superman20Season202Adventures20of20Superman202d202x01202d20Five20Minutes20To20Doomavi2ejpg-1498275906000-512-384
Would a quick fix be to just not cache files with too long a name? Or do you need to write the file locally to view?
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #9  
Old 08-22-2017, 10:50 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by KarylFStein View Post
Would a quick fix be to just not cache files with too long a name? Or do you need to write the file locally to view?
without file caching, you'll see lots of pauses in the UI.
Reply With Quote
  #10  
Old 08-22-2017, 11:02 AM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by stuckless View Post
without file caching, you'll see lots of pauses in the UI.
Even if just a couple files can't be cached, or is it all or nothing? I just had this problem with some late night episode names. It does not seem to be a wide issue. In fact I turned recording of late night shows back on after family objections and I haven't seen issues over the past week or two, (which after saying that probably means tonight some recording will cause problems again ).

And I'm just saying as a way to keep the client from crashing until a better solution can be found.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #11  
Old 08-22-2017, 11:45 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by stuckless View Post
You have hit this issue
https://github.com/OpenSageTV/sagetv...ient/issues/73

sagetv gives me a filename in which to cache the image from the server... this filename is too large for android, and I'll need to find another caching strategy. I just don't know of a good reliable strategy, yet. I open to suggestions. I can use a hash, but a hash may result in collisions
Given the file name length limit I would probably generate a UUID to use as a filename and key for a dictionary and store the name of the file as its value. That way you can easily to a value lookup when a file is requested to check if it is already cached. Using a UUID to identify cached files would not likely generate collisions.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #12  
Old 08-22-2017, 12:08 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,396
@nyplayer - for now can't you shorten the path of the folder. Currently it is something like (I may have the folder breaks wrong): VIDEOS\Adventures of Superman 1952 Complete Series\Adventures of Superman\Season 2\Adventures of Superman - 2x01 -Five Minutes To Doom.avi

Or will that screw something else up. Even if it was automatically named you should be able to change the name of the folder and it should still work as it is still in your VIDEOS library.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #13  
Old 08-22-2017, 12:35 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Taddeusz View Post
Given the file name length limit I would probably generate a UUID to use as a filename and key for a dictionary and store the name of the file as its value. That way you can easily to a value lookup when a file is requested to check if it is already cached. Using a UUID to identify cached files would not likely generate collisions.
And of course store the dictionary in a local sqlite database.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #14  
Old 08-22-2017, 12:55 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,475
Quote:
Originally Posted by stuckless View Post
You have hit this issue
https://github.com/OpenSageTV/sagetv...ient/issues/73

sagetv gives me a filename in which to cache the image from the server... this filename is too large for android, and I'll need to find another caching strategy. I just don't know of a good reliable strategy, yet. I open to suggestions. I can use a hash, but a hash may result in collisions
How about hashing only the long names, cutting way down on the chances for an issue? You could prefix those with some kind of unique word to sort them out from normal ones. Something like "cached-<hash>".
Reply With Quote
  #15  
Old 08-22-2017, 01:33 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by Taddeusz View Post
Given the file name length limit I would probably generate a UUID to use as a filename and key for a dictionary and store the name of the file as its value. That way you can easily to a value lookup when a file is requested to check if it is already cached. Using a UUID to identify cached files would not likely generate collisions.
Quote:
Originally Posted by Taddeusz View Post
And of course store the dictionary in a local sqlite database.
Quote:
Originally Posted by wnjj View Post
How about hashing only the long names, cutting way down on the chances for an issue? You could prefix those with some kind of unique word to sort them out from normal ones. Something like "cached-<hash>".
I do think hashing will likely be used. It might be that UUID might have a low collision, but, there is still a risk of collisions and the effect of that collision might be disastrous on the UI, but I agree, we might have to live with some amount of collision failure.

I was thinking that maybe using a hash + the last 30chars of the filename. That will create a file that is about 50chars in length and collisions would likely be reduced.
Reply With Quote
  #16  
Old 08-22-2017, 01:43 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by stuckless View Post
I do think hashing will likely be used. It might be that UUID might have a low collision, but, there is still a risk of collisions and the effect of that collision might be disastrous on the UI, but I agree, we might have to live with some amount of collision failure.

I was thinking that maybe using a hash + the last 30chars of the filename. That will create a file that is about 50chars in length and collisions would likely be reduced.
I don't think you would need to worry about collisions with Java's random UUID generator.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #17  
Old 08-23-2017, 05:57 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by Taddeusz View Post
I don't think you would need to worry about collisions with Java's random UUID generator.
Since I would not consider using a database and doing a query for each cached image, I need to ensure that a very large filename ALWAYS creates the same hash/uuid, so in this case, I'd be using the name based UUID (and not random) and likely UUID.fromString(filename). While it's not likely this will result in collisions, collisions can still happen.

Unfortunately, do to other pending requirements, I can't work on this in the next few weeks (I'd be happy to accept a pull request, if someone wanted to give it a try). But, unfortunately, between work and another time sensitive paid side project, it's not leaving a lot of time lately for sagetv
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - WAF crashing! pjpjpjpj The SageTV Community 26 07-12-2014 12:51 PM
Crashing UI Patrick25 SageTV Software 5 04-13-2010 12:37 PM
Are your HD200s crashing? ericscottf SageTV Media Extender 12 03-07-2010 09:03 AM
Crashing glmason SageTV Placeshifter 6 06-17-2008 01:36 PM
Why is sage crashing? rwc SageTV Software 1 02-06-2006 03:34 PM


All times are GMT -6. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.