# Problem with resizing table during performance using f-statement

**URL:** <https://forum.csound.com/t/problem-with-resizing-table-during-performance-using-f-statement/2373>\
**Category:** Web Csound\
**Created:** [January 30, 2026, 6:57pm UTC](https://forum.csound.com/t/problem-with-resizing-table-during-performance-using-f-statement/2373 "2026-01-30T18:57:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lovre](https://forum.csound.com/letter_avatar_proxy/v4/letter/l/bbce88/32.png) [@Lovre](https://forum.csound.com/u/Lovre)\
**Post date:** [January 30, 2026, 6:57pm UTC](https://forum.csound.com/t/problem-with-resizing-table-during-performance-using-f-statement/2373/1 "2026-01-30T18:57:49Z")

</div>

Im getting a runtime memory error when trying to resize table to a non-power\_of\_2 size although I put a minus in f statement: `csound.inputMessage(`f 1 0 -132320 -2 0`);`

Console output:

```csound
Loading 132320 samples into table gi_tab_sample
**Current table size: 4 samples**
Csound stopped for table resizing
 	T 8.952 TT 8.952 M: 0.00000 0.10000
warning: replacing previous ftable 1
warning: ftable 1 relocating due to size change
    currently active instruments may find this disturbing

ftable 1:
0149cf1e:0x346d9f Uncaught RuntimeError: memory access out of bounds
    at osckki (0149cf1e:0x346d9f)
    at kperf (0149cf1e:0x10650d)
    at csoundPerformKsmpsWasi (0149cf1e:0x115a1b)
    at Object.csoundPerformKsmps (__compiled.worklet.singlethread.worker.js:17:269)
    at Dc.process (__compiled.worklet.singlethread.worker.js:86:51)

ftable 1:	132320 points, scalemax 0.000
**Resized table size: 132320 samples**

```

As you can see, the table resizing is successful but this error is thrown and stops csound.

Im working with latest @csound/browser 7.0.0-beta20 version but I also tested it with 6.18.5 and the issue is there too.

Am I missing something? Is there maybe a better way to resize a table in runtime?

Best  
Lovre

---

<div class="post-metadata">

**Author:** ![hlolli](https://forum.csound.com/user_avatar/forum.csound.com/hlolli/32/3_2.png) [@hlolli](https://forum.csound.com/u/hlolli)\
**Post date:** [September 30, 2026, 11:09am UTC](https://forum.csound.com/t/problem-with-resizing-table-during-performance-using-f-statement/2373/2 "2026-09-30T11:09:26Z")

</div>

Very slow reply (9 months late), this was likely a native csound bug that has been fixed in latest beta release.

---

<div class="post-metadata">

**Author:** ![Lovre](https://forum.csound.com/letter_avatar_proxy/v4/letter/l/bbce88/32.png) [@Lovre](https://forum.csound.com/u/Lovre)\
**Post date:** [September 30, 2026, 11:51am UTC](https://forum.csound.com/t/problem-with-resizing-table-during-performance-using-f-statement/2373/3 "2026-09-30T11:51:07Z")

</div>

Thanks @hlolli for reply! Oh that dynamic memory allocation 🫪
