Forum Discussion

tim_beynart's avatar
tim_beynart
Channel Surfer
9 years ago

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??

10 Replies

  • 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.
    • kirankumar3003's avatar
      kirankumar3003
      Reel Rookie

      I think there are multiple issues causing the same error because I am not using callFunc anywhere in my app and I am still seeing the error. It is so frustrating. In my case I am creating a roUrlTransfer object and using it in the very next line to set the url where the app crashes(intermittently). interesting thing is I see "BRIGHTSCRIPT ERROR: creating MAIN|TASK-only component failed on RENDER thread" in the terminal just before the crash but it says that the actual cause of the crash is 'Dot' operator attempted on invalid component because apparently the request object is invalid !! No clue how the request object could be invalid. Any thoughts appreciated.

  • What do you mean by "Comscore" here?
    If that's comScore vCE by any chance, so it happens RAF supports that already (inquire within 🙂 ).
  • 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.
  • 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
  • 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.
  • 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. 
  • sj_dev's avatar
    sj_dev
    Binge Watcher

    tim_beynart Can you please share what to do exactly in the task. We also have comscore.brs with us, but not sure how should it be implemented using tasks

    • tim_beynart's avatar
      tim_beynart
      Channel Surfer

      sj_dev I got an email about your question. I no longer work on Roku apps and don't have access to the repo for the projects. I wish I could help, good luck!