royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: Null pointer errors
Date Tue, 01 May 2018 16:03:31 GMT
What is the call stack for the null pointer?

On 5/1/18, 5:05 AM, "Harbs" <> wrote:

    I’m trying to compile a library using comic and I’m getting a **LOT** of null pointer
errors. They seem to be related to missing type information, although I’m not completely
sure why the missing type information is causing these errors.
    Some of the errors are resolved-able by adding type info, but not all.
    I picked one at random to track down the issue:
    The line in question looks like this:
    var codepoint:int = glyphs[i].codePoints[0];
    glyphs[I] is a “GlyphInfo” instance. Either of the following two changes make this
particular error go away:
    var codepoint:* = glyphs[i].codePoints[0];
    var codepoint:int = (glyphs[i] as GlyphInfo).codePoints[0];
    I’m not really sure why these changes are necessary though…

View raw message