Arthy74
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
07:23 AM
Capture Runtime errors for Scene Graph
Hey everyone,
I am using the Eval technique to catch errors to have a friendly app crash message.
If an error happens in the render thread, i correctly capture the Eval result, and then i am able to do something.
But i just noticed that if the error happens in the render thread (Scene Graph), the app just crash and does not fall back as the eval result.
Am i missing something ?
And does roku have plans to give us a decent api to track runtime crashes ?
I am using the Eval technique to catch errors to have a friendly app crash message.
If an error happens in the render thread, i correctly capture the Eval result, and then i am able to do something.
But i just noticed that if the error happens in the render thread (Scene Graph), the app just crash and does not fall back as the eval result.
Am i missing something ?
And does roku have plans to give us a decent api to track runtime crashes ?
3 REPLIES 3
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016
08:08 AM
Re: Capture Runtime errors for Scene Graph
I don't believe eval() is thread-safe. My advice is to use it very, very sparingly - and only in one of the threads. Or bad things may happen.
Oh, and also do not call eval() in a loop, like hundreds or thousands of times - bad things will happen.
Oh, and also do not call eval() in a loop, like hundreds or thousands of times - bad things will happen.
Arthy74
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016
07:18 AM
Re: Capture Runtime errors for Scene Graph
Ok, do you know a way to you use Eval() on the render thread (Scene Graph) ?
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016
11:20 AM
Re: Capture Runtime errors for Scene Graph
You should be fine if you understand and follow what i said above.
But let me underline that the render thread uh, renders 60 times per second. You cannot do eval() at 60Hz if you intend your app to live more than a second or two (like i said, nothing good will happen invoking eval in a loop).
What exactly are you trying to fence with eval() in the RSG thread?! eval() is no excuse for sloppiness in coding and as a rule, "fatal" errors only occur due to errors in your code semantics - not Roku's.
But let me underline that the render thread uh, renders 60 times per second. You cannot do eval() at 60Hz if you intend your app to live more than a second or two (like i said, nothing good will happen invoking eval in a loop).
What exactly are you trying to fence with eval() in the RSG thread?! eval() is no excuse for sloppiness in coding and as a rule, "fatal" errors only occur due to errors in your code semantics - not Roku's.