
Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2021
02:45 AM
New crash error msg: Unable to cast "<uninitialized>" to "Integer".
So a recent Roku OS update (apparently) has changed this behavior. For years I used to be able to send an uninitialized variable to a Function such as MyFunction(x = 1 AS INTEGER) and have it work fine, but now if x is uninitialized I get the following error message and a hard crash:
Type Mismatch. Unable to cast "<uninitialized>" to "Integer". (runtime error &h18)
Why the change?
2 REPLIES 2


Community Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2021
11:29 AM
Re: New crash error msg: Unable to cast "<uninitialized>" to "Integer".
Hi @Komag,
This may be a fix related to the improved type mismatch error messaging added to Roku OS 10.5. That being said, variables ideally should be initalized before being passed into a function.
Thanks,
Jonathan

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2021
03:03 AM
Re: New crash error msg: Unable to cast "<uninitialized>" to "Integer".
Yeah, that makes sense enough I suppose, thanks for your reply.