Csound Csound-dev Csound-tekno Search About

[Csnd-dev] memory problem for long 2d arrays?

Date2019-01-04 15:15
Fromjoachim heintz
Subject[Csnd-dev] memory problem for long 2d arrays?
Attachments190104_c_problem.csd  
i am running in a strange segfault with loading an #include'd text file 
with a large 2dim array.

first i create the array with
   giSnippets[][] init 767, 6

then i fill this array with lines like
   giSnippets fillarray 1, 0.697, 3.850, 66.20, -38.8, 0.77,
                                2, 2.125, 3.840, 89.43, -26.8, 0.43 etc

this used to run fine the last days, but crashes now constantly.

i tried to break this down, and found that commenting out one more item
   (in the example: putting the /* after 334)
does not crash any more.

the strange thing is that "it worked yesterday" and i haven't compiled 
csound since then.
so i assume that it is a memory leak?

the terminal output is below; perhaps it gives a clue to someone.

best -
	joachim



jh@lenov2:/media/jh/Daten/Joachim/Stuecke/49_quantum/csd$ csound 
190104_c_problem.csd
time resolution is 1000.000 ns
0dBFS level = 32768.0
--Csound version 6.13 beta (double samples) Jan  1 2019
[commit: b296287f879eb6d5e888c57e5e631d2017c33df5]
libsndfile-1.0.27
WARNING: could not open library 
'/usr/local/lib/csound/plugins64-6.0/libhdf5ops.so' (libhdf5_cpp.so.102: 
cannot open shared object file: No such file or directory)
UnifiedCSD:  190104_c_problem.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
instr Test uses instrument number 1
Elapsed time at end of orchestra compile: real: 0.035s, CPU: 0.035s
sorting score ...
	... done
Elapsed time at end of score sort: real: 0.035s, CPU: 0.035s
graphics suppressed, ascii substituted
0dBFS level = 1.0

csound command: Segmentation fault
inactive allocs returned to freespace
end of score.		   overall amps:  0.00000  0.00000
	   overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 0.285s, CPU: 0.035s
*** Error in `csound': free(): invalid next size (normal): 
0x0000562435285c50 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f73c8b4dbfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f73c8b53fc6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7f73c8b5480e]
/usr/local/lib/libcsound64.so.6.0(+0x6dd18)[0x7f73c940ad18]
/usr/local/lib/libcsound64.so.6.0(+0x47086)[0x7f73c93e4086]
/usr/local/lib/libcsound64.so.6.0(csoundDestroy+0xc0)[0x7f73c93df714]
/usr/local/lib/libcsound64.so.6.0(+0x42255)[0x7f73c93df255]
/lib/x86_64-linux-gnu/libc.so.6(+0x35940)[0x7f73c8b12940]
/lib/x86_64-linux-gnu/libc.so.6(+0x3599a)[0x7f73c8b1299a]
csound(+0x15a3)[0x5624335565a3]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060)[0x7f73c8b10060]
/usr/local/lib/libcsound64.so.6.0(+0x8018a)[0x7f73c941d18a]
/usr/local/lib/libcsound64.so.6.0(+0x168cef)[0x7f73c9505cef]
/usr/local/lib/libcsound64.so.6.0(+0x60ab7)[0x7f73c93fdab7]
/usr/local/lib/libcsound64.so.6.0(+0x70b29)[0x7f73c940db29]
/usr/local/lib/libcsound64.so.6.0(csoundStart+0x7d7)[0x7f73c959b617]
/usr/local/lib/libcsound64.so.6.0(csoundCompile+0x42)[0x7f73c959b65f]
csound(+0x18f6)[0x5624335568f6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f73c8afd2e1]
csound(_start+0x2a)[0x56243355637a]
======= Memory map: ========
562433555000-562433558000 r-xp 00000000 08:01 390960 
/usr/local/bin/csound
562433757000-562433758000 r--p 00002000 08:01 390960 
/usr/local/bin/csound
562433758000-562433759000 rw-p 00003000 08:01 390960 
/usr/local/bin/csound
562434f31000-562435294000 rw-p 00000000 00:00 0 
[heap]
7f73bf905000-7f73bf918000 r-xp 00000000 08:01 260874 
/lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7f73bf918000-7f73bfb17000 ---p 00013000 08:01 260874 
/lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7f73bfb17000-7f73bfb18000 r--p 00012000 08:01 260874 
/lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7f73bfb18000-7f73bfb19000 rw-p 00013000 08:01 260874 
/lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
7f73bfb19000-7f73bfb2d000 r-xp 00000000 08:01 264975 
/lib/x86_64-linux-gnu/libresolv-2.24.so
7f73bfb2d000-7f73bfd2c000 ---p 00014000 08:01 264975 
/lib/x86_64-linux-gnu/libresolv-2.24.so
7f73bfd2c000-7f73bfd2d000 r--p 00013000 08:01 264975 
/lib/x86_64-linux-gnu/libresolv-2.24.so
7f73bfd2d000-7f73bfd2e000 rw-p 00014000 08:01 264975 
/lib/x86_64-linux-gnu/libresolv-2.24.so
7f73bfd2e000-7f73bfd30000 rw-p 00000000 00:00 0
7f73bfd30000-7f73bfd44000 r-xp 00000000 08:01 264766 
/lib/x86_64-linux-gnu/libnsl-2.24.so
7f73bfd44000-7f73bff44000 ---p 00014000 08:01 264766 
/lib/x86_64-linux-gnu/libnsl-2.24.so
7f73bff44000-7f73bff45000 r--p 00014000 08:01 264766 
/lib/x86_64-linux-gnu/libnsl-2.24.so
7f73bff45000-7f73bff46000 rw-p 00015000 08:01 264766 
/lib/x86_64-linux-gnu/libnsl-2.24.so
7f73bff46000-7f73bff48000 rw-p 00000000 00:00 0
7f73bff48000-7f73c004f000 r-xp 00000000 08:01 261169 
/lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7f73c004f000-7f73c024f000 ---p 00107000 08:01 261169 
/lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7f73c024f000-7f73c0251000 r--p 00107000 08:01 261169 
/lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7f73c0251000-7f73c0258000 rw-p 00109000 08:01 261169 
/lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
7f73c0258000-7f73c0269000 r-xp 00000000 08:01 392903 
/usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7f73c0269000-7f73c0468000 ---p 00011000 08:01 392903 
/usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7f73c0468000-7f73c0469000 r--p 00010000 08:01 392903 
/usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7f73c0469000-7f73c046a000 rw-p 00011000 08:01 392903 
/usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
7f73c046a000-7f73c048f000 r-xp 00000000 08:01 261282 
/lib/x86_64-linux-gnu/liblzma.so.5.2.2
7f73c048f000-7f73c068e000 ---p 00025000 08:01 261282 
/lib/x86_64-linux-gnu/liblzma.so.5.2.2
7f73c068e000-7f73c068f000 r--p 00024000 08:01 261282 
/lib/x86_64-linux-gnu/liblzma.so.5.2.2
7f73c068f000-7f73c0690000 rw-p 00025000 08:01 261282 
/lib/x86_64-linux-gnu/liblzma.so.5.2.2
7f73c0690000-7f73c06b5000 r-xp 00000000 08:01 260622 
/lib/x86_64-linux-gnu/libselinux.so.1
7f73c06b5000-7f73c08b4000 ---p 00025000 08:01 260622 
/lib/x86_64-linux-gnu/libselinux.so.1
7f73c08b4000-7f73c08b5000 r--p 00024000 08:01 260622 
/lib/x86_64-linux-gnu/libselinux.so.1
7f73c08b5000-7f73c08b6000 rw-p 00025000 08:01 260622 
/lib/x86_64-linux-gnu/libselinux.so.1
7f73c08b6000-7f73c08b8000 rw-p 00000000 00:00 0
7f73c08b8000-7f73c08c7000 r-xp 00000000 08:01 408312 
/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f73c08c7000-7f73c0ac6000 ---p 0000f000 08:01 408312 
/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f73c0ac6000-7f73c0ac7000 r--p 0000e000 08:01 408312 
/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f73c0ac7000-7f73c0ac8000 rw-p 0000f000 08:01 408312 
/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f73c0ac8000-7f73c0acd000 r-xp 00000000 08:01 398156 
/usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f73c0acd000-7f73c0ccc000 ---p 00005000 08:01 398156 
/usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f73c0ccc000-7f73c0ccd000 r--p 00004000 08:01 398156 
/usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f73c0ccd000-7f73c0cce000 rw-p 00005000 08:01 398156 
/usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f73c0cce000-7f73c0cd6000 r-xp 00000000 08:01 261449 
/lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f73c0cd6000-7f73c0ed6000 ---p 00008000 08:01 261449 
/lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f73c0ed6000-7f73c0ed7000 r--p 00008000 08:01 261449 
/lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f73c0ed7000-7f73c0ed8000 rw-p 00009000 08:01 261449 
/lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f73c0ed8000-7f73c0edd000 r-xp 00000000 08:01 399688 
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7f73c0edd000-7f73c10dc000 ---p 00005000 08:01 399688 
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7f73c10dc000-7f73c10dd000 r--p 00004000 08:01 399688 
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7f73c10dd000-7f73c10de000 rw-p 00005000 08:01 399688 
/usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7f73c10de000-7f73c10df000 r-xp 00000000 08:01 394084 
/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f73c10df000-7f73c12de000 ---p 00001000 08:01 394084 
/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f73c12de000-7f73c12df000 r--p 00000000 08:01 394084 
/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f73c12df000-7f73c12e0000 rw-p 00001000 08:01 394084 
/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f73c12e0000-7f73c132d000 r-xp 00000000 08:01 262317 
/lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
7f73c132d000-7f73c152d000 ---p 0004d000 08:01 262317 
/lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
7f73c152d000-7f73c152f000 r--p 0004d000 08:01 262317 
/lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
7f73c152f000-7f73c1530000 rw-p 0004f000 08:01 262317 
/lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
7f73c175a000-7f73c175e000 r-xp 00000000 08:01 260737 
/lib/x86_64-linux-gnu/libcap.so.2.25
7f73c175e000-7f73c195e000 ---p 00004000 08:01 260737 
/lib/x86_64-linux-gnu/libcap.so.2.25
7f73c195e000-7f73c195f000 r--p 00004000 08:01 260737 
/lib/x86_64-linux-gnu/libcap.so.2.25
7f73c195f000-7f73c1960000 rw-p 00005000 08:01 260737 
/lib/x86_64-linux-gnu/libcap.so.2.25
7f73c1960000-7f73c19e0000 r-xp 00000000 08:01 403259 
/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
7f73c19e0000-7f73c1be0000 ---p 00080000 08:01 403259 
/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
7f73c1be0000-7f73c1be2000 r--p 00080000 08:01 403259 
/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
7f73c1be2000-7f73c1be3000 rw-p 00082000 08:01 403259 
/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
7f73c1be3000-7f73c1c31000 r-xp 00000000 08:01 403257 
/usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
7f73c1c31000-7f73c1e31000 ---p 0004e000 08:01 403257 
/usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
7f73c1e31000-7f73c1e33000 r--p 0004e000 08:01 403257 
/usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
7f73c1e33000-7f73c1e34000 rw-p 00050000 08:01 403257 
/usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
7f73c2083000-7f73c20f5000 r-xp 00000000 08:01 264199 
/lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f73c20f5000-7f73c22f4000 ---p 00072000 08:01 264199 
/lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f73c22f4000-7f73c22f5000 r--p 00071000 08:01 264199 
/lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f73c22f5000-7f73c22f6000 rw-p 00072000 08:01 264199 
/lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f73c2543000-7f73c2546000 r-xp 00000000 08:01 402528 
/usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f73c2546000-7f73c2746000 ---p 00003000 08:01 402528 
/usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f73c2746000-7f73c2747000 r--p 00003000 08:01 402528 
/usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f73c2747000-7f73c2748000 rw-p 00004000 08:01 402528 
/usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f73c2c9c000-7f73c2dae000 r-xp 00000000 08:01 264185 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
7f73c2dae000-7f73c2fad000 ---p 00112000 08:01 264185 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
7f73c2fad000-7f73c2fae000 r--p 00111000 08:01 264185 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
7f73c2fae000-7f73c2faf000 rw-p 00112000 08:01 264185 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
7f73c2faf000-7f73c2fb0000 rw-p 00000000 00:00 0
7f73c3485000-7f73c348a000 r-xp 00000000 08:01 412807 
/usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f73c348a000-7f73c3689000 ---p 00005000 08:01 412807 
/usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f73c3689000-7f73c368a000 r--p 00004000 08:01 412807 
/usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f73c368a000-7f73c368b000 rw-p 00005000 08:01 412807 
/usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f73c368b000-7f73c368e000 r-xp 00000000 08:01 402188 
/usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f73c368e000-7f73c388d000 ---p 00003000 08:01 402188 
/usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f73c388d000-7f73c388e000 r--p 00002000 08:01 402188 
/usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f73c388e000-7f73c388f000 rw-p 00003000 08:01 402188 
/usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f73c418c000-7f73c41b3000 r-xp 00000000 08:01 402898 
/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f73c41b3000-7f73c43b2000 ---p 00027000 08:01 402898 
/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f73c43b2000-7f73c43b3000 r--p 00026000 08:01 402898 
/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f73c43b3000-7f73c43b4000 rw-p 00027000 08:01 402898 
/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f73c43b4000-7f73c43c7000 r-xp 00000000 08:01 260708 
/lib/x86_64-linux-gnu/libbsd.so.0.8.3
7f73c43c7000-7f73c45c7000 ---p 00013000 08:01 260708 
/lib/x86_64-linux-gnu/libbsd.so.0.8.3
7f73c45c7000-7f73c45c8000 r--p 00013000 08:01 260708 
/lib/x86_64-linux-gnu/libbsd.so.0.8.3
7f73c45c8000-7f73c45c9000 rw-p 00014000 08:01 260708 
/lib/x86_64-linux-gnu/libbsd.so.0.8.3
7f73c45c9000-7f73c45ca000 rw-p 00000000 00:00 0
7f73c45ca000-7f73c45ce000 r-xp 00000000 08:01 262511 
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7f73c45ce000-7f73c47cd000 ---p 00004000 08:01 262511 
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7f73c47cd000-7f73c47ce000 r--p 00003000 08:01 262511 
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7f73c47ce000-7f73c47cf000 rw-p 00004000 08:01 262511 
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
7f73c52c4000-7f73c52d5000 r-xp 00000000 08:01 410981 
/usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f73c52d5000-7f73c54d4000 ---p 00011000 08:01 410981 
/usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f73c54d4000-7f73c54d5000 r--p 00010000 08:01 410981 
/usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f73c54d5000-7f73c54d6000 rw-p 00011000 08:01 410981 
/usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f73c54d6000-7f73c5610000 r-xp 00000000 08:01 391626 
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f73c5610000-7f73c5810000 ---p 0013a000 08:01 391626 
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f73c5810000-7f73c5811000 r--p 0013a000 08:01 391626 
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f73c5811000-7f73c5816000 rw-p 0013b000 08:01 391626 
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f73c5816000-7f73c582d000 r-xp 00000000 08:01 398235 
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7f73c582d000-7f73c5a2d000 ---p 00017000 08:01 398235 
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7f73c5a2d000-7f73c5a2e000 r--p 00017000 08:01 398235 
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7f73c5a2e000-7f73c5a2f000 rw-p 00018000 08:01 398235 
/usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7f73c5a2f000-7f73c5a33000 rw-p 00000000 00:00 0
7f73c5a33000-7f73c5a3a000 r-xp 00000000 08:01 404466 
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7f73c5a3a000-7f73c5c39000 ---p 00007000 08:01 404466 
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7f73c5c39000-7f73c5c3a000 r--p 00006000 08:01 404466 
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7f73c5c3a000-7f73c5c3b000 rw-p 00007000 08:01 404466 
/usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7f73c715a000-7f73c7170000 r-xp 00000000 08:01 268729 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f73c7170000-7f73c736f000 ---p 00016000 08:01 268729 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f73c736f000-7f73c7370000 r--p 00015000 08:01 268729 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f73c7370000-7f73c7371000 rw-p 00016000 08:01 268729 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f73c7371000-7f73c74e3000 r-xp 00000000 08:01 392327 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7f73c74e3000-7f73c76e3000 ---p 00172000 08:01 392327 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7f73c76e3000-7f73c76ed000 r--p 00172000 08:01 392327 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7f73c76ed000-7f73c76ef000 rw-p 0017c000 08:01 392327 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7f73c76ef000-7f73c76f3000 rw-p 00000000 00:00 0
7f73c7b04000-7f73c7b91000 r-xp 00000000 08:01 399137 
/usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f73c7b91000-7f73c7d90000 ---p 0008d000 08:01 399137 
/usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f73c7d90000-7f73c7dac000 r--p 0008c000 08:01 399137 
/usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f73c7dac000-7f73c7dad000 rw-p 000a8000 08:01 399137 
/usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f73c7dad000-7f73c7dd7000 r-xp 00000000 08:01 399141 
/usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f73c7dd7000-7f73c7fd7000 ---p 0002a000 08:01 399141 
/usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f73c7fd7000-7f73c7fd8000 r--p 0002a000 08:01 399141 
/usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f73c7fd8000-7f73c7fd9000 rw-p 0002b000 08:01 399141 
/usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f73c7fd9000-7f73c7fe0000 r-xp 00000000 08:01 403420 
/usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f73c7fe0000-7f73c81e0000 ---p 00007000 08:01 403420 
/usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f73c81e0000-7f73c81e1000 r--p 00007000 08:01 403420 
/usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f73c81e1000-7f73c81e2000 rw-p 00008000 08:01 403420 
/usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f73c81e2000-7f73c8257000 r-xp 00000000 08:01 400664 
/usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f73c8257000-7f73c8457000 ---p 00075000 08:01 400664 
/usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f73c8457000-7f73c8458000 r--p 00075000 08:01 400664 
/usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f73c8458000-7f73c8459000 rw-p 00076000 08:01 400664 
/usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f73c8459000-7f73c8460000 r-xp 00000000 08:01 264977 
/lib/x86_64-linux-gnu/librt-2.24.so
7f73c8460000-7f73c865f000 ---p 00007000 08:01 264977 
/lib/x86_64-linux-gnu/librt-2.24.so
7f73c865f000-7f73c8660000 r--p 00006000 08:01 264977 
/lib/x86_64-linux-gnu/librt-2.24.so
7f73c8660000-7f73c8661000 rw-p 00007000 08:01 264977 
/lib/x86_64-linux-gnu/librt-2.24.so
7f73c8661000-7f73c8664000 r-xp 00000000 08:01 264715 
/lib/x86_64-linux-gnu/libdl-2.24.so
7f73c8664000-7f73c8863000 ---p 00003000 08:01 264715 
/lib/x86_64-linux-gnu/libdl-2.24.so
7f73c8863000-7f73c8864000 r--p 00002000 08:01 264715 
/lib/x86_64-linux-gnu/libdl-2.24.so
7f73c8864000-7f73c8865000 rw-p 00003000 08:01 264715 
/lib/x86_64-linux-gnu/libdl-2.24.so
7f73c8865000-7f73c88d8000 r-xp 00000000 08:01 404271 
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
7f73c88d8000-7f73c8ad7000 ---p 00073000 08:01 404271 
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
7f73c8ad7000-7f73c8ada000 r--p 00072000 08:01 404271 
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
7f73c8ada000-7f73c8adb000 rw-p 00075000 08:01 404271 
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
7f73c8adb000-7f73c8add000 rw-p 00000000 00:00 0
7f73c8add000-7f73c8c72000 r-xp 00000000 08:01 264707 
/lib/x86_64-linux-gnu/libc-2.24.so
csound command: Aborted

Date2019-01-04 16:12
Fromjpff
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
Dies here on line 36 wth ivalid vallue of src I tink


31
32      void myflt_copy_value(void* csound, void* dest, void* src) {
33        IGN(csound);
34          MYFLT* f1 = (MYFLT*)dest;
35          MYFLT* f2 = (MYFLT*)src;
36          *f1 = *f2;
37      }
38
39      void asig_copy_value(void* csound, void* dest, void* src) {
40          IGN(csound);
(gdb) print dest
$1 = (void *) 0x988528
(gdb) print src
$2 = (void *) 0x9001

(gdb) where
#0  myflt_copy_value (csound=0x61f140, dest=0x988528, src=0x9001)
     at /home/jpff/csound6/Engine/csound_standard_types.c:36
#1  0x00007ffff79d1b95 in tabfill (csound=0x61f140, p=0x9807d8)
     at /home/jpff/csound6/Opcodes/arrays.c:166
#2  0x00007ffff78f33c9 in init0 (csound=csound@entry=0x61f140)
     at /home/jpff/csound6/Engine/insert.c:249
#3  0x00007ffff78fde1e in musmon (csound=csound@entry=0x61f140)
     at /home/jpff/csound6/Engine/musmon.c:254
#4  0x00007ffff7a49de2 in csoundStart (csound=csound@entry=0x61f140)
     at /home/jpff/csound6/Top/main.c:498
#5  0x00007ffff7a4a1b9 in csoundCompile (csound=csound@entry=0x61f140,
     argc=argc@entry=2, argv=argv@entry=0x7fffffffddf8)
     at /home/jpff/csound6/Top/main.c:505
#6  0x00000000004013d0 in main (argc=2, argv=0x7fffffffddf8)
     at /home/jpff/csound6/Frontends/csound/csound_main.c:324

(gdb) up
#1  0x00007ffff79d1b95 in tabfill (csound=0x61f140, p=0x9807d8)
     at /home/jpff/csound6/Opcodes/arrays.c:166
166           p->ans->arrayType->copyValue(csound,
(gdb) print *p
$3 = {h = {nxti = 0x0, nxtp = 0x0, iopadr = 0x7ffff79d1a70 ,
     opadr = 0x0, optext = 0x8404d0, insdshead = 0x97c790}, ans = 0x942508,
   iargs = {0x87aa78, 0x894ce8, 0x89b3e8, 0x89fab8, 0x8a7b78, 0x8ab568,
     0x7b9e58, 0x8411f8, 0x841e98, 0x842548, 0x843228, 0x843f08, 0x845888,
.......

Looks like too many arguments not properly policed.

==John ff

On Fri, 4 Jan 2019, joachim heintz wrote:

> i am running in a strange segfault with loading an #include'd text file with 
> a large 2dim array.
>
> first i create the array with
>  giSnippets[][] init 767, 6
>
> then i fill this array with lines like
>  giSnippets fillarray 1, 0.697, 3.850, 66.20, -38.8, 0.77,
>                               2, 2.125, 3.840, 89.43, -26.8, 0.43 etc
>
> this used to run fine the last days, but crashes now constantly.
>
> i tried to break this down, and found that commenting out one more item
>  (in the example: putting the /* after 334)
> does not crash any more.
>
> the strange thing is that "it worked yesterday" and i haven't compiled csound 
> since then.
> so i assume that it is a memory leak?
>
> the terminal output is below; perhaps it gives a clue to someone.
>
> best -
> 	joachim
>
>
>
> jh@lenov2:/media/jh/Daten/Joachim/Stuecke/49_quantum/csd$ csound 
> 190104_c_problem.csd
> time resolution is 1000.000 ns
> 0dBFS level = 32768.0
> --Csound version 6.13 beta (double samples) Jan  1 2019
> [commit: b296287f879eb6d5e888c57e5e631d2017c33df5]
> libsndfile-1.0.27
> WARNING: could not open library 
> '/usr/local/lib/csound/plugins64-6.0/libhdf5ops.so' (libhdf5_cpp.so.102: 
> cannot open shared object file: No such file or directory)
> UnifiedCSD:  190104_c_problem.csd
> STARTING FILE
> Creating options
> Creating orchestra
> closing tag
> Creating score
> rtaudio: ALSA module enabled
> rtmidi: ALSA Raw MIDI module enabled
> instr Test uses instrument number 1
> Elapsed time at end of orchestra compile: real: 0.035s, CPU: 0.035s
> sorting score ...
> 	... done
> Elapsed time at end of score sort: real: 0.035s, CPU: 0.035s
> graphics suppressed, ascii substituted
> 0dBFS level = 1.0
>
> csound command: Segmentation fault
> inactive allocs returned to freespace
> end of score.		   overall amps:  0.00000  0.00000
> 	   overall samples out of range:        0        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.285s, CPU: 0.035s
> *** Error in `csound': free(): invalid next size (normal): 0x0000562435285c50 
> ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f73c8b4dbfb]
> /lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f73c8b53fc6]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7f73c8b5480e]
> /usr/local/lib/libcsound64.so.6.0(+0x6dd18)[0x7f73c940ad18]
> /usr/local/lib/libcsound64.so.6.0(+0x47086)[0x7f73c93e4086]
> /usr/local/lib/libcsound64.so.6.0(csoundDestroy+0xc0)[0x7f73c93df714]
> /usr/local/lib/libcsound64.so.6.0(+0x42255)[0x7f73c93df255]
> /lib/x86_64-linux-gnu/libc.so.6(+0x35940)[0x7f73c8b12940]
> /lib/x86_64-linux-gnu/libc.so.6(+0x3599a)[0x7f73c8b1299a]
> csound(+0x15a3)[0x5624335565a3]
> /lib/x86_64-linux-gnu/libc.so.6(+0x33060)[0x7f73c8b10060]
> /usr/local/lib/libcsound64.so.6.0(+0x8018a)[0x7f73c941d18a]
> /usr/local/lib/libcsound64.so.6.0(+0x168cef)[0x7f73c9505cef]
> /usr/local/lib/libcsound64.so.6.0(+0x60ab7)[0x7f73c93fdab7]
> /usr/local/lib/libcsound64.so.6.0(+0x70b29)[0x7f73c940db29]
> /usr/local/lib/libcsound64.so.6.0(csoundStart+0x7d7)[0x7f73c959b617]
> /usr/local/lib/libcsound64.so.6.0(csoundCompile+0x42)[0x7f73c959b65f]
> csound(+0x18f6)[0x5624335568f6]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f73c8afd2e1]
> csound(_start+0x2a)[0x56243355637a]
> ======= Memory map: ========
> 562433555000-562433558000 r-xp 00000000 08:01 390960 /usr/local/bin/csound
> 562433757000-562433758000 r--p 00002000 08:01 390960 /usr/local/bin/csound
> 562433758000-562433759000 rw-p 00003000 08:01 390960 /usr/local/bin/csound
> 562434f31000-562435294000 rw-p 00000000 00:00 0 [heap]
> 7f73bf905000-7f73bf918000 r-xp 00000000 08:01 260874 
> /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
> 7f73bf918000-7f73bfb17000 ---p 00013000 08:01 260874 
> /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
> 7f73bfb17000-7f73bfb18000 r--p 00012000 08:01 260874 
> /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
> 7f73bfb18000-7f73bfb19000 rw-p 00013000 08:01 260874 
> /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0
> 7f73bfb19000-7f73bfb2d000 r-xp 00000000 08:01 264975 
> /lib/x86_64-linux-gnu/libresolv-2.24.so
> 7f73bfb2d000-7f73bfd2c000 ---p 00014000 08:01 264975 
> /lib/x86_64-linux-gnu/libresolv-2.24.so
> 7f73bfd2c000-7f73bfd2d000 r--p 00013000 08:01 264975 
> /lib/x86_64-linux-gnu/libresolv-2.24.so
> 7f73bfd2d000-7f73bfd2e000 rw-p 00014000 08:01 264975 
> /lib/x86_64-linux-gnu/libresolv-2.24.so
> 7f73bfd2e000-7f73bfd30000 rw-p 00000000 00:00 0
> 7f73bfd30000-7f73bfd44000 r-xp 00000000 08:01 264766 
> /lib/x86_64-linux-gnu/libnsl-2.24.so
> 7f73bfd44000-7f73bff44000 ---p 00014000 08:01 264766 
> /lib/x86_64-linux-gnu/libnsl-2.24.so
> 7f73bff44000-7f73bff45000 r--p 00014000 08:01 264766 
> /lib/x86_64-linux-gnu/libnsl-2.24.so
> 7f73bff45000-7f73bff46000 rw-p 00015000 08:01 264766 
> /lib/x86_64-linux-gnu/libnsl-2.24.so
> 7f73bff46000-7f73bff48000 rw-p 00000000 00:00 0
> 7f73bff48000-7f73c004f000 r-xp 00000000 08:01 261169 
> /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
> 7f73c004f000-7f73c024f000 ---p 00107000 08:01 261169 
> /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
> 7f73c024f000-7f73c0251000 r--p 00107000 08:01 261169 
> /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
> 7f73c0251000-7f73c0258000 rw-p 00109000 08:01 261169 
> /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6
> 7f73c0258000-7f73c0269000 r-xp 00000000 08:01 392903 
> /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
> 7f73c0269000-7f73c0468000 ---p 00011000 08:01 392903 
> /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
> 7f73c0468000-7f73c0469000 r--p 00010000 08:01 392903 
> /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
> 7f73c0469000-7f73c046a000 rw-p 00011000 08:01 392903 
> /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1
> 7f73c046a000-7f73c048f000 r-xp 00000000 08:01 261282 
> /lib/x86_64-linux-gnu/liblzma.so.5.2.2
> 7f73c048f000-7f73c068e000 ---p 00025000 08:01 261282 
> /lib/x86_64-linux-gnu/liblzma.so.5.2.2
> 7f73c068e000-7f73c068f000 r--p 00024000 08:01 261282 
> /lib/x86_64-linux-gnu/liblzma.so.5.2.2
> 7f73c068f000-7f73c0690000 rw-p 00025000 08:01 261282 
> /lib/x86_64-linux-gnu/liblzma.so.5.2.2
> 7f73c0690000-7f73c06b5000 r-xp 00000000 08:01 260622 
> /lib/x86_64-linux-gnu/libselinux.so.1
> 7f73c06b5000-7f73c08b4000 ---p 00025000 08:01 260622 
> /lib/x86_64-linux-gnu/libselinux.so.1
> 7f73c08b4000-7f73c08b5000 r--p 00024000 08:01 260622 
> /lib/x86_64-linux-gnu/libselinux.so.1
> 7f73c08b5000-7f73c08b6000 rw-p 00025000 08:01 260622 
> /lib/x86_64-linux-gnu/libselinux.so.1
> 7f73c08b6000-7f73c08b8000 rw-p 00000000 00:00 0
> 7f73c08b8000-7f73c08c7000 r-xp 00000000 08:01 408312 
> /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
> 7f73c08c7000-7f73c0ac6000 ---p 0000f000 08:01 408312 
> /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
> 7f73c0ac6000-7f73c0ac7000 r--p 0000e000 08:01 408312 
> /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
> 7f73c0ac7000-7f73c0ac8000 rw-p 0000f000 08:01 408312 
> /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
> 7f73c0ac8000-7f73c0acd000 r-xp 00000000 08:01 398156 
> /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
> 7f73c0acd000-7f73c0ccc000 ---p 00005000 08:01 398156 
> /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
> 7f73c0ccc000-7f73c0ccd000 r--p 00004000 08:01 398156 
> /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
> 7f73c0ccd000-7f73c0cce000 rw-p 00005000 08:01 398156 
> /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
> 7f73c0cce000-7f73c0cd6000 r-xp 00000000 08:01 261449 
> /lib/x86_64-linux-gnu/libwrap.so.0.7.6
> 7f73c0cd6000-7f73c0ed6000 ---p 00008000 08:01 261449 
> /lib/x86_64-linux-gnu/libwrap.so.0.7.6
> 7f73c0ed6000-7f73c0ed7000 r--p 00008000 08:01 261449 
> /lib/x86_64-linux-gnu/libwrap.so.0.7.6
> 7f73c0ed7000-7f73c0ed8000 rw-p 00009000 08:01 261449 
> /lib/x86_64-linux-gnu/libwrap.so.0.7.6
> 7f73c0ed8000-7f73c0edd000 r-xp 00000000 08:01 399688 
> /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
> 7f73c0edd000-7f73c10dc000 ---p 00005000 08:01 399688 
> /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
> 7f73c10dc000-7f73c10dd000 r--p 00004000 08:01 399688 
> /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
> 7f73c10dd000-7f73c10de000 rw-p 00005000 08:01 399688 
> /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
> 7f73c10de000-7f73c10df000 r-xp 00000000 08:01 394084 
> /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
> 7f73c10df000-7f73c12de000 ---p 00001000 08:01 394084 
> /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
> 7f73c12de000-7f73c12df000 r--p 00000000 08:01 394084 
> /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
> 7f73c12df000-7f73c12e0000 rw-p 00001000 08:01 394084 
> /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
> 7f73c12e0000-7f73c132d000 r-xp 00000000 08:01 262317 
> /lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
> 7f73c132d000-7f73c152d000 ---p 0004d000 08:01 262317 
> /lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
> 7f73c152d000-7f73c152f000 r--p 0004d000 08:01 262317 
> /lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
> 7f73c152f000-7f73c1530000 rw-p 0004f000 08:01 262317 
> /lib/x86_64-linux-gnu/libdbus-1.so.3.14.15
> 7f73c175a000-7f73c175e000 r-xp 00000000 08:01 260737 
> /lib/x86_64-linux-gnu/libcap.so.2.25
> 7f73c175e000-7f73c195e000 ---p 00004000 08:01 260737 
> /lib/x86_64-linux-gnu/libcap.so.2.25
> 7f73c195e000-7f73c195f000 r--p 00004000 08:01 260737 
> /lib/x86_64-linux-gnu/libcap.so.2.25
> 7f73c195f000-7f73c1960000 rw-p 00005000 08:01 260737 
> /lib/x86_64-linux-gnu/libcap.so.2.25
> 7f73c1960000-7f73c19e0000 r-xp 00000000 08:01 403259 
> /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
> 7f73c19e0000-7f73c1be0000 ---p 00080000 08:01 403259 
> /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
> 7f73c1be0000-7f73c1be2000 r--p 00080000 08:01 403259 
> /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
> 7f73c1be2000-7f73c1be3000 rw-p 00082000 08:01 403259 
> /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
> 7f73c1be3000-7f73c1c31000 r-xp 00000000 08:01 403257 
> /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
> 7f73c1c31000-7f73c1e31000 ---p 0004e000 08:01 403257 
> /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
> 7f73c1e31000-7f73c1e33000 r--p 0004e000 08:01 403257 
> /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
> 7f73c1e33000-7f73c1e34000 rw-p 00050000 08:01 403257 
> /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.1
> 7f73c2083000-7f73c20f5000 r-xp 00000000 08:01 264199 
> /lib/x86_64-linux-gnu/libpcre.so.3.13.3
> 7f73c20f5000-7f73c22f4000 ---p 00072000 08:01 264199 
> /lib/x86_64-linux-gnu/libpcre.so.3.13.3
> 7f73c22f4000-7f73c22f5000 r--p 00071000 08:01 264199 
> /lib/x86_64-linux-gnu/libpcre.so.3.13.3
> 7f73c22f5000-7f73c22f6000 rw-p 00072000 08:01 264199 
> /lib/x86_64-linux-gnu/libpcre.so.3.13.3
> 7f73c2543000-7f73c2546000 r-xp 00000000 08:01 402528 
> /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
> 7f73c2546000-7f73c2746000 ---p 00003000 08:01 402528 
> /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
> 7f73c2746000-7f73c2747000 r--p 00003000 08:01 402528 
> /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
> 7f73c2747000-7f73c2748000 rw-p 00004000 08:01 402528 
> /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
> 7f73c2c9c000-7f73c2dae000 r-xp 00000000 08:01 264185 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
> 7f73c2dae000-7f73c2fad000 ---p 00112000 08:01 264185 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
> 7f73c2fad000-7f73c2fae000 r--p 00111000 08:01 264185 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
> 7f73c2fae000-7f73c2faf000 rw-p 00112000 08:01 264185 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0.5000.3
> 7f73c2faf000-7f73c2fb0000 rw-p 00000000 00:00 0
> 7f73c3485000-7f73c348a000 r-xp 00000000 08:01 412807 
> /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
> 7f73c348a000-7f73c3689000 ---p 00005000 08:01 412807 
> /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
> 7f73c3689000-7f73c368a000 r--p 00004000 08:01 412807 
> /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
> 7f73c368a000-7f73c368b000 rw-p 00005000 08:01 412807 
> /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
> 7f73c368b000-7f73c368e000 r-xp 00000000 08:01 402188 
> /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
> 7f73c368e000-7f73c388d000 ---p 00003000 08:01 402188 
> /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
> 7f73c388d000-7f73c388e000 r--p 00002000 08:01 402188 
> /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
> 7f73c388e000-7f73c388f000 rw-p 00003000 08:01 402188 
> /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
> 7f73c418c000-7f73c41b3000 r-xp 00000000 08:01 402898 
> /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
> 7f73c41b3000-7f73c43b2000 ---p 00027000 08:01 402898 
> /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
> 7f73c43b2000-7f73c43b3000 r--p 00026000 08:01 402898 
> /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
> 7f73c43b3000-7f73c43b4000 rw-p 00027000 08:01 402898 
> /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
> 7f73c43b4000-7f73c43c7000 r-xp 00000000 08:01 260708 
> /lib/x86_64-linux-gnu/libbsd.so.0.8.3
> 7f73c43c7000-7f73c45c7000 ---p 00013000 08:01 260708 
> /lib/x86_64-linux-gnu/libbsd.so.0.8.3
> 7f73c45c7000-7f73c45c8000 r--p 00013000 08:01 260708 
> /lib/x86_64-linux-gnu/libbsd.so.0.8.3
> 7f73c45c8000-7f73c45c9000 rw-p 00014000 08:01 260708 
> /lib/x86_64-linux-gnu/libbsd.so.0.8.3
> 7f73c45c9000-7f73c45ca000 rw-p 00000000 00:00 0
> 7f73c45ca000-7f73c45ce000 r-xp 00000000 08:01 262511 
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f73c45ce000-7f73c47cd000 ---p 00004000 08:01 262511 
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f73c47cd000-7f73c47ce000 r--p 00003000 08:01 262511 
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f73c47ce000-7f73c47cf000 rw-p 00004000 08:01 262511 
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f73c52c4000-7f73c52d5000 r-xp 00000000 08:01 410981 
> /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
> 7f73c52d5000-7f73c54d4000 ---p 00011000 08:01 410981 
> /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
> 7f73c54d4000-7f73c54d5000 r--p 00010000 08:01 410981 
> /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
> 7f73c54d5000-7f73c54d6000 rw-p 00011000 08:01 410981 
> /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
> 7f73c54d6000-7f73c5610000 r-xp 00000000 08:01 391626 
> /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
> 7f73c5610000-7f73c5810000 ---p 0013a000 08:01 391626 
> /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
> 7f73c5810000-7f73c5811000 r--p 0013a000 08:01 391626 
> /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
> 7f73c5811000-7f73c5816000 rw-p 0013b000 08:01 391626 
> /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
> 7f73c5816000-7f73c582d000 r-xp 00000000 08:01 398235 
> /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
> 7f73c582d000-7f73c5a2d000 ---p 00017000 08:01 398235 
> /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
> 7f73c5a2d000-7f73c5a2e000 r--p 00017000 08:01 398235 
> /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
> 7f73c5a2e000-7f73c5a2f000 rw-p 00018000 08:01 398235 
> /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
> 7f73c5a2f000-7f73c5a33000 rw-p 00000000 00:00 0
> 7f73c5a33000-7f73c5a3a000 r-xp 00000000 08:01 404466 
> /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
> 7f73c5a3a000-7f73c5c39000 ---p 00007000 08:01 404466 
> /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
> 7f73c5c39000-7f73c5c3a000 r--p 00006000 08:01 404466 
> /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
> 7f73c5c3a000-7f73c5c3b000 rw-p 00007000 08:01 404466 
> /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
> 7f73c715a000-7f73c7170000 r-xp 00000000 08:01 268729 
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f73c7170000-7f73c736f000 ---p 00016000 08:01 268729 
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f73c736f000-7f73c7370000 r--p 00015000 08:01 268729 
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f73c7370000-7f73c7371000 rw-p 00016000 08:01 268729 
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f73c7371000-7f73c74e3000 r-xp 00000000 08:01 392327 
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
> 7f73c74e3000-7f73c76e3000 ---p 00172000 08:01 392327 
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
> 7f73c76e3000-7f73c76ed000 r--p 00172000 08:01 392327 
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
> 7f73c76ed000-7f73c76ef000 rw-p 0017c000 08:01 392327 
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
> 7f73c76ef000-7f73c76f3000 rw-p 00000000 00:00 0
> 7f73c7b04000-7f73c7b91000 r-xp 00000000 08:01 399137 
> /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
> 7f73c7b91000-7f73c7d90000 ---p 0008d000 08:01 399137 
> /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
> 7f73c7d90000-7f73c7dac000 r--p 0008c000 08:01 399137 
> /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
> 7f73c7dac000-7f73c7dad000 rw-p 000a8000 08:01 399137 
> /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
> 7f73c7dad000-7f73c7dd7000 r-xp 00000000 08:01 399141 
> /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
> 7f73c7dd7000-7f73c7fd7000 ---p 0002a000 08:01 399141 
> /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
> 7f73c7fd7000-7f73c7fd8000 r--p 0002a000 08:01 399141 
> /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
> 7f73c7fd8000-7f73c7fd9000 rw-p 0002b000 08:01 399141 
> /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
> 7f73c7fd9000-7f73c7fe0000 r-xp 00000000 08:01 403420 
> /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
> 7f73c7fe0000-7f73c81e0000 ---p 00007000 08:01 403420 
> /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
> 7f73c81e0000-7f73c81e1000 r--p 00007000 08:01 403420 
> /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
> 7f73c81e1000-7f73c81e2000 rw-p 00008000 08:01 403420 
> /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
> 7f73c81e2000-7f73c8257000 r-xp 00000000 08:01 400664 
> /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
> 7f73c8257000-7f73c8457000 ---p 00075000 08:01 400664 
> /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
> 7f73c8457000-7f73c8458000 r--p 00075000 08:01 400664 
> /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
> 7f73c8458000-7f73c8459000 rw-p 00076000 08:01 400664 
> /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
> 7f73c8459000-7f73c8460000 r-xp 00000000 08:01 264977 
> /lib/x86_64-linux-gnu/librt-2.24.so
> 7f73c8460000-7f73c865f000 ---p 00007000 08:01 264977 
> /lib/x86_64-linux-gnu/librt-2.24.so
> 7f73c865f000-7f73c8660000 r--p 00006000 08:01 264977 
> /lib/x86_64-linux-gnu/librt-2.24.so
> 7f73c8660000-7f73c8661000 rw-p 00007000 08:01 264977 
> /lib/x86_64-linux-gnu/librt-2.24.so
> 7f73c8661000-7f73c8664000 r-xp 00000000 08:01 264715 
> /lib/x86_64-linux-gnu/libdl-2.24.so
> 7f73c8664000-7f73c8863000 ---p 00003000 08:01 264715 
> /lib/x86_64-linux-gnu/libdl-2.24.so
> 7f73c8863000-7f73c8864000 r--p 00002000 08:01 264715 
> /lib/x86_64-linux-gnu/libdl-2.24.so
> 7f73c8864000-7f73c8865000 rw-p 00003000 08:01 264715 
> /lib/x86_64-linux-gnu/libdl-2.24.so
> 7f73c8865000-7f73c88d8000 r-xp 00000000 08:01 404271 
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
> 7f73c88d8000-7f73c8ad7000 ---p 00073000 08:01 404271 
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
> 7f73c8ad7000-7f73c8ada000 r--p 00072000 08:01 404271 
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
> 7f73c8ada000-7f73c8adb000 rw-p 00075000 08:01 404271 
> /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.27
> 7f73c8adb000-7f73c8add000 rw-p 00000000 00:00 0
> 7f73c8add000-7f73c8c72000 r-xp 00000000 08:01 264707 
> /lib/x86_64-linux-gnu/libc-2.24.so
> csound command: Aborted

Date2019-01-04 16:28
Fromjpff
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
As I thought

graphics suppressed, ascii substituted
0dBFS level = 1.0
==4383== Invalid write of size 8
==4383==    at 0x4E992E4: instance (insert.c:2491)
==4383==    by 0x4E9A319: init0 (insert.c:235)
==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
==4383==    by 0x4013CF: main (csound_main.c:324)
==4383==  Address 0x1ba291f8 is 0 bytes after a block of size 32,536 
alloc'd
==4383==    at 0x4C30035: calloc (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4383==    by 0x4EA1B62: mcalloc (memalloc.c:113)
==4383==    by 0x4E98F7C: instance (insert.c:2340)
==4383==    by 0x4E9A319: init0 (insert.c:235)
==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
==4383==    by 0x4013CF: main (csound_main.c:324)

etc


Mainly Victor's code.  I see no check that the number of arguments is 
limited.  The allocation includes many things (line 2340)  and it iruns a 
loop on i with no limit just a list of args.

Date2019-01-04 17:28
FromVictor Lazzarini
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
This part (line 2340) is not quite my code, although I might have touched it to adjust or fix things. The allocation of memory is, in the
case of arrays, only concerned with ARRAYDAT structure, the actual memory for the data is allocate
by code in array.c. 

The memory allocated includes all the space for variables in the instrument as provided by INSTRTXT. The
amount required is defined by the compiler code. 

The loop starting at 2487 connects opcode arguments with their sources (pointers). Line 2491 is the case
for constants. I did not write this code originally, but I might have fixed bits while we were working on 6.0.
I would have expected that the list is correctly NULL terminated and the compiler would have provided
a correct number of arguments.

Not sure what the issue is.

Victor

> On 4 Jan 2019, at 16:28, jpff  wrote:
> 
> As I thought
> 
> graphics suppressed, ascii substituted
> 0dBFS level = 1.0
> ==4383== Invalid write of size 8
> ==4383==    at 0x4E992E4: instance (insert.c:2491)
> ==4383==    by 0x4E9A319: init0 (insert.c:235)
> ==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
> ==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
> ==4383==    by 0x4013CF: main (csound_main.c:324)
> ==4383==  Address 0x1ba291f8 is 0 bytes after a block of size 32,536 alloc'd
> ==4383==    at 0x4C30035: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==4383==    by 0x4EA1B62: mcalloc (memalloc.c:113)
> ==4383==    by 0x4E98F7C: instance (insert.c:2340)
> ==4383==    by 0x4E9A319: init0 (insert.c:235)
> ==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
> ==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
> ==4383==    by 0x4013CF: main (csound_main.c:324)
> 
> etc
> 
> 
> Mainly Victor's code.  I see no check that the number of arguments is limited.  The allocation includes many things (line 2340)  and it iruns a loop on i with no limit just a list of args.
> 

Date2019-01-04 17:39
FromVictor Lazzarini
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
I looked at Joachim’s code, and I am still puzzled as to how the number of arguments to fillarray is
limited. Is there a limit? What’s the limit? The insert.c code surely does not expect a hard limit
in terms of inargs. 

If there is one, then we can place a check somewhere (but not here, it needs to be a compile/parse/syntax
error).

=======================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 Jan 2019, at 16:28, jpff  wrote:
> 
> As I thought
> 
> graphics suppressed, ascii substituted
> 0dBFS level = 1.0
> ==4383== Invalid write of size 8
> ==4383==    at 0x4E992E4: instance (insert.c:2491)
> ==4383==    by 0x4E9A319: init0 (insert.c:235)
> ==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
> ==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
> ==4383==    by 0x4013CF: main (csound_main.c:324)
> ==4383==  Address 0x1ba291f8 is 0 bytes after a block of size 32,536 alloc'd
> ==4383==    at 0x4C30035: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==4383==    by 0x4EA1B62: mcalloc (memalloc.c:113)
> ==4383==    by 0x4E98F7C: instance (insert.c:2340)
> ==4383==    by 0x4E9A319: init0 (insert.c:235)
> ==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
> ==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
> ==4383==    by 0x4013CF: main (csound_main.c:324)
> 
> etc
> 
> 
> Mainly Victor's code.  I see no check that the number of arguments is limited.  The allocation includes many things (line 2340)  and it iruns a loop o

Date2019-01-04 17:39
Fromjpff
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
#iam deep in gdb at present.  The simplified broken version has 2000 
aruments and that is shown in the allocations.  It creates the 2D array as 
I would expect and has the correct sizes etc.  In the loop to copy the 
values (arrays.c lines 265-169) in fillbuf all looks good to start with 
but at sime stage unsecified the src address becomes totally wrong, anf d 
not a valifd pointerat all.

So it looks as if the end oof the inut args goes wrng.  Will add more 
tracing in a short while.  I thought it might be tabensure again but that 
is a noop in 2D cases (maybe it should not be....)

So may be my error; not sure I tried 2000 input argumemts before.

Date2019-01-04 17:42
FromVictor Lazzarini
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
I did not know we had a limit; if we do, then the insert.c is clearly going to break at some point. But, again,
if we do, we need to policy it elsewhere.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 Jan 2019, at 17:39, jpff  wrote:
> 
> #iam deep in gdb at present.  The simplified broken version has 2000 aruments and that is shown in the allocations.  It creates the 2D array as I would expect and has the correct sizes etc.  In the loop to copy the values (arrays.c lines 265-169) in fillbuf all looks good to start with but at sime stage unsecified the src address becomes totally wrong, anf d not a valifd pointerat all.
> 
> So it looks as if the end oof the inut args goes wrng.  Will add more tracing in a short while.  I thought it might be tabensure again but that is a noop in 2D cases (maybe it should not be....)
> 
> So may be my error; not sure I tried 2000 input argumemts before.
> 

Date2019-01-04 19:59
Fromjpff
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
There is not a limit but a break point.  After PMAX the p-valuesare in an 
extebsion array -- look at fgens.c for examples,

Yes insert dores not seem to know about hs extended p-fields.  Been around 

Date2019-01-04 20:36
FromMauro Giubileo
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
Attachmentsftgen_limit.csd  

I found problems with ftgen (GEN02) too, when the number of elements is > 1993.

I attached a csd that goes in crash.

---
Mauro

 


Il 2019-01-04 18:39 Victor Lazzarini ha scritto:

I looked at Joachim's code, and I am still puzzled as to how the number of arguments to fillarray is
limited. Is there a limit? What's the limit? The insert.c code surely does not expect a hard limit
in terms of inargs.

If there is one, then we can place a check somewhere (but not here, it needs to be a compile/parse/syntax
error).

=======================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 4 Jan 2019, at 16:28, jpff <jpff@codemist.co.uk> wrote:

As I thought

graphics suppressed, ascii substituted
0dBFS level = 1.0
==4383== Invalid write of size 8
==4383==    at 0x4E992E4: instance (insert.c:2491)
==4383==    by 0x4E9A319: init0 (insert.c:235)
==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
==4383==    by 0x4013CF: main (csound_main.c:324)
==4383==  Address 0x1ba291f8 is 0 bytes after a block of size 32,536 alloc'd
==4383==    at 0x4C30035: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4383==    by 0x4EA1B62: mcalloc (memalloc.c:113)
==4383==    by 0x4E98F7C: instance (insert.c:2340)
==4383==    by 0x4E9A319: init0 (insert.c:235)
==4383==    by 0x4EA4E1D: musmon (musmon.c:254)
==4383==    by 0x4FF0DE1: csoundStart (main.c:498)
==4383==    by 0x4013CF: main (csound_main.c:324)

etc


Mainly Victor's code.  I see no check that the number of arguments is limited.  The allocation includes many things (line 2340)  and it iruns a loop on i with no limit just a list of args.

==J

Date2019-01-04 20:38
FromVictor Lazzarini
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
no, I don't think it knows.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Jan 2019, at 19:59, jpff  wrote:
> 
> There is not a limit but a break point.  After PMAX the p-valuesare in an extebsion array -- look at fgens.c for examples,
> 
> Yes insert dores not seem to know about hs extended p-fields.  Been aroun

Date2019-01-04 21:11
Fromjpff
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?
Same problem.  There is a fixed size array of 1999 values in fillarray and 
ftgen with no check.

Date2019-01-05 10:10
FromMauro Giubileo
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?

So, the problem is here?

in H/csoundCore.h:

#define VARGMAX (1999)

If I understand correctly, it means that, for each opcode inside a csd code, Csound always reserves an array of 1999 pointers for its args (~16KB for each opcode if we consider 64bit pointers). It would be nice if Csound could reserve memory just for the number of args each specific opcode needs. In this way, that limit of VARGMAX should not be needed anymore, but I suppose it's not an easy task and it would require changing a big amount of source code...

Another way could be to allow "join" of arrays or ftables. In this way, we could just define a table splitted in many arrays and then join them with another opcode. Something like:

iArr1 fillarray 1, 2, ..., 1993
iArr2 fillarray 1994, ..., 3986
iArr2 fillarray 3987, ..., 5979
iArr  joinarray iArr1, iArr2, iArr3

This should allow the user to overcome that args limit by simply adding a new opcode to join arrays and another one to make the same thing with ftables. What do you think?

---
Mauro


Il 2019-01-04 22:11 jpff ha scritto:

Same problem.  There is a fixed size array of 1999 values in fillarray and ftgen with no check.

If he gen02 is in the score than that is different and a bug.

Date2019-01-05 10:29
FromMauro Giubileo
SubjectRe: [Csnd-dev] memory problem for long 2d arrays?

Sorry, I should've used the brackets in my previous example:

iArr1[] fillarray 1, 2, ..., 1993
iArr2[] fillarray 1994, ..., 3986
iArr3[] fillarray 3987, ..., 5979
iArr[]  joinarray iArr1, iArr2, iArr3

And being that, once joined, probably I don't need anymore the splitted arrays, it could be nice if I could tell Csound to "free" memory for those. I suppose this could already be done with "iArr init 1" ?

Anyway, when there is an opcode with more than 1999 args, it would be nice if Csound would stop the parsing and tell the user that he can't use more than VARGMAX number of args, instead of crashing.

---
Mauro

 

Il 2019-01-05 11:10 Mauro Giubileo ha scritto:

So, the problem is here?

in H/csoundCore.h:

#define VARGMAX (1999)

If I understand correctly, it means that, for each opcode inside a csd code, Csound always reserves an array of 1999 pointers for its args (~16KB for each opcode if we consider 64bit pointers). It would be nice if Csound could reserve memory just for the number of args each specific opcode needs. In this way, that limit of VARGMAX should not be needed anymore, but I suppose it's not an easy task and it would require changing a big amount of source code...

Another way could be to allow "join" of arrays or ftables. In this way, we could just define a table splitted in many arrays and then join them with another opcode. Something like:

iArr1 fillarray 1, 2, ..., 1993
iArr2 fillarray 1994, ..., 3986
iArr2 fillarray 3987, ..., 5979
iArr  joinarray iArr1, iArr2, iArr3

This should allow the user to overcome that args limit by simply adding a new opcode to join arrays and another one to make the same thing with ftables. What do you think?

---
Mauro


Il 2019-01-04 22:11 jpff ha scritto:

Same problem.  There is a fixed size array of 1999 values in fillarray and ftgen with no check.

If he gen02 is in the score than that is different and a bug.