# Ftload works, ftloadk not - why?

**URL:** <https://forum.csound.com/t/ftload-works-ftloadk-not-why/775>\
**Category:** General\
**Created:** [May 31, 2022, 8:24pm UTC](https://forum.csound.com/t/ftload-works-ftloadk-not-why/775 "2022-05-31T20:24:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReinerZ](https://forum.csound.com/letter_avatar_proxy/v4/letter/r/eb9ed0/32.png) [@ReinerZ](https://forum.csound.com/u/ReinerZ)\
**Post date:** [May 31, 2022, 8:24pm UTC](https://forum.csound.com/t/ftload-works-ftloadk-not-why/775/1 "2022-05-31T20:24:36Z")

</div>

I have problems converting a Csound instrument from using ftload to ftloadk and ran into problems. A minimal example is here: [ftload\_test – Google&nbsp;Drive](https://drive.google.com/drive/folders/1AAQsXdLlLh3UKONcS1yFL8WuVVCtKc4y?usp=sharing)

If I run ftload-test.csd it works as expected rewriting table 1 which was initially length 2048 from file BWV\_639.taps. The new length is 287 taken from what is in the file header. The value is printed 10 times at k-time:

> i 1 time 0.00000: 287.00000  
> i 1 time 1.00000: 287.00000  
> i 1 time 2.00000: 287.00000  
> i 1 time 3.00000: 287.00000  
> i 1 time 4.00000: 287.00000  
> i 1 time 5.00000: 287.00000  
> i 1 time 6.00000: 287.00000  
> i 1 time 7.00000: 287.00000  
> i 1 time 8.00000: 287.00000  
> i 1 time 9.00000: 287.00000

In ftloadk-test.csd I just replaced ftload by ftloadk (with the additional argument ktrig set to 1). I would expect that it now reads the file ten times and outputs 10 times 287 again. But the output is

> i 1 time 0.00000: 2048.00000  
> Deferred-size ftable 1.000000 load not available at perf time.

So in the first k-cycle it (maybe) read the file but did not change the length of the table. And in the second k-cycle it even crashes (with a message I could not find in the documentation).

Does anyone have experience with ftloadk or even have a functioning example of ftloadk loading tables of variable size?

---

<div class="post-metadata">

**Author:** ![joachim](https://forum.csound.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@joachim](https://forum.csound.com/u/joachim)\
**Post date:** [June 1, 2022, 11:02am UTC](https://forum.csound.com/t/ftload-works-ftloadk-not-why/775/2 "2022-06-01T11:02:30Z")

</div>

hi reiner -

i tried your example and had the same behaviour as you describe.

after the error message, it reports a segmentation fault.

so i think something is wrong with ftloadk.

perhaps file a bug?

best -

joachim

---

<div class="post-metadata">

**Author:** ![ReinerZ](https://forum.csound.com/letter_avatar_proxy/v4/letter/r/eb9ed0/32.png) [@ReinerZ](https://forum.csound.com/u/ReinerZ)\
**Post date:** [June 4, 2022, 5:04am UTC](https://forum.csound.com/t/ftload-works-ftloadk-not-why/775/3 "2022-06-04T05:04:03Z")

</div>

Dear Joachim,  
I wasn’t sure whether this is really a bug or just that I don’t understand the i-pass/k-pass logic completely. But now I will file a bug report.  
Best,  
Reiner
