launcher initialization crash fixed (argc = 0 in fmi2instance)

parent 6a3089ac
......@@ -7,5 +7,5 @@ package ujf.verimag.bip.userinterface.cli;
* use "svn annotate" and BLAME the one who has commited it !
*/
public class Version {
public static final String VERSION = "2022.04.220728-DEV";
public static final String VERSION = "2022.04.141246-DEV";
}
......@@ -72,9 +72,9 @@ void FMI_template::init() {
//$$initialStatesCS$$
// TODO : implement your own initialization code here
//cout<<m_launcher<<'\n';
cout<<"Launcher address: "<<m_launcher<<'\n';
int ret = m_launcher->initialize();
//cout<<"end"<<'\n';
cout<<"Launcher initialization completed"<<'\n';
if (ret != EXIT_SUCCESS)
logger(fmi2Error, "Launcher", "Initialization error.");
......
......@@ -97,6 +97,8 @@ Launcher::~Launcher() {
int Launcher::initialize() {
cout<<"Launcher initialize()\n";
bool verbose = true; // default value
bool debug = false;
bool help = false;
......@@ -117,11 +119,14 @@ int Launcher::initialize() {
// set the name of the bip executable
if (mArgc > 0) {
cout<<"Launcher initialize(): bip executable\n";
bipExecutableName = string(mArgv[0]);
}
// parse options
for (int i = 1 ; i < mArgc ; ++i) {
cout<<"Launcher initialize(): parse options\n";
string option = mArgv[i];
if (option == "-v" || option == "--verbose") {
......@@ -247,25 +252,36 @@ int Launcher::initialize() {
}
if (!invalidOption && !help) {
cout<<"Launcher initialize(): New reference engine...creation\n";
mEngine = new ReferenceEngine(dynamic_cast<Compound &>(root()), disable_maximal_progress);
cout<<"Launcher initialize(): New reference engine...completed\n";
mScheduler = NULL;
if (explore) {
cout<<"Launcher initialize(): New explorer scheduler...creation\n";
mScheduler = new Explorer(*mEngine, verbose, limit);
cout<<"Launcher initialize(): New explorer scheduler...completed\n";
}
else {
cout<<"Launcher initialize(): New logger...creation\n";
mLogger = new Logger(cout, verbose, limit);
cout<<"Launcher initialize(): New logger...completed\n";
cout<<"Launcher initialize(): New random scheduler...creation\n";
mScheduler = new RandomScheduler(*mEngine, *mLogger, debug, interactive, randomSeed, seed);
cout<<"Launcher initialize(): New random scheduler...completed\n";
}
cout<<"Launcher initialize(): scheduler initialize...creation\n";
BipError &error = mScheduler->initialize();
cout<<"Launcher initialize(): scheduler initialize...completed\n";
if (error.type() != NO_ERROR) {
cout<<"Launcher initialize(): error\n";
ret = error.type();
}
}
}
cout<<"Launcher initialize(): completed\n";
return ret;
}
......
......@@ -147,7 +147,7 @@ void* fmi2Instantiate(fmi2String instanceName, fmi2Type fmuType, fmi2String guid
modelInstance->m_resourceLocation = fmuResourceLocation;
modelInstance->m_loggingOn = loggingOn;
int argc = 1;
int argc = 0;
char* argv[] = {"./system"};
Component &component = *deploy(argc, argv);
......@@ -159,6 +159,7 @@ void* fmi2Instantiate(fmi2String instanceName, fmi2Type fmuType, fmi2String guid
}
catch (...) {
modelInstance = NULL;
modelInstance->logger(fmi2OK, "logAll", "fmi2Instantiate: Model instance didn't created.");
}
// return data pointer
......
......@@ -219,7 +219,7 @@ Project_SOURCE_DIR:STATIC=/home/siemens/bip/examples/SpeedControlModule/modelCla
RT_path:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so
//Path to a library.
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
########################
......
......@@ -10,8 +10,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp"
"../learn/include"
)
......
......@@ -80,7 +80,7 @@ system_EXTERNAL_OBJECTS =
system: CMakeFiles/system.dir/Deploy/Deploy.cpp.o
system: CMakeFiles/system.dir/build.make
system: learn/libpack__learn.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
system: /usr/lib/x86_64-linux-gnu/librt.so
system: CMakeFiles/system.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/siemens/bip/examples/SpeedControlModule/modelClassification/output/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable system"
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/output/learn/include
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a -lrt
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a -lrt
......@@ -43,8 +43,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp"
"../learn/include"
)
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelClassification/output/learn/include
......@@ -219,7 +219,7 @@ Project_SOURCE_DIR:STATIC=/home/siemens/bip/examples/SpeedControlModule/modelDet
RT_path:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so
//Path to a library.
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
########################
......
......@@ -10,8 +10,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp"
"../learn/include"
)
......
......@@ -80,7 +80,7 @@ system_EXTERNAL_OBJECTS =
system: CMakeFiles/system.dir/Deploy/Deploy.cpp.o
system: CMakeFiles/system.dir/build.make
system: learn/libpack__learn.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
system: /usr/lib/x86_64-linux-gnu/librt.so
system: CMakeFiles/system.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/output/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable system"
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/output/learn/include
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a -lrt
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a -lrt
......@@ -46,8 +46,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp"
"../learn/include"
)
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/imageDetection/output/learn/include
......@@ -219,7 +219,7 @@ Project_SOURCE_DIR:STATIC=/home/siemens/bip/examples/SpeedControlModule/modelDet
RT_path:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so
//Path to a library.
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
libengine_path:FILEPATH=/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
########################
......
......@@ -10,8 +10,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp"
"../learn/include"
)
......
......@@ -80,7 +80,7 @@ system_EXTERNAL_OBJECTS =
system: CMakeFiles/system.dir/Deploy/Deploy.cpp.o
system: CMakeFiles/system.dir/build.make
system: learn/libpack__learn.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a
system: /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a
system: /usr/lib/x86_64-linux-gnu/librt.so
system: CMakeFiles/system.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/output/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable system"
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/output/learn/include
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/lib/static/libengine.a -lrt
/usr/bin/c++ -Wall -std=c++0x -rdynamic CMakeFiles/system.dir/Deploy/Deploy.cpp.o -o system learn/libpack__learn.a /home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/lib/static/libengine.a -lrt
......@@ -46,8 +46,8 @@ set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic"
"/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific"
"/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp"
"../learn/include"
)
......
......@@ -6,5 +6,5 @@ CXX_FLAGS = -Wall -std=c++0x
CXX_DEFINES =
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.220728-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/output/learn/include
CXX_INCLUDES = -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/generic -I/home/siemens/bip/distribution/build/bip-full/BIP-reference-engine-2022.04.141246-DEV_Linux-x86_64/include/specific -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/ext-cpp -I/home/siemens/bip/examples/SpeedControlModule/modelDetection/streamDetection/output/learn/include
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment