Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
tim_beynart
Level 7

global node error after 1 hour of playback

In our scenegraph app, after about an hour of HLS live stream playback, a regular lookup on the global node crashes the app. This code is in a task that runs an http request at periodic intervals.
BRIGHTSCRIPT: ERROR: roSGNode.<lookup>: Rendezvous aborted for Node: pkg:/components/cpc/metrics/tasks/cpc_http.brs(19)

BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.

Suspending threads...
Thread selected:  5*   ...pc/metrics/tasks/cpc_http.brs(19)    
Current Function:
011:      http.SetPort(port)
012:  timeout = Int(m.global.http_timeout_seconds) * 1000
    http.setCertificatesFile("common:/certs/ca-bundle.crt")
013:      http.InitClientCertificates()
014:      http.enablehostverification(false)
015:      http.enablepeerverification(false)
016:      http.SetUrl(url)
017:      timeout = 30000
018:      if m.global.http_timeout_seconds <> invalid
019:*       timeout = Int(m.global.http_timeout_seconds) * 1000
020:      end if
021:      if http.AsyncGetToString() Then
022:        msg = wait(timeout, port)
023:        if (type(msg) = "roUrlEvent")
Type Mismatch. (runtime error &h18) in pkg:/components/cpc/metrics/tasks/cpc_http.brs(19)
019:       timeout = Int(m.global.http_timeout_seconds) * 1000
Backtrace:
#0  Function request() As Dynamic
   file/line: pkg:/components/cpc/metrics/tasks/cpc_http.brs(19)
Local Variables:
global           Interface:ifGlobal
m                roAssociativeArray refcnt=2 count:2
url              roString refcnt=1 val:"http://..."
http             bsc:roUrlTransfer refcnt=1
port             bsc:roMessagePort refcnt=2
timeout          Integer val:30000 (&h7530)
msg              <uninitialized>


If I run some logging in this debug session, i get strange results. The global node is there, but accessing this particular value (which is set when the app starts up) gives me weirdness:
Brightscript Debugger> ? m.global
<Component: roSGNode> =
{
    change: <Component: roAssociativeArray>
    focusable: false
    focusedChild: <Component: roInvalid>
    id: ""
    _rsgdisplaysize: <Component: roAssociativeArray>
    analytics: <Component: roSGNode>
    appconfig: <Component: roAssociativeArray>
    brandconfig: <Component: roAssociativeArray>
    cpc_log_enabled: true
    cpc_log_level: "ALL"
    deeplinkservice: <Component: roSGNode>
    encryptionkey: "86CCB539521E6554D623F1K12A4CF29H"
    http_timeout_seconds: 30
    initializationvectorkey: "95FBC64A9F7837FE"
    migrate: <Component: roSGNode>
    moduleproperties: <Component: roAssociativeArray>
    retrycount: 0
    router: <Component: roSGNode>
    userinfo: <Component: roAssociativeArray>
    watchlist: <Component: roSGNode>
}

Brightscript Debugger> ? m.global.http_timeout_seconds
BRIGHTSCRIPT: ERROR: roSGNode.<lookup>: Rendezvous aborted for Node
invalid



To be clear, this lookup has worked without issue dozens of times previous to this crash.
Any ideas what is going on here? Memory issue? this is on a Roku Stick:
- - - - - - - - - - - - - - - - 
Model:          3500X
Display Name:   Roku Stick
Firmware:       098.00E04128A
Friendly Name:  OldStick
Display Size:    1280x 720
UI Resolution:  <Component: roAssociativeArray> =
{
    height: 720
    name: "HD"
    width: 1280
}
Video Mode:     1080p
-------------------------------------
0 Kudos
2 Replies
Veeta
Level 7

Re: global node error after 1 hour of playback

Are you using RAF for ads?
0 Kudos
Roku Employee
Roku Employee

Re: global node error after 1 hour of playback


BRIGHTSCRIPT: ERROR: roSGNode.<lookup>: Rendezvous aborted for Node: pkg:/components/cpc/metrics/tasks/cpc_http.brs(19)
...
017: timeout = 30000
018: if m.global.http_timeout_seconds <> invalid
019:* timeout = Int(m.global.http_timeout_seconds) * 1000
020: end if
...
Type Mismatch. (runtime error &h18) in pkg:/components/cpc/metrics/tasks/cpc_http.brs(19)

interesting. how often does this happen?
can you send us a minimal working example to demonstrate this?
0 Kudos