What is the call stack for the null pointer?

On 5/1/18, 5:05 AM, "Harbs" <harbs.li...@gmail.com> 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:
    
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB&data=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116&sdata=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D&reserved=0
 
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB&data=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116&sdata=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D&reserved=0>
    
    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…
    
    Thoughts?
    Harbs

Reply via email to