NullpointerException in operation mapping

Issue #28 resolved
Matthias Schoettle created an issue

While Omar was playing/demoing the tool the exception below occurred, but no clue how this happened.

The only way to reproduce this currently:

  1. Map an operation (lower-level)
  2. Click on "select operation" and the search field in the selector (to type in a name)
  3. delete the operation mapping
  4. type in an operation name and hit enter
Exception in thread "Animation Thread" java.lang.NullPointerException
    at ca.mcgill.sel.ram.controller.ClassController.createOperationCopy(ClassController.java:147)
    at ca.mcgill.ram.ui.handler.impl.OperationMappingToElementHandler$1.validTextEntered(OperationMappingToElementHandler.java:54)
    at ca.mcgill.ram.ui.views.MappingSelectorView.verifyKeyboardDismissed(MappingSelectorView.java:79)
    at ca.mcgill.ram.events.RamKeyboard.dimissKeyboard(RamKeyboard.java:101)

Comments (4)

  1. Matthias Schoettle reporter

    Even though this is a very rare case, especially on the touch screen it could happen and should be prevented.

    A way this could have been triggered is that instead of step 3 the user tapped on the background (maybe by accident) while entering a name (step 4). This leads to the operation mapping being deleted.

  2. Matthias Schoettle reporter

    Even if issue #21 gets resolved it could still happen that the user deletes the mapping (e.g., undo), although its highly unlikely.

    Since the OperationMapping object still exists, there needs to be another solution.

  3. Matthias Schoettle reporter

    Fixed issue #28: To element is not set (and no operation copy created) if the corresponding OperationMapping was deleted while the selector view was opened. This is an unlikely event but it could still happen in rare cases.

    → <<cset e96f29175ce9>>

  4. Log in to comment