# Execstr crashing

**URL:** <https://scilab.discourse.group/t/execstr-crashing/1224>\
**Category:** General usage\
**Created:** [October 9, 2026, 6:27pm UTC](https://scilab.discourse.group/t/execstr-crashing/1224 "2026-10-09T18:27:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericlepen](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@ericlepen](https://scilab.discourse.group/u/ericlepen)\
**Post date:** [October 9, 2026, 6:27pm UTC](https://scilab.discourse.group/t/execstr-crashing/1224/1 "2026-10-09T18:27:44Z")

</div>

We like to use the execstr to customize our variable names or expressions based on the results of calculations or strings manipulations. However it looks like iterating this function too fast may cause some issues: without a sleep(0.001) or longer, Scilab is crashing and exiting without any error message.  
```scilab

```auto
// load a list of text files
[status,list1,bb] = host('dir /b /on /s ""C:\TEMP\blabla*.inp""',echo=%t);
nfiles = max(size(list1));

i=1;
while i <= nfiles
    mprintf('%d/%d...\n', i, nfiles)
    // load the file line by line
    fd=mopen(list1(i),'r')
    MyData = mgetl(fd);
    mclose(fd)
    nrows = size(MyData,'r');
    // initialize the table
    str = "MyTable" +string(i) + "= zeros(nrows,20)";
    execstr(str)
    for j=1:nrows
        // retrieve each individual value by line
        // row #j in filename(i)
        rowcells = tokens(MyData(j))';
        ncols = size(rowcells,'c');
        temp = strtod(rowcells);
        str = "MyTable" +string(i)+"(" + string(j) + ",1:ncols) = temp(1:ncols)";
        execstr(str)
        sleep(0.001)
    end
    i = i + 1;
end
mprintf("%d files done\n", nfiles)

```

Is there good recommendations for the use of this function? Even the ‘errcatch’ option do not prevent the silent crash from Scilab.

Thank you!

---

<div class="post-metadata">

**Author:** ![vincent.couvert](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@vincent.couvert](https://scilab.discourse.group/u/vincent.couvert)\
**Post date:** [October 12, 2026, 9:31am UTC](https://scilab.discourse.group/t/execstr-crashing/1224/2 "2026-10-12T09:31:27Z")

</div>

Hello @ericlepen

This problem seems similar to an issue that will be fixed in next version: [https://gitlab.com/scilab/scilab/-/merge\_requests/1785](https://gitlab.com/scilab/scilab/-/merge_requests/1785)

Can you try with a [development version](https://gitlab.com/scilab/scilab/-/jobs/artifacts/main/download?job=windows_x64_build_nightly) and see if the crash is fixed on your use-case?

Best regards,  
Vincent

---

<div class="post-metadata">

**Author:** ![ericlepen](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@ericlepen](https://scilab.discourse.group/u/ericlepen)\
**Post date:** [October 12, 2026, 7:18pm UTC](https://scilab.discourse.group/t/execstr-crashing/1224/3 "2026-10-12T19:18:48Z")

</div>

Hello @vincent.couvert,

I tried the version scilab-branch-main-de137b1a.bin.x64 from here (your link is not working for me): [https://gitlab.com/scilab/scilab/-/jobs/17099142909](https://scilab.discourse.group/#17099142909) and it solves the problem! My script can run so fast with no crash 🙂 I’m excited to update to the 2027 version soon! Thanks  
Eric

---

<div class="post-metadata">

**Author:** ![vincent.couvert](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@vincent.couvert](https://scilab.discourse.group/u/vincent.couvert)\
**Post date:** [October 15, 2026, 7:08pm UTC](https://scilab.discourse.group/t/execstr-crashing/1224/4 "2026-10-15T19:08:43Z")

</div>

Scilab 2027.0.0 has been released: [https://scilab.discourse.group/t/scilab-2027-0-0-highlights-what-s-new/](https://scilab.discourse.group/t/scilab-2027-0-0-highlights-what-s-new/)

Enjoy!

---

<div class="post-metadata">

**Author:** ![briskquartz901](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@briskquartz901](https://scilab.discourse.group/u/briskquartz901)\
**Post date:** [November 10, 2026, 7:44pm UTC](https://scilab.discourse.group/t/execstr-crashing/1224/5 "2026-11-10T19:44:10Z")

</div>

This post was flagged by the community and is temporarily hidden.
