Skip to content

Cannot create CFA due to null pointer exception from ExecutingInvocationUnit.returnsOwnInstance #125

@gabrielisback

Description

@gabrielisback

Problem description:

  1. With IDEA on windows, when I try to run "VisualizeCfa" from proguard.examples, I got this null pointer exception.
  2. Tried master and tag 9.0.9, same result.
  3. Tried to trace into the code execution, noticed:
    3.1 This null pointer is reported by ExecutingInvocationUnit.returnsOwnInstance, where the input "method" is a null pointer but referenced.
    3.2 The input "method" is a field of an AnyMethodrefConstant object -> AnyMethodrefConstant.referencedMethod.

Below I tied to debug the issue, just for your information:
4. Tried to check how the AnyMethodrefConstant is being constructed, noticed:
4.1 It seems to be created by ProgramClassReader.createConstant
4.2 ProgramClassReader.createConstant in turn called default constructor of MethodrefConstant, where "referencedMethod" never got the chance to be initialized.
With those findings, it seems to me the VisualizeCfa example is doomed to fail. Or where did I got it wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions