rrirower / DP2SceneGraphWizard

Direct Publisher to SceneGraph wizard.
MIT License
16 stars 1 forks source link

Various Problems & Lockups On Latest Version With Series & Episodes #119

Open Play-AV opened 3 days ago

Play-AV commented 3 days ago

Running the latest version of the channel framework, I believe I've found a bug with how "series" are parsed which leads to various problems and lock ups. This presents itself when backing out of a series item (typically after an episode has been played). Additionally, there's a lockup when selecting an episode item from 'continue watching', the 'movie' content type seems to work here and correctly resumes the intended video.

I've tried multiple feed 'configurations' with Series > Seasons > Episodes and Series > Episodes. In reading the error it seems as though, the 'index' of the episode within it's parent season is derived by taking the episode # -1, as I have a series that starts on season 2, I attempted to change that in favor of having series and episodes start at 1 without any gaps. The feed I'm testing which is a subset of the production feed currently deployed on a previous version of the framework, it contains a movie item, and a series item with 2 seasons and a small number of consecutively numbered episodes per season. In an attempt to debug this further, I've cleared the 'watched' history by temporarily changing the cleanup task item expire time to no avail and I've attempted to change ids (which were randomly generated and do not conflict with eachother) as well in case there's some residual data or whatever.

I'm at a bit of a loss here as brightscript isn't my forte.

No RAF enabled, have tried enabling and disabling various other features to no avail (weirdly the 'recently watched' helped the hard locks on going 'back' to the channel home screen from a series), have not tried enabling the intrachannel search. Furthermore, I've noticed that with 'continue watching' set to false, occasionally after playing an item, that upon reaching the channel home screen, the currently watching row is there.

Is it possible for me to email you the feed for testing?

Additionally, forgive my lack of familiarity with roku but, is there a possibility of having the option to enable a 'debug' cleanup task that fully removes any bookmarks and other information upon launch for debugging purposes to ensure a 'fresh' state.

Here's some logs

This one is encountered when 'backing out' of a series > episode view to the channel home view. I find that it's more likely to be triggered if an item has been played?


Suspending threads...
Thread selected:  1*   ...nts/GridScreen/GridScreen.brs(61)           if item.rating <> invalid and item.rating <> ""

Current Function:
053:          m.extrasLabel.text = m.theme.FormatText(m.extrasLabel, Left(item.releaseDate, 4))
054:          m.extrasLabel.text += m.theme.FormatText(m.extrasLabel, chr(62504), 1)
055:          if item.genres <> invalid
056:              for each genre in item.genres
057:                  m.extrasLabel.text += m.theme.FormatText(m.extrasLabel, genre)
058:                  m.extrasLabel.text += m.theme.FormatText(m.extrasLabel, chr(62504), 1)
059:              end for
060:          end if
061:*         if item.rating <> invalid and item.rating <> ""
062:              m.extrasLabel.text += m.theme.FormatText(m.extrasLabel, item.rating)
063:              m.extrasLabel.text += m.theme.FormatText(m.extrasLabel, chr(62504), 1)
064:          end if
065:          ' If the media type is NOT a "series", show the duration.  Otherwise, show the number of Seasons/Episodes.
Source Digest(s): 
pkg:            dev 33.2.3 4d221be1 EXAMPLEIDHIDDEN
roku_ads_lib: 58484 3.12.9 b07aa73d Roku Ads Library

Type Mismatch. Operator "<>" can't be applied to "roAssociativeArray" and "String". (runtime error &h18) in pkg:/components/GridScreen/GridScreen.brs(61)
Backtrace:
#0  Function onitemfocused() As Void
   file/line: pkg:/components/GridScreen/GridScreen.brs(61)
Local Variables:
global           Interface:ifGlobal
m                roAssociativeArray refcnt=2 count:10
focusedindex     roArray refcnt=1 count:2
row              roSGNode:ContentNode refcnt=1
item             roSGNode:ContentNode refcnt=1
genre            <uninitialized>
rawseries        <uninitialized>
Threads:
ID    Location                                Source Code
 0    pkg:/source/main.brs(84)                       msg = wait(0, m.eventmessages)
 1*   ...nts/GridScreen/GridScreen.brs(61)           if item.rating <> invalid and item.rating <> ""
 2    ...omponents/tasks/InputTask.brs(26)           msgEvent = m.messagePort.waitmessage(500)
 3    ...RTA_OnDeviceComponentTask.brs(72)      message = wait(1000, m.port)
  *selected 

This one is from the continue watching row, encountered when attempting to play an episode item (movie works no problem).


Suspending threads...
Thread selected:  1*   pkg:/source/utils.brs(817)              functionCreatePlaylistFromEpisodes(_episode as object, _episodeIndex as integer) as object

Current Function:
817:* function CreatePlaylistFromEpisodes(_episode as object, _episodeIndex as integer) as object
818:      ' Get the Series parent from raw Json. 
819:      rawseriesParent = GetSeriesParentObjectFromEpisode(_episode)
820:      ' Create a playlist of subsequent Episodes.
821:      playlistNode = CreateObject("roSGNode", "ContentNode")
Source Digest(s): 
pkg:            dev 36.2.3 1de67b3f EXAMPLEIDHIDDEN
roku_ads_lib: 58484 3.12.9 b07aa73d Roku Ads Library

Type Mismatch. Unable to cast "Invalid" to "Integer". (runtime error &h18) in pkg:/source/utils.brs(817)
Backtrace:
#2  Function createplaylistfromepisodes(_episode As Object, _episodeindex As Integer) As Object
   file/line: pkg:/source/utils.brs(819)
#1  Function showvideoscreen(feedcontent As Object, selecteditem As Integer) As Boolean
   file/line: pkg:/components/UILogic/VideoPlayer.brs(84)
#0  Function ongridscreenitemselected(event As Object) As Void
   file/line: pkg:/components/UILogic/GridScreenLogic.brs(18)
Local Variables:
_episode         roSGNode:ContentNode refcnt=3
_episodeindex    Invalid
global           Interface:ifGlobal
m                roAssociativeArray refcnt=4 count:14
rawseriesparent  <uninitialized>
playlistnode     <uninitialized>
season           <uninitialized>
epindex          <uninitialized>
episode          <uninitialized>
childnode        <uninitialized>
Threads:
ID    Location                                Source Code
 0    pkg:/source/main.brs(84)                       msg = wait(0, m.eventmessages)
 1*   pkg:/source/utils.brs(817)              functionCreatePlaylistFromEpisodes(_episode as object, _episodeIndex as integer) as object
 2    ...omponents/tasks/InputTask.brs(26)           msgEvent = m.messagePort.waitmessage(500)
 3    ...RTA_OnDeviceComponentTask.brs(72)      message = wait(1000, m.port)
  *selected 

This is a somewhat common warning I see when changing the focused item. Probably nothing important


Warning occurred while setting a field of an RoSGNode
-- Type mismatch occurred when setting the "focusedChild" field of a "ContentNode" node
   at line 53 of file pkg:/source/utils.brs 

Thank you :)

rrirower commented 3 days ago

Can you verify the version number you are using? Look at the top of main.brs.

rrirower commented 3 days ago

Please provide the URL for the feed file that exhibits the problem and the steps to recreate it.

Play-AV commented 3 days ago

Is it possible for me to email the feed url to you?

Cheers

On Wed, Oct 23, 2024, 3:44 PM rrirower @.***> wrote:

Please privide the URL for the feed file that exhibits the problem and the steps to recreate it.

— Reply to this email directly, view it on GitHub https://github.com/rrirower/DP2SceneGraphWizard/issues/119#issuecomment-2433291484, or unsubscribe https://github.com/notifications/unsubscribe-auth/A46LM47WOA2ODFCPXIHN6JTZ474BXAVCNFSM6AAAAABQPQ5WKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGI4TCNBYGQ . You are receiving this because you authored the thread.Message ID: @.***>

rrirower commented 3 days ago

mailto: rrirower@charter.net

Play-AV commented 3 days ago

Can you verify the version number you are using? Look at the top of main.brs.

BrightScript code version 1.0.0.4

is what my main.brs in the /source folder says. Let me know if that's what you're looking for.

Will email you the feed now.

Thanks again :)

rrirower commented 3 days ago

Additionally, forgive my lack of familiarity with roku but, is there a possibility of having the option to enable a 'debug' cleanup task that fully removes any bookmarks and other information upon launch for debugging purposes to ensure a 'fresh' state.

In Main.brs, uncomment DebugClearRegistry().

Play-AV commented 3 days ago

Additionally, forgive my lack of familiarity with roku but, is there a possibility of having the option to enable a 'debug' cleanup task that fully removes any bookmarks and other information upon launch for debugging purposes to ensure a 'fresh' state.

In Main.brs, uncomment DebugClearRegistry().

Sweet.

Steps to reproduce fyi

rrirower commented 3 days ago

Your feed file has some problems:

Screenshot 2024-10-23 160550

I'm not sure they are related to your problem. I need to dig deeper.

Play-AV commented 3 days ago

Your feed file has some problems:

Screenshot 2024-10-23 160550

I'm not sure they are related to your problem. I need to dig deeper.

Totally forgot about the en (should be en-US IIRC) thing on the dev feed (I fixed that in the full production feed a while back). Will change it and report in. Not totally sure if it could be related to this issue however.

Play-AV commented 3 days ago

FYI, the roku developer documentation does state this about language codes.

The language in which the video was originally produced (e.g., “en”, “en-US”, “es”, etc). ISO 639 alpha-2 or alpha-3 language code string.

Play-AV commented 3 days ago

I fixed it in the feed (the link will have updated). No difference re: the issues.

rrirower commented 3 days ago

I can verify this is a bug. My impression is that it is related to the Episode index and how it is specified in the feed file.

I've marked it as a bug and will work towards a fix in the next day or two.

Play-AV commented 3 days ago

I can verify this is a bug. My impression is that it is related to the Episode index and how it is specified in the feed file.

I've marked it as a bug and will work towards a fix in the next day or two.

Beautiful. Thanks mate :) Let me know if you need me to try anything or provide other information.