Forum Discussion

gomad's avatar
gomad
Roku Guru
8 years ago

Running a Task for the life time of the app

Hi,
I am trying to make an analytics library for SG applications, is it safe to start (i.e "RUN") a Task as the first child of the mainscene and keep it running/listening to events from different screens (including video node) for the entire duration of the application? The task just makes a http request for each event.
I tried it,  but the roku (Roku 3, Roku 4, HD Stick and Express) restarts randomly while playing video, without the app crashing out. Just wanted to make sure that there is nothing wrong in what I am trying to do.

Also is there any way to debug or capture these random re-boots??

regards,
gm

2 Replies

  • yes you can run a task for the lifetime of the application. For analytics, it might make sense to respawn it every time a video starts.
    You should see some kind of debugging info when a sideloaded app reboots, but the real answer is no, there is not a useful crash log available (at least not to developers, maybe Roku has a way) when a device reboots.
  • Great. Thanks.
    But these random reboots needs a fix, is there any way atleast to get a stack dump or trace of the reboot?? Any one from Roku please?