[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Fwd: [sc-users] strange diskin crash



Very interesting... and weird:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x7ff90014

Thread 0 Crashed:
0   net.sourceforge.supercollider  	0x000864f3
PyrGC::NewFrame(unsigned long, long, long, bool) + 139
1   net.sourceforge.supercollider  	0x00097ade
executeMethod(VMGlobals*, PyrMethod*, long) + 144
2   net.sourceforge.supercollider  	0x0008ae84 Interpret(VMGlobals*) + 12218
3   net.sourceforge.supercollider  	0x0008c452 runInterpreter + 54

You're not doing anything at that moment touching the path array, but
the garbage collector bombs when doing something with the function...?

Anyway, this code looks perfect to me. Plus, crashes in GC would
generally have to be bugs IMO. Since the path array is coming from a
primitive, probably the array object is corrupt and it's messing up
GC.

What happens if you do these instead?

x = { DiskIn.ar(2, b.bufnum) };

x = x.play;

// OR:

x = { DiskIn.ar(2, b.bufnum) }.value;

The first one separates the creation of the function object from
playing it -- if it crashes on the first line, nothing else will work.
The other one separates UGen instantiation from building the complete
SynthDef.

hjh

On Nov 14, 2007 11:26 AM, tom tlalim <tlalists@xxxxxxxxx> wrote:
> so, here is the simplest way i can crash the lang (crash report:
> http://koncon.nl/~ttlalim/uploads/diskin_crash.txt)
>
> s.boot;
>
> // choose 153 setreo file paths
> CocoaDialog.getPaths({ arg paths;
>        ~paths = paths
> });
>
> b = Buffer.cueSoundFile(s, ~paths.choose, 0, 2);
>
> x = { DiskIn.ar(2, b.bufnum) }.play; // !crashes here!
>
> b.close;
>
> is this my user mistake, or maybe a bug?


-- 
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman