-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Apr 27, 2007 at 06:00:10PM +0200, Michel Koppelaar wrote:
Hi,
I seem to be having the same problem. I've been trying to get ChucK to run on AMD64/Linux these last few days. Tried alsa, oss and jack build options: segfaults in each case. More details:
================================================================================= 1. platform distro: Ubuntu 7.04 cpu: AMD Athlon 64 X2 Dual Core Processor 4200+
2. chuck --version chuck version: 1.2.0.8 (dracula) exe target: linux (alsa) http://chuck.cs.princeton.edu/
3. gdb output GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run -v5 ../examples/stk/bowed.ck Starting program: /home/michel/src/chuck-1.2.0.8/src/chuck -v5 ../examples/stk/bowed.ck [Thread debugging using libthread_db enabled] [New Thread 47062529307568 (LWP 12822)] [chuck]:(2:SYSTEM): setting log level to: 5 (INFORM)... [chuck]:(2:SYSTEM): initializing virtual machine... [chuck]:(2:SYSTEM): | behavior: HALT [chuck]:(2:SYSTEM): | allocating shreduler... [chuck]:(2:SYSTEM): | allocating messaging buffers... [chuck]:(2:SYSTEM): | real-time audio: YES [chuck]:(2:SYSTEM): | mode: CALLBACK [chuck]:(2:SYSTEM): | sample rate: 48000 [chuck]:(2:SYSTEM): | buffer size: 512 [chuck]:(2:SYSTEM): | num buffers: 8 [chuck]:(2:SYSTEM): | devices adc: 0 dac: 0 (default 0) [chuck]:(2:SYSTEM): | channels in: 2 out: 2 [chuck]:(2:SYSTEM): initializing compiler... [chuck]:(3:SEVERE): | initializing type checker... [chuck]:(3:SEVERE): | | adding base classes... [chuck]:(3:SEVERE): | | | class 'object' [chuck]:(3:SEVERE): | | | class 'array' [chuck]:(3:SEVERE): | | | class 'string' [chuck]:(3:SEVERE): | | | class 'ugen' [chuck]:(3:SEVERE): | | | class 'shred' [chuck]:(3:SEVERE): | | | class 'event' [chuck]:(3:SEVERE): | | | class 'class' [chuck]:(3:SEVERE): | initializing emitter... [chuck]:(3:SEVERE): | loading built-in modules... [chuck]:(3:SEVERE): | | module osc... [chuck]:(3:SEVERE): | | module xxx... [chuck]:(3:SEVERE): | | module filter... [chuck]:(3:SEVERE): | | module STK... [chuck]:(3:SEVERE): | | class 'machine'... [chuck]:(3:SEVERE): | | class 'std'... [chuck]:(5:INFORM): | | initializing KBHitManager... [New Thread 1082132800 (LWP 12825)] [chuck]:(3:SEVERE): | | class 'math'... [chuck]:(3:SEVERE): | | class 'opsc'... [chuck]:(2:SYSTEM): type dependency resolution: MANUAL [chuck]:(2:SYSTEM): initializing synthesis engine... [chuck]:(3:SEVERE): | initializing 'dac'... [chuck]:(3:SEVERE): | initializing 'adc'... [chuck]:(3:SEVERE): | initializing 'blackhole'... [chuck]:(2:SYSTEM): | initializing 'real-time' audio... [chuck]:(5:INFORM): | | initializing callback... [chuck]:(5:INFORM): | | starting kb loop... [New Thread 1090525504 (LWP 12826)] [chuck]:(3:SEVERE): | allocating buffers for 512 x 2 samples... [chuck]:(3:SEVERE): starting compilation... [chuck]:(2:SYSTEM): starting listener on port: 8888... [New Thread 1098918208 (LWP 12827)] [chuck]:(2:SYSTEM): running virtual machine... [chuck]:(3:SEVERE): | initializing audio buffers... [chuck]:(3:SEVERE): | virtual machine running...
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47062529307568 (LWP 12822)] 0x0000000000491420 in Instrmnt_ctor () =================================================================================
Hopefully this can be sorted out. I'm really interested in trying out ChucK.
Hmm, I dug around a bit, not really knowing what I'm doing, but I suspect that the culprit is probably an assumption about the size of UINTS... a 32-bit vs 64-bit issue. My eye was drawn to that OBJ_MEMBER_UINT() macro, and I took a shimmering journey into the through-the-looking-glass world of defines on top of defines on top of defines: #define OBJ_MEMBER_UINT(obj,offset) (*(t_CKUINT *)OBJ_MEMBER_DATA(obj,offset)) ... #define t_CKUINT t_CKDWORD ... #define t_CKDWORD unsigned long There's also this: #define OBJ_MEMBER_DATA(obj,offset) (obj->data + offset) So, if offset just happens to be a 32-bit value, that smells to me like a likely source of a segfault. Offset probably needs to be a long long, doesn't it? But, again, there is probably advanced casting mojo going on, and my knowlege of Intel assembler is near zero. It's also been over 4 years since I last wrote a line of C. I hope there are devs reading this list. If I can do anything more to help, I will gladly do so. - -ken -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFGMjxue8HF+6xeOIcRAnvRAJ9+75gQtbxEDxX5i2lbz84b1TLDzwCg9YGD rQdqQCWKuNGT3EpQgrh+k9A= =3sxO -----END PGP SIGNATURE-----