mbeddr / mbeddr.core

The mbeddr core. An extensible C
Eclipse Public License 2.0
225 stars 77 forks source link

{Debugger] NullPointerException when ValueSource returns null #955

Closed joswarmer closed 10 years ago

joswarmer commented 10 years ago

The ValueDebugger does not check for a null value that might be returned from the ValueSource in method getValueAsString().

java.lang.NullPointerException at com.mbeddr.core.base.behavior.ValueDebugger_Behavior.call_getValueAsString_1369248736155092647(ValueDebugger_Behavior.java:37) at com.mbeddr.core.base.constraints.ValueDebugger_Constraints$1.getValue(ValueDebugger_Constraints.java:33) at jetbrains.mps.smodel.SNodeAccessUtilImpl.getPropertyImpl(SNodeAccessUtilImpl.java:61) at org.jetbrains.mps.openapi.model.SNodeAccessUtil.getProperty(SNodeAccessUtil.java:35) at jetbrains.mps.checkers.ConstraintsChecker.checkNode(ConstraintsChecker.java:134) at jetbrains.mps.checkers.LanguageErrorsComponent.check(LanguageErrorsComponent.java:169) at typesystemIntegration.languageChecker.LanguageEditorChecker.doCreateMessages(LanguageEditorChecker.java:215) at typesystemIntegration.languageChecker.LanguageEditorChecker$4.compute(LanguageEditorChecker.java:163) at typesystemIntegration.languageChecker.LanguageEditorChecker$4.compute(LanguageEditorChecker.java:160) at jetbrains.mps.typesystem.inference.TypeContextManager.runTypeCheckingComputation(TypeContextManager.java:129) at typesystemIntegration.languageChecker.LanguageEditorChecker.createMessages(LanguageEditorChecker.java:160) at jetbrains.mps.nodeEditor.checking.BaseEditorChecker$1.run(BaseEditorChecker.java:37) at jetbrains.mps.nodeEditor.checking.BaseEditorChecker.performUninterruptableAction(BaseEditorChecker.java:136) at jetbrains.mps.nodeEditor.checking.BaseEditorChecker.createMessagesProtected(BaseEditorChecker.java:34) at jetbrains.mps.nodeEditor.Highlighter$12.compute(Highlighter.java:550) at jetbrains.mps.nodeEditor.Highlighter$12.compute(Highlighter.java:531) at jetbrains.mps.nodeEditor.Highlighter$14.compute(Highlighter.java:616) at jetbrains.mps.ide.smodel.WorkbenchModelAccess$3.compute(WorkbenchModelAccess.java:137) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:945) at jetbrains.mps.ide.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:132) at jetbrains.mps.nodeEditor.Highlighter.runLoPrioRead(Highlighter.java:612) at jetbrains.mps.nodeEditor.Highlighter.updateEditor(Highlighter.java:531) at jetbrains.mps.nodeEditor.Highlighter.access$1200(Highlighter.java:63) at jetbrains.mps.nodeEditor.Highlighter$10.compute(Highlighter.java:491) at jetbrains.mps.nodeEditor.Highlighter$10.compute(Highlighter.java:449) at jetbrains.mps.nodeEditor.Highlighter.runUpdateMessagesAction(Highlighter.java:443) at jetbrains.mps.nodeEditor.Highlighter.updateEditorComponent(Highlighter.java:449) at jetbrains.mps.nodeEditor.Highlighter.access$800(Highlighter.java:63) at jetbrains.mps.nodeEditor.Highlighter$7.run(Highlighter.java:365) at jetbrains.mps.typesystem.inference.TypeContextManager.runTypecheckingAction(TypeContextManager.java:151) at jetbrains.mps.nodeEditor.Highlighter.doUpdate(Highlighter.java:362) at jetbrains.mps.nodeEditor.Highlighter$HighlighterThread.run(Highlighter.java:658)

markusvoelter commented 10 years ago

This one has been fixed.