Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tim_beynart
Channel Surfer

RAF crash with poor internet connection

My internet is currently crawling, thanks to the recent storms. I've seen several RAF crashes when I start up my SceneGraph app. This crash happens before the UI even loads, I don't even see a splash screen. Does RAF have no internal logic to handle timeouts?
Here's the log:



Roku_Ads Framework version 2.0215

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

Suspending threads...
Thread selected:  1*   roku_ads_lib:/Roku_Ads.brs(512)         ??

Current Function:
504:  ??
505:  ??
506:  ??
507:  ??
508:  ??
509:  ??
510:  ??
511:  ??
512:* ??
513:  ??
514:  ??
515:  ??
516:  ??
Execution timeout (runtime error &h23) in roku_ads_lib:/Roku_Ads.brs(512)
512: ??
Backtrace:
#4  Function roku_ads_util_getstringfromurl(url_ As String) As Dynamic
   file/line: roku_ads_lib:/Roku_Ads.brs(512)
#3  Function roku_ads_checkallowedfeature(keytype_ As String, util_ As Object) As Boolean
   file/line: roku_ads_lib:/Roku_Ads.brs(1559)
#2  Function roku_ads_constructor(view_ As Object) As Object
   file/line: roku_ads_lib:/Roku_Ads.brs(426)
#1  Function roku_ads() As Object
   file/line: roku_ads_lib:/Roku_Ads.brs(42)
#0  Function init() As Void
   file/line: pkg:/components/cpc/tasks/raf.brs(13)
Local Variables:
No variable info.
Threads:
ID    Location                                Source Code
 0    pkg:/source/main.brs(14)                screen.Show()
 1*   roku_ads_lib:/Roku_Ads.brs(512)         ??
  *selected

Brightscript Debugger> exit
0 Kudos
5 REPLIES 5
RokuNB
Roku Guru

Re: RAF crash with poor internet connection

Does not seem connection's nor RAF's fault.
Going out on a limb here but seems you are invoking RAF from the render thread, something you shouldn't do... yes?
0 Kudos
tim_beynart
Channel Surfer

Re: RAF crash with poor internet connection

This only happens when the internet is dog slow, and it happens in an app that otherwise runs like normal.
RAF is included using the manifest and all of the RAF logic is in a task.  Seems like a RAF issue to me.
0 Kudos
RokuNB
Roku Guru

Re: RAF crash with poor internet connection

Sorry, the reason i took the guess about render thread is because i looked at the code and the only way of this happening i know of is in the render thread. Whatever you saw shouldn't be possible in task tread.
Can you provide a "minimal working example" on this?
Also what firmaware#, model# and idea of what network conditions to simulate.

PS. wait, what? "This crash happens before the UI even loads, I don't even see a splash screen" - i did not even see that before. Can you elaborate/experiment more on that? Did you mean the splash screen from the manifest or some RSG poster?
0 Kudos
tim_beynart
Channel Surfer

Re: RAF crash with poor internet connection

I am referring to the splash screen defined in the manifest file.
I'll try to throw together an example. This is certainly an edge case, it only happened when my internet was crawling along at dial up speed. I can artificially throttle my connection using Charles if the RAF request is not using SSL... is it?
0 Kudos
RokuNB
Roku Guru

Re: RAF crash with poor internet connection

"tim_beynart" wrote:
I am referring to the splash screen defined in the manifest file.

This may be (or may not) be key, seems issue was observed very early - during app (and RAF) initialization.

I'll try to throw together an example. This is certainly an edge case, it only happened when my internet was crawling along at dial up speed. I can artificially throttle my connection using Charles if the RAF request is not using SSL... is it?

Hard to tell for sure having only the stack but i believe it was httpS. One way i can think of is to insert Mac OSX in the middle (share network connection, connect Roku to that, then throttle it down per http://thesmithfam.org/blog/2012/04/11/ ... -mac-os-x/ et al). YMMV on other OS.
0 Kudos