Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-16270

In some cases the partRemoved() method of a skinnable component is called with a null instance variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile and run the attached application.
      2. Click on the "Switch to state 2" button. "Component 1" creates and displays button2.
      3. Click on "Switch". "Component 2" is displayed.
      4. Click on "Switch" again WITHOUT clicking on "Switch to state 2". "Component 1" is displayed again.
      5. Click on "Switch" again.

      Actual Results:
      A null object access exception is thrown.

      Expected Results:
      "Component 2" should be displayed again.

      Workaround (if any):
      In the partRemoved() method, do nothing if the passed "instance" variable is null.

      Explanations:
      In the component skin, "includeIn" is used to only include one of the buttons in each state. In step 4, "Component 2" never entered "state2", which means "button2" was never created. Switching back to "Component 2" in step 5, adds it to "group", which will force the component to reload the skin. During the unload operation, partRemoved() is called for all skin parts, even for "button2" which was not created and is null.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: