[Cs-dev] string channels
Date | 2014-03-15 15:09 |
From | Andres Cabrera |
Subject | [Cs-dev] string channels |
Attachments | None None |
Hi, When using string channels, i am using the the csoundGetChannelDatasize to find the string size, but it is always returning 16. Am I doing something wrong?CsoundUserData *ud = (CsoundUserData *) csoundGetHostData(csound); if (channelType == &CS_VAR_TYPE_S) { // channel is a string channel char *string = (char *) channelValuePtr; QString newValue = ud->wl->getStringForChannel(channelName); int maxlen = csoundGetChannelDatasize(csound, channelName); if (maxlen == 0) { return; } strncpy(string, newValue.toLocal8Bit(), maxlen); if (newValue.size() >= maxlen) { string[maxlen - 1] = '\0'; } } Cheers, Andrés |
Date | 2014-03-18 02:00 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] string channels |
Attachments | None None |
Hi, Any ideas? Many examples in CsoundQt that use string channels are currently broken, but I'm not sure if it's the way I am checking for channel length or it's a bug in the channel mechanism.Cheers, Andrés On Sat, Mar 15, 2014 at 8:09 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
|
Date | 2014-03-18 02:11 |
From | Steven Yi |
Subject | Re: [Cs-dev] string channels |
I haven't looked at this area of code before, but bus.c has this code in csoundGetChannelDataSize: if (pp->type == CSOUND_STRING_CHANNEL) return strlen((char *) pp->data) + 1; This seems like it wasn't updated for pp being a STRINGDAT instead of char*. Maybe try replacing that code with: if (pp->type == CSOUND_STRING_CHANNEL) return ((STRINGDAT*)pp)->size; ? On Mon, Mar 17, 2014 at 10:00 PM, Andres Cabrera |
Date | 2014-03-18 08:25 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] string channels |
That sounds correct to me. Can you push it to git? I was mired in writing a paper over the last week, so I had no time to look into this. ======================== Dr Victor Lazzarini Senior Lecturer NUI Maynooth, Ireland victor dot lazzarini at nuim dot ie On 18 Mar 2014, at 02:11, Steven Yi |
Date | 2014-03-18 12:40 |
From | Steven Yi |
Subject | Re: [Cs-dev] string channels |
I'm working on this now and using a unit test. I'm finding there's some other bugs too. I should have this sorted shortly and will report back once complete. On Tue, Mar 18, 2014 at 4:25 AM, Victor Lazzarini |
Date | 2014-03-18 12:52 |
From | Steven Yi |
Subject | Re: [Cs-dev] string channels |
I've fixed up String channels. There were a few issues: * the code I posted earlier was slightly off and I should have casted the pp->data to STRINGDAT, not pp * Also, in csoundGetChannelDataSize, the check for if the channel was a String one was incorrect, as the channelType is a bit flag and is generally bit-or'd between the type of channel and whether if it is an input or output channel. The comparison then with == was replace with an & bit flag test. * csoundSetStringChannel was only setting the string contents up to strlen, but was not setting the last byte to NULL. With the way code should be used with csoundGetChannelDataSize reporting the len + 1 for the NULL, I added an extra bit of code to NULL the last byte. That got the unit test to pass. Andres: Could you pull from the develop branch and give it a try? Thanks! steven On Tue, Mar 18, 2014 at 8:40 AM, Steven Yi |
Date | 2014-03-18 17:44 |
From | joachim heintz |
Subject | Re: [Cs-dev] string channels |
Attachments | test_invalue.csd None None |
hi steven - i don't want to reply instead of andrés, but as i discovered this issue while working with csoundqt, i tested your code. no success, unfortunately (this can of course have reasons in csoundqt itself). i tested the csd which is attached. the output is below. perhaps it helps. best - joachim *** glibc detected *** /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6: free(): invalid pointer: 0x0000000003092080 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fdf67513b96] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x4537b2] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x454484] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x581f95] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x45f981] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x4f4c32] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x5b9dd6] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x2b1)[0x7fdf681f6281] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN7QAction9triggeredEb+0x32)[0x7fdf686fe132] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN7QAction8activateENS_11ActionEventE+0x6f)[0x7fdf686fe31f] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x59ad8a)[0x7fdf68ad3d8a] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent+0x8c)[0x7fdf68ad403c] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN11QToolButton17mouseReleaseEventEP11QMouseEvent+0xa)[0x7fdf68b9161a] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x684)[0x7fdf68755144] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xb4)[0x7fdf68704894] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0xabf)[0x7fdf6870a0bf] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c)[0x7fdf681e1e9c] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb+0x172)[0x7fdf68705862] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bc35)[0x7fdf68784c35] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(_ZN12QApplication15x11ProcessEventEP7_XEvent+0xdce)[0x7fdf68783bee] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x274112)[0x7fdf687ad112] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7fdf62e4bd13] /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x48060)[0x7fdf62e4c060] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7fdf62e4c124] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x6f)[0x7fdf682113bf] /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d9e)[0x7fdf687acd9e] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32)[0x7fdf681e0c82] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xf7)[0x7fdf681e0ed7] /usr/lib/x86_64-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x87)[0x7fdf681e5f67] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x4aadf8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fdf674b676d] /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6[0x4286c9] ======= Memory map: ======== 00400000-0098d000 r-xp 00000000 08:05 15866402 /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6 0098d000-0098e000 r--p 0058c000 08:05 15866402 /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6 0098e000-00991000 rw-p 0058d000 08:05 15866402 /home/jh/src/qutecsound-code/bin/CsoundQt-d-py-cs6 00991000-00993000 rw-p 00000000 00:00 0 01eef000-03bad000 rw-p 00000000 00:00 0 [heap] 7fdf13190000-7fdf18000000 rw-s 00000000 00:12 25987 /run/shm/jack-1000-0 7fdf18000000-7fdf18022000 rw-p 00000000 00:00 0 7fdf18022000-7fdf1c000000 ---p 00000000 00:00 0 7fdf20000000-7fdf20022000 rw-p 00000000 00:00 0 7fdf20022000-7fdf24000000 ---p 00000000 00:00 0 7fdf24000000-7fdf2403e000 rw-p 00000000 00:00 0 7fdf2403e000-7fdf28000000 ---p 00000000 00:00 0 7fdf28000000-7fdf28022000 rw-p 00000000 00:00 0 7fdf28022000-7fdf2c000000 ---p 00000000 00:00 0 7fdf2c000000-7fdf2c022000 rw-p 00000000 00:00 0 7fdf2c022000-7fdf30000000 ---p 00000000 00:00 0 7fdf30000000-7fdf30022000 rw-p 00000000 00:00 0 7fdf30022000-7fdf34000000 ---p 00000000 00:00 0 7fdf34c18000-7fdf34c19000 ---p 00000000 00:00 0 7fdf34c19000-7fdf35419000 rw-p 00000000 00:00 0 7fdf35419000-7fdf3541a000 ---p 00000000 00:00 0 7fdf3541a000-7fdf35c1a000 rw-p 00000000 00:00 0 7fdf35c1a000-7fdf35c1b000 ---p 00000000 00:00 0 7fdf35c1b000-7fdf3641b000 rw-p 00000000 00:00 0 7fdf3641b000-7fdf3647b000 rw-s 00000000 00:04 1769493 /SYSV00000000 (deleted) 7fdf3647b000-7fdf3647c000 ---p 00000000 00:00 0 7fdf3647c000-7fdf36c7c000 rw-p 00000000 00:00 0 7fdf36c7c000-7fdf36c7d000 ---p 00000000 00:00 0 7fdf36c7d000-7fdf3747d000 rw-p 00000000 00:00 0 7fdf3747d000-7fdf3747e000 ---p 00000000 00:00 0 7fdf3747e000-7fdf37c7e000 rw-p 00000000 00:00 0 7fdf37c7e000-7fdf3be3f000 r--p 00000000 08:05 10879161 /usr/share/icons/gnome/icon-theme.cache 7fdf3be3f000-7fdf40000000 r--p 00000000 08:05 10879161 /usr/share/icons/gnome/icon-theme.cache 7fdf40000000-7fdf40021000 rw-p 00000000 00:00 0 7fdf40021000-7fdf44000000 ---p 00000000 00:00 0 7fdf4437e000-7fdf443ad000 r--p 00000000 08:05 10623220 /usr/share/fonts/truetype/droid/DroidSans-Bold.ttf 7fdf4494c000-7fdf44990000 r--p 00000000 08:05 3936968 /usr/share/fonts/truetype/msttcorefonts/Arial.ttf 7fdf44990000-7fdf449aa000 r--p 00000000 08:05 3936960 /usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf 7fdf449aa000-7fdf449ab000 ---p 00000000 00:00 0 7fdf449ab000-7fdf44a2b000 rw-p 00000000 00:00 0 7fdf44a2b000-7fdf44a2c000 ---p 00000000 00:00 0 7fdf44a2c000-7fdf44aac000 rw-p 00000000 00:00 0 7fdf44aac000-7fdf44aad000 ---p 00000000 00:00 0 7fdf44aad000-7fdf44b2d000 rw-p 00000000 00:00 0 7fdf44b2d000-7fdf44b2e000 ---p 00000000 00:00 0 7fdf44b2e000-7fdf44bae000 rw-p 00000000 00:00 0 7fdf44bae000-7fdf44bbe000 r-xp 00000000 08:05 9830660 /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so 7fdf44bbe000-7fdf44dbd000 ---p 00010000 08:05 9830660 /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so 7fdf44dbd000-7fdf44dbe000 r--p 0000f000 08:05 9830660 /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so 7fdf44dbe000-7fdf44dbf000 rw-p 00010000 08:05 9830660 /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so 7fdf44dbf000-7fdf44dce000 rw-s 00000000 00:04 1736724 /SYSV00000000 (deleted) 7fdf44dce000-7fdf44df4000 rw-s 00000000 00:04 1703955 /SYSV00000000 (deleted) 7fdf44df4000-7fdf44e2b000 r-xp 00000000 08:05 9568481 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 7fdf44e2b000-7fdf4502a000 ---p 00037000 08:05 9568481 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 7fdf4502a000-7fdf4502d000 r--p 00036000 08:05 9568481 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 7fdf4502d000-7fdf4502e000 rw-p 00039000 08:05 9568481 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 7fdf4502e000-7fdf45062000 r-xp 00000000 08:05 9576950 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.36.1 7fdf45062000-7fdf45261000 ---p 00034000 08:05 9576950 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.36.1 7fdf45261000-7fdf45262000 r--p 00033000 08:05 9576950 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.36.1 7fdf45262000-7fdf45263000 rw-p 00034000 08:05 9576950 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.36.1 7fdf45263000-7fdf45265000 r-xp 00000000 08:05 9835118 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so 7fdf45265000-7fdf45464000 ---p 00002000 08:05 9835118 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so 7fdf45464000-7fdf45465000 r--p 00001000 08:05 9835118 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so 7fdf45465000-7fdf45466000 rw-p 00002000 08:05 9835118 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so 7fdf45466000-7fdf46769000 r--p 00000000 08:05 10911878 /usr/share/icons/hicolor/icon-theme.cache 7fdf46769000-7fdf47a6c000 r--p 00000000 08:05 10911878 /usr/share/icons/hicolor/icon-theme.cache 7fdf47a6c000-7fdf47c1f000 r--p 00000000 08:05 10906472 /usr/share/icons/elementary-xfce/icon-theme.cache 7fdf47c1f000-7fdf48000000 rw-s 00000000 00:04 1638417 /SYSV00000000 (deleted) 7fdf48000000-7fdf48021000 rw-p 00000000 00:00 0 7fdf48021000-7fdf4c000000 ---p 00000000 00:00 0 7fdf4c010000-7fdf4c022000 rw-s 00000000 00:12 24027 /run/shm/jack-shm-registry 7fdf4c022000-7fdf4c041000 r--s 00000000 08:05 9962822 /usr/share/mime/mime.cache 7fdf4c041000-7fdf4c060000 r--s 00000000 08:05 9962822 /usr/share/mime/mime.cache 7fdf4c060000-7fdf4c213000 r--p 00000000 08:05 10906472 /usr/share/icons/elementary-xfce/icon-theme.cache 7fdf4c213000-7fdf4c221000 r--p 00000000 08:05 10906477 /usr/share/icons/elementary-xfce-dark/icon-theme.cache 7fdf4c221000-7fdf4c22f000 r--p 00000000 08:05 10906477 /usr/share/icons/elementary-xfce-dark/icon-theme.cache 7fdf4c22f000-7fdf4c28f000 rw-s 00000000 00:04 1671186 /SYSV00000000 (deleted) 7fdf4c28f000-7fdf4c2ae000 r--p 00000000 08:05 10627379 /usr/share/fonts/truetype/liberation/LiberationMono-Italic.ttf 7fdf4c2ae000-7fdf4c2c8000 r--p 00000000 08:05 3936960 /usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf 7fdf4c2c8000-7fdf4c2c9000 ---p 00000000 00:00 0 7fdf4c2c9000-7fdf4cb4a000 rw-p 00000000 00:00 0 7fdf4cb4a000-7fdf4cbfa000 r--p 00000000 08:05 10623970 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf 7fdf4cbfa000-7fdf4cc15000 r--p 00000000 08:05 10628655 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf 7fdf4cc15000-7fdf4cc2f000 r--p 00000000 08:05 10627377 /usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf 7fdf4cc2f000-7fdf4cc30000 ---p 00000000 00:00 0 7fdf4cc30000-7fdf4d4b1000 rw-p 00000000 00:00 0 7fdf4d4b1000-7fdf4d4e0000 r--p 00000000 08:05 10623220 /usr/share/fonts/truetype/droid/DroidSans-Bold.ttf 7fdf4d4e0000-7fdf4d50f000 r--p 00000000 08:05 10623221 /usr/share/fonts/truetype/droid/DroidSans.ttf 7fdf4d50f000-7fdf4d562000 r-xp 00000000 08:05 17444312 /home/jh/src/cs6/lib/csound/plugins64-6.0/libwidgets.so 7fdf4d562000-7fdf4d564000 r--p 00052000 08:05 17444312 /home/jh/src/cs6/lib/csound/plugins64-6.0/libwidgets.so 7fdf4d564000-7fdf4d566000 rw-p 00054000 08:05 17444312 /home/jh/src/cs6/lib/csound/plugins64-6.0/libwidgets.so 7fdf4d566000-7fdf4d571000 r-xp 00000000 08:05 9572116 /usr/lib/liblo.so.7.0.0 7fdf4d571000-7fdf4d771000 ---p 0000b000 08:05 9572116 /usr/lib/liblo.so.7.0.0 7fdf4d771000-7fdf4d772000 r--p 0000b000 08:05 9572116 /usr/lib/liblo.so.7.0.0 7fdf4d772000-7fdf4d773000 rw-p 0000c000 08:05 9572116 /usr/lib/liblo.so.7.0.0 7fdf4d77a000-7fdf4d780000 r--p 00000000 08:05 10360085 /usr/share/locale-langpack/de/LC_MESSAGES/gdk-pixbuf.mo 7fdf4d780000-7fdf4d790000 r--p 00000000 08:05 10365814 /usr/share/locale-langpack/de/LC_MESSAGES/pulseaudio.mo 7fdf4d790000-7fdf4d794000 r-xp 00000000 08:05 17444302 /home/jh/src/cs6/lib/csound/plugins64-6.0/libosc.so 7fdf4d794000-7fdf4d795000 r--p 00003000 08:05 17444302 /home/jh/src/cs6/lib/csound/plugins64-6.0/libosc.so 7fdf4d795000-7fdf4d796000 rw-p 00004000 08:05 17444302 /home/jh/src/cs6/lib/csound/plugins64-6.0/libosc.so 7fdf4d796000-7fdf4d798000 r-xp 00000000 08:05 17442406 /home/jh/src/cs6/lib/csound/plugins64-6.0/libampmidid.so 7fdf4d798000-7fdf4d799000 r--p 00001000 08:05 17442406 /home/jh/src/cs6/lib/csound/plugins64-6.0/libampmidid.so 7fdf4d799000-7fdf4d79a000 rw-p 00002000 08:05 17442406 /home/jh/src/cs6/lib/csound/plugins64-6.0/libampmidid.so 7fdf4d79a000-7fdf4d79c000 r-xp 00000000 08:05 17442446 /home/jh/src/cs6/lib/csound/plugins64-6.0/libserial.so 7fdf4d79c000-7fdf4d79d000 r--p 00001000 08:05 17442446 /home/jh/src/cs6/lib/csound/plugins64-6.0/libserial.so 7fdf4d79d000-7fdf4d79e000 rw-p 00002000 08:05 17442446 /home/jh/src/cs6/lib/csound/plugins64-6.0/libserial.so 7fdf4d79e000-7fdf4d7a0000 r-xp 00000000 08:05 17444295 /home/jh/src/cs6/lib/csound/plugins64-6.0/libjoystick.so 7fdf4d7a0000-7fdf4d7a1000 r--p 00001000 08:05 17444295 /home/jh/src/cs6/lib/csound/plugins64-6.0/libjoystick.so 7fdf4d7a1000-7fdf4d7a2000 rw-p 00002000 08:05 17444295 /home/jh/src/cs6/lib/csound/plugins64-6.0/libjoystick.so 7fdf4d7a2000-7fdf4d7b4000 r-xp 00000000 08:05 17444296 /home/jh/src/cs6/lib/csound/plugins64-6.0/libchua.so 7fdf4d7b4000-7fdf4d7b5000 r--p 00011000 08:05 17444296 /home/jh/src/cs6/lib/csound/plugins64-6.0/libchua.so 7fdf4d7b5000-7fdf4d7b6000 rw-p 00012000 08:05 17444296 /home/jh/src/cs6/lib/csound/plugins64-6.0/libchua.so 7fdf4d7b6000-7fdf4d8b9000 r-xp 00000000 08:05 17442405 /home/jh/src/cs6/lib/csound/plugins64-6.0/libsignalflowgraph.so 7fdf4d8b9000-7fdf4d8ba000 r--p 00102000 08:05 17442405 /home/jh/src/cs6/lib/csound/plugins64-6.0/libsignalflowgraph.so 7fdf4d8ba000-7fdf4d8c1000 rw-p 00103000 08:05 17442405 /home/jh/src/cs6/lib/csound/plugins64-6.0/libsignalflowgraph.soCsound tidy up Am 18.03.2014 13:52, schrieb Steven Yi: > I've fixed up String channels. There were a few issues: > > * the code I posted earlier was slightly off and I should have casted > the pp->data to STRINGDAT, not pp > > * Also, in csoundGetChannelDataSize, the check for if the channel was > a String one was incorrect, as the channelType is a bit flag and is > generally bit-or'd between the type of channel and whether if it is an > input or output channel. The comparison then with == was replace with > an & bit flag test. > > * csoundSetStringChannel was only setting the string contents up to > strlen, but was not setting the last byte to NULL. With the way code > should be used with csoundGetChannelDataSize reporting the len + 1 for > the NULL, I added an extra bit of code to NULL the last byte. That > got the unit test to pass. > > Andres: Could you pull from the develop branch and give it a try? > > Thanks! > steven > > On Tue, Mar 18, 2014 at 8:40 AM, Steven Yi |
Date | 2014-03-18 18:43 |
From | Steven Yi |
Subject | Re: [Cs-dev] string channels |
Hi Joachim, It seems to me from the stacktrace that it is something with CsoundQT that is calling free. Perhaps some code requires changing on Andres' side in CsoundQT? steven On Tue, Mar 18, 2014 at 1:44 PM, joachim heintz |
Date | 2014-04-24 05:32 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] string channels |
Attachments | None None |
Hi, I've finally found the issue in CsoundQt. I was assuming that the invalue callback would pass a pointer to the STRINGDAT structure, but it's actually passing a pointer to the actual data within STRINGDAT. This made sense back in the day when strings were preallocated and had a maximum size, but now that they are dynamic, this seems wrong to me. The callback should get a pointer to the STRINGDAT strcuture, to then reallocate if it needs to fill more than needed. Of course this change will break any hosts that rely on the invalue callback mechanism. Should I make that change? Is there another way to fix this? Cheers, Andrés On Tue, Mar 18, 2014 at 11:43 AM, Steven Yi <stevenyi@gmail.com> wrote: Hi Joachim, |
Date | 2014-04-24 06:21 |
From | Rory Walsh |
Subject | Re: [Cs-dev] string channels |
Attachments | None None |
It's okay with me as I don't use those callbacks any more, but I can't say for others.
On 24 Apr 2014 06:32, "Andres Cabrera" <mantaraya36@gmail.com> wrote:
|
Date | 2014-04-24 09:33 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] string channels |
That sounds it is the right thing to do, similar to what we did for string channels. ======================== Dr Victor Lazzarini Senior Lecturer NUI Maynooth, Ireland victor dot lazzarini at nuim dot ie On 24 Apr 2014, at 06:21, Rory Walsh |