newrelic / video-agent-roku

New Relic Agent for Roku
Apache License 2.0
18 stars 18 forks source link

crash #35

Closed kmanishdisc closed 2 years ago

kmanishdisc commented 3 years ago

Suspending threads... Thread selected: 1 ...nts/NewRelicAgent/NRAgent.brs(670) ev.AddReplace("contentDuration", m.nrVideoObject.duration

Current Function: 669: function nrAddVideoAttributes(ev as Object) as Object 670: ev.AddReplace("contentDuration", m.nrVideoObject.duration 1000) 671: ev.AddReplace("contentPlayhead", m.nrVideoObject.position * 1000) 672: ev.AddReplace("contentIsMuted", m.nrVideoObject.mute) 673: streamUrl = nrGenerateStreamUrl() 674: ev.AddReplace("contentSrc", streamUrl)

'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/components/NewRelicAgent/NRAgent.brs(670) Backtrace:

2 Function nraddvideoattributes(ev As Object) As Object

file/line: pkg:/components/NewRelicAgent/NRAgent.brs(670)

1 Function nrsendvideoevent(actionname As String, attr As Dynamic) As Void

file/line: pkg:/components/NewRelicAgent/NRAgent.brs(140)

0 Function nrlicensestatusobserver(event As Object) As Void

file/line: pkg:/components/NewRelicAgent/NRAgent.brs(1019) Local Variables: ev roAssociativeArray refcnt=3 count:36 global Interface:ifGlobal m roAssociativeArray refcnt=4 count:36 streamurl ba dev ver Threads: ID Location Source Code 0[u] ?? 1 ...nts/NewRelicAgent/NRAgent.brs(670) ev.AddReplace("contentDuration", m.nrVideoObject.duration

Brightscript Debugger> print m.nrVideoObject invalid

asllop commented 3 years ago

@timalacey you created the license status listener feature: have you seen this crash before? Looks like the license status observer is being called and when this happens, the video object is invalid. But the observer is registered on the video object, so that sounds like really weird. Perhaps the RokuOS is deferring the call and in the time elapsed until it is called, the video object is destroyed? 🤔

kmanishdisc commented 3 years ago

So this comes at an edge case. When you stop video right when it is still buffering. By the time NR is ready to pick the event from queue and fire it, the video object has been killed.

asllop commented 3 years ago

That sounds to me like a RokuOS bug. Have you seen a similar crash somewhere else, apart from the license status observer? I'm wondering why the license status observer is crashing and not others we have, like state or content index observers.

asllop commented 2 years ago

Hi @kmanishdisc, could you give us further information:

That sounds to me like a RokuOS bug. Have you seen a similar crash somewhere else, apart from the license status observer? I'm wondering why the license status observer is crashing and not others we have, like state or content index observers.

asllop commented 2 years ago

Closing due to inactivity.