Java exception related to Logger?
Posted: Thu Sep 02, 2021 12:33 pm
When I initiate a model from a model file path (e.g. Model(filePathToModelFile)), Matlab throws a Java exception as below:
Java exception occurred:
java.lang.NullPointerException: null upcall object in OpenSim::LogSink::sinkImpl
at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_1(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:821)
What does this mean? It only happens when looping a few times. In Matlab debug mode, even if Model(filePathToModelFile) does not work, initiating an empty model (e.g. Model()) still works fine.
Is this related to sending the OpenSim messages to the Matlab Command Window?
At the beginning of the Matlab script, the "Logger.addSink(JavaLogSink())" is used to send OpenSim messages to the Matlab.
Java exception occurred:
java.lang.NullPointerException: null upcall object in OpenSim::LogSink::sinkImpl
at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_1(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:821)
What does this mean? It only happens when looping a few times. In Matlab debug mode, even if Model(filePathToModelFile) does not work, initiating an empty model (e.g. Model()) still works fine.
Is this related to sending the OpenSim messages to the Matlab Command Window?
At the beginning of the Matlab script, the "Logger.addSink(JavaLogSink())" is used to send OpenSim messages to the Matlab.