Some of Xcos demos produce errors in Xcos 6.0.0-beta2
Reported by Nikolay Strelkov
demos_errors.sce (2.86 KB, application/x-scilab)
Scilab file for demonstration of Xcos 6.0.0-beta2 errors while launching demos
BUG DESCRIPTION:
----------------
I launched some Xcos demos from Scilab 6.0.0-beta2 distibution and some of them produce errors.
Startup execution:
loading initial environment
--> //Here I get errors with Demos:
--> //1
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Electrical/AND_Gate.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
at line 346 of function scicos_flat ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci line 370 )
at line 243 of function scicos_flat ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci line 267 )
at line 37 of function c_pass1 ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/c_pass1.sci line 59 )
at line 50 of function do_compile ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_compile.sci line 71 )
at line 96 of function do_update ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_update.sci line 117 )
at line 115 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 131 )
Invalid index.
-->
--> //2
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Electrical/NOR_Gate.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
--------------------------------------------\
Main Modelica : /tmp/SCI_TMP_23462_l1Gy4y/NOR_Gate_im.mo
Flat Modelica : /tmp/SCI_TMP_23462_l1Gy4y/NOR_Gate_imf.mo
Simulation C code :/tmp/SCI_TMP_23462_l1Gy4y/NOR_Gate_im.c
Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
ilib_gen_Make: Copy NOR_Gate_im.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Shared archive loaded.
Link done.
WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
-->
--> //3
--> v=getversion('scilab');
--> if v(1)==6 then
> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/ModelicaBlocks/Rotational_system.zcos');xcos_simulate(scs_m, 4);
> end
Xcos error: Wrong value for field model.label : Valid C identifier expected.
--------------------------------------------\
Main Modelica : /tmp/SCI_TMP_23462_l1Gy4y/Rotational_system_im.mo
Flat Modelica : /tmp/SCI_TMP_23462_l1Gy4y/Rotational_system_imf.mo
Simulation C code :/tmp/SCI_TMP_23462_l1Gy4y/Rotational_system_im.c
Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
ilib_gen_Make: Copy Rotational_system_im.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Shared archive loaded.
Link done.
WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
-->
--> //4 - window "Scilab message" with text "Problem in port size or type."
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Inverted_pendulum.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
at line 117 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 133 )
xcos_simulate: Error during block parameters update.
-->
--> //5 - does not auto stop
--> //clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Lorenz.zcos');xcos_simulate(scs_m, 4);
-->
--> //6
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Plant_DiscreteController.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
-->
--> //7 - window "Scilab message" with text "Problem in port size or type."
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Scilab_Block.zcos');xcos_simulate(scs_m, 4);
at line 117 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 133 )
xcos_simulate: Error during block parameters update.
-->
--> //8 - window "Scilab message" with text "Problem in port size or type." - broken in 5.5.2 too
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/System-Observer.zcos');xcos_simulate(scs_m, 4);
at line 117 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 133 )
xcos_simulate: Error during block parameters update.
-->
--> //9 - window "Scilab message" with text "
--> //Initialisation problem:
--> //the block 22 has been called with input out of its
--> //domain"
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/Thermique_bloc.zcos');xcos_simulate(scs_m, 4);
The finite differences discretization took 0.42 secondsThe code generation, the compilation and link took 0.10 seconds Generate a loader file
Generate a Makefile
ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
ilib_gen_Make: Copy termique_implicite.c to TMPDIR
ilib_gen_Make: configure : Generate Makefile.
ilib_gen_Make: Modification of the Makefile in TMPDIR.
Running the Makefile
Generate a cleaner file
Shared archive loaded.
Link done.
Xcos error: Wrong value for field model.label : Valid C identifier expected.
WARNING: Feature WFILE_f is obsolete.
WARNING: Please use WRITEC_f instead.
WARNING: This feature will be permanently removed in Scilab 6.0.0
WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
-->
--> //10
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/batch_simulation.zcos');xcos_simulate(scs_m, 4);
at line 342 of function scicos_flat ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci line 366 )
at line 37 of function c_pass1 ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/c_pass1.sci line 59 )
at line 50 of function do_compile ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_compile.sci line 71 )
at line 96 of function do_update ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_update.sci line 117 )
at line 115 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 131 )
Invalid index.
-->
--> //11
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/demo_Datatype.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
-->
--> //12
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/demo_watertank.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
at line 342 of function scicos_flat ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci line 366 )
at line 243 of function scicos_flat ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/scicos_flat.sci line 267 )
at line 37 of function c_pass1 ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/c_pass1.sci line 59 )
at line 50 of function do_compile ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_compile.sci line 71 )
at line 96 of function do_update ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/scicos/macros/scicos_scicos/do_update.sci line 117 )
at line 115 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 131 )
Invalid index.
-->
--> //13
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/pendulum_anim5.zcos');xcos_simulate(scs_m, 4);
Invalid index.
scicos_flat: Empty diagram
c_pass1: flat failed
at line 117 of function xcos_simulate ( /home/nikolay/Software/scilab-6.0.0-beta-2/share/scilab/modules/xcos/macros/xcos_simulate.sci line 133 )
xcos_simulate: Error during block parameters update.
-->
--> //14
--> clear;xdel(winsid());importXcosDiagram(SCI+'/modules/xcos/demos/susp.zcos');xcos_simulate(scs_m, 4);
Xcos error: Wrong value for field model.label : Valid C identifier expected.
Xcos error: Wrong value for field model.label : Valid C identifier expected.
Xcos error: Wrong value for field model.label : Valid C identifier expected.
Xcos error: Wrong value for field model.label : Valid C identifier expected.
Xcos error: Wrong value for field model.label : Valid C identifier expected.
HOW TO REPRODUCE THE BUG:
-------------------------
1. Download Scilab 6.0.0-beta2
2. Launch attached file (or copy lines from it) in Scilab 6.0.0-beta2
3. See errors.
OTHER INFORMATION:
------------------
Tested on Ubuntu 12.04.5 amd64 with Scilab 6.0.0-beta2 amd64.
All these demos (except System-Observer.zcos) launch without errors on Scilab/Xcos 5.5.2.