Segmentation error - Can't debug

Merula_20758
Merula_20758 Altair Community Member
edited October 2020 in Community Q&A

Hey guys,

 

I have a .tcl script which causes a segmentation error... I dont know why

It is importing a file, move some elements around, write some model file and delete the model and import again a .fem file... Does someone know how to debug this?

 

Thanks and best regards

 

Merula

 

MODEL FILE: Please save to C:/Temp for the code to work

 

 

CODE

 

 hm_answernext yes *deletemodel *feinputwithdata2 '\#optistruct\\optistruct' 'C:/temp/cclip10.fem' 0 0 0 0 0 1 8 1 0 *createmark components 1 'displayed' *setvalue comps mark=1 color=2 *createmark loadcols 2 'displayed' *createstringarray 2 'geometry_off' 'elements_off' *hideentitybymark 2 1 2 *createmark elems 1 'displayed' set meshSize [hm_getaverageelemsize 1] *createentity comps name=beamCluster_sub_0 *createmark elements 1 393 454 379 428 397 421 457 450 503 481 474 417 352 389 422 462 523 493 557 411 365 385 433 521 459 489 542 408 438 357 384 566 528 535 479 452 425 440 468 353 396 579 509 548 490 460 476 415 504 372 401 577 549 524 483 455 485 432 370 394 623 589 552 513 478 492 463 420 366 391 613 664 586 561 520 480 495 446 416 364 383 559 514 491 445 429 375 400 541 488 465 434 371 399 595 496 458 430 339 374 404 630 487 464 435 346 378 406 650 683 494 449 418 351 377 390 669 705 486 461 413 350 368 380 712 754 477 444 412 343 355 381 795 779 475 443 419 345 362 398 849 805 484 447 424 327 360 382 879 845 332 367 939 877 334 358 929 981 333 388 356 1006 982 386 1052 1008 414 439 1115 1069 470 442 1110 1172 469 497 1206 1161 531 501 564 1270 1210 573 614 533 1320 643 619 570 1368 679 721 638 608 1419 1366 682 730 750 713 634 1420 1477 706 742 668 791 760 711 1475 1536 743 704 782 823 826 783 708 698 1528 1594 781 824 745 865 866 821 784 744 709 667 1635 1583 829 785 868 890 912 949 833 799 757 676 645 1687 1626 825 867 922 919 958 876 996 1040 838 633 600 1684 1756 870 907 968 1018 952 1067 1088 1134 562 1822 1763 909 951 1001 1075 1121 1171 1184 1234 529 1843 1816 994 954 1045 1166 1205 1228 1279 1349 1860 1953 1048 995 1086 1231 1276 1328 1414 1441 1920 1969 1138 1043 1094 1327 1382 1443 1486 1549 2048 1990 1185 1153 1092 1381 1433 1521 1545 1621 1679 2036 2141 1230 1194 1302 1137 1487 1546 1625 1678 1746 1783 2103 2201 1364 1309 1258 1193 1623 1693 1713 1779 1856 1900 2178 1429 1367 1326 1250 1717 1771 1842 1905 1956 2026 2244 1484 1430 1370 1305 1882 1904 1967 2029 2100 2175 2321 1537 1474 1418 1371 1968 2027 2081 2156 2247 2300 2427 2392 1590 1522 1463 1411 2098 2152 2217 2314 2369 2518 2615 2434 1572 1645 1517 1462 2220 2279 2352 2435 2510 2593 2695 2773 2699 1608 1569 1690 1490 2354 2425 2495 2539 2768 2850 2920 2815 2771 1598 1657 1745 1541 2645 2925 2995 3073 2996 2913 2846 1655 1712 1597 1821 2720 2801 2999 3068 3147 3221 3148 1773 1654 1715 1834 2864 2769 2833 2851 2939 3146 3222 3297 3365 3284 1772 1835 1898 1714 3005 2908 2934 2732 2848 3177 3246 3312 3383 3460 1831 1892 1776 1955 3091 3004 2875 2932 2755 2805 3303 3380 3454 3530 1837 1899 1954 2017 3083 3166 3002 2917 2948 2827 2775 3377 3452 3528 3603 1894 1961 2022 2090 3157 3248 3013 2974 2874 2845 2754 3526 3601 3676 2020 1959 2091 2166 3337 3250 3020 2949 2881 2820 2753 3677 3751 2158 2086 2032 2242 3310 3388 3014 3087 2929 2861 2811 3828 3753 3902 2213 2146 2295 2102 3478 3398 3024 </s

Answers

  • tinh
    tinh Altair Community Member
    edited November 2019

    Seem that before *feinputwithdata2 you are missing a *createstringarray

    Number 8 indicates that the array has 8 items

    If input reader parses 8 args but not found, it's crashed!

  • Merula_20758
    Merula_20758 Altair Community Member
    edited November 2019

    That did the trick!

    Thanks!

     

    I didn't think it was necessary as it worked on the first execution of the command. But changing this led to no crashes. You're the best!