Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

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?

Tags (1)
0 Kudos
2 REPLIES 2
RokuJonathanD
Community Moderator
Community Moderator

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

0 Kudos
Komag
Roku Guru

Re: New crash error msg: Unable to cast "<uninitialized>" to "Integer".

Yeah, that makes sense enough I suppose, thanks for your reply.

0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!