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

Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

Ok I have to implement Comscore in a SceneGraph app. All I have from the vendor is a BrightScript file we've been using in our SDK1 app. 
So I include their file in a task like this, where my code is comscore.brs and the vendor code is comscore_4.1503.03.brs:
<?xml version="1.0" encoding="utf-8" ?>
<component name = "comscore" extends = "task" >
  <interface>
    <function name="setConfig" />
  </interface>
  <script type="text/brightscript" uri="pkg:/components/cpc/tasks/metrics/comscore.brs"/>
  <script type="text/brightscript" uri="pkg:/components/cpc/tasks/metrics/vendor/comscore_4.1503.03.brs"/>
</component>


This is a Task Node added to a Group Node added to the Home Scene. When I run the app I get this infuriating error:
BRIGHTSCRIPT: ERROR: roUrlTransfer: creating MAIN|TASK-only component failed on RENDER thread: pkg:/components/cpc/tasks/metrics/vendor/comscore_4.1503.03.brs(719)


How can my task code be running on a render thread? I am calling methods on thei library from functions defined in comscore.brs and triggered using the "continuous server" approach to a task (using observeField with a port). 
WTF is this error??
0 Kudos
7 Replies
tim_beynart
Level 7

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

OK found my issue.
I was calling a function using callFunc on my Task, and this in turn used the library code. Apparently callFunc activity does not happen inside the sandbox of a Task.
Once I refactored my code to abandon callFunc and instead use a field observer it started behaving.
0 Kudos
Roku Employee
Roku Employee

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

What do you mean by "Comscore" here?
If that's comScore vCE by any chance, so it happens RAF supports that already (inquire within Smiley Happy ).
0 Kudos
tim_beynart
Level 7

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

We have to use Comscore Application tag and Streaming Tag. I just use the library they provide and call the their API, it's dead simple and it took one day to port the SDK1 code to SceneGraph.
Where are the docs for RAF? All I saw was a reference to Comscore in some release notes, but no details. It was easier to just use what I have on hand, which is already familiar.
0 Kudos
Tyler_Smith
Level 8

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

0 Kudos
tim_beynart
Level 7

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

@Tyler,
Yeah I have basically memorized that page, but my point is that there is no documentation beyond this single sentence:
Added support for comScore vCE campaign measurement service
0 Kudos
Roku Employee
Roku Employee

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

I don't know the operational details but logical first step is contacting comScore ops regarding the (server-side) account setup for using vCE with Roku. Seems good idea also contacting Roku directly, since our partner support likely knows the right comScore contacts.
0 Kudos
Highlighted
tim_beynart
Level 7

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

Thanks, I should have added that the docs also point me to a Roku email to talk to a person about integration.
Our Comscore implementation is different from vCE, though. 
0 Kudos