Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARE - a wrong expression in the MathEvaluator triggers a severe error in the slider #357

Open
benjaminaigner opened this issue Jun 8, 2022 · 0 comments

Comments

@benjaminaigner
Copy link
Contributor

Problem:
If there is a wrong expression (in this example: an additional bracket) in the MathEvaluator component triggers an error on model starting, stating that it is not possible to start the slider component (input of the MathEvaluator).

Cause:

2022-06-08 14:01:06.860 FINE [DeploymentManager runModel] Trying to start component instance: SliderInstance
2022-06-08 14:01:06.873 SEVERE [DeploymentManager runModel] java.lang.NullPointerException
	at org.cheffo.jeplite.JEP.getValue(JEP.java:176)
	at org.cheffo.jeplite.JEP.getValue(JEP.java:168)
	at eu.asterics.component.processor.mathevaluator.MathEvaluatorInstance.calculateAndProcessOutput(MathEvaluatorInstance.java:217)
	at eu.asterics.component.processor.mathevaluator.MathEvaluatorInstance$InputPort.receiveData(MathEvaluatorInstance.java:260)
	at eu.asterics.mw.model.runtime.impl.AbstractRuntimeOutputPort$1.run(AbstractRuntimeOutputPort.java:101)
	at eu.asterics.mw.services.AstericsModelExecutionThreadPool.execute(AstericsModelExecutionThreadPool.java:180)
	at eu.asterics.mw.model.runtime.impl.AbstractRuntimeOutputPort.sendData(AbstractRuntimeOutputPort.java:34)
	at eu.asterics.mw.model.runtime.impl.DefaultRuntimeOutputPort.sendData(DefaultRuntimeOutputPort.java:41)
	at eu.asterics.component.sensor.slider.SliderInstance.start(SliderInstance.java:353)
	at eu.asterics.mw.are.DeploymentManager.runModel(DeploymentManager.java:582)
	at eu.asterics.mw.services.AREServices.runModelInternal(AREServices.java:440)
	at eu.asterics.mw.services.AREServices$7.call(AREServices.java:409)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2022-06-08 14:01:06.873 WARNING [DeploymentManager runModel] Plugin could not be started: Slider.1
2022-06-08 14:01:06.874 WARNING [AstericsErrorHandling reportError] Slider.1: Plugin could not be started: Slider.1

As it seems, the problematic expression is not handled in the MathEvaluator but propagates through to the slider.

Expected behavior:

The MathEvaluator component should display an error, like "malformed expression"

Example model: (due to file extension limitations, it is renamed to txt)
abgabe1.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant