Release compilation produces 'Invalid memory access' error

If I had to guess id vote it would have something to do with the fact its not being initialized. If you declare/initialize the variable to something else before the begin/rescue, it works as expected.

Kinda similar to Stricter inferrance option?