NullpointerException in operation mapping
Issue #28
resolved
While Omar was playing/demoing the tool the exception below occurred, but no clue how this happened.
The only way to reproduce this currently:
- Map an operation (lower-level)
- Click on "select operation" and the search field in the selector (to type in a name)
- delete the operation mapping
- 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)
-
reporter -
reporter Even if issue
#21gets 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. -
reporter - changed status to resolved
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>>
-
reporter -
assigned issue to
-
assigned issue to
- Log in to comment
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.