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

Re: [sc-users] strange standardizePath bug?



yes, it's weird. this works:

s.waitForBoot({
	Routine.run({
		var p1, p2;
		
		p1 = "~/Desktop/Untitled-L.aif".standardizePath;
		p2 = "~/Desktop/Untitled-R.aif".standardizePath;
		
		c = Condition.new;
		s.sendMsgSync(c, \b_allocRead, s.bufferAllocator.alloc(1), p1, 0, 0);
		s.sendMsg( \b_allocRead, s.bufferAllocator.alloc(1), p2 );
	});
});

so something must be broken with waiting for the condition in sendMsgSync ??? look at this:

s.waitForBoot({
	Routine.run({
		var p1, p2;
		
		p1 = "~/Desktop/Untitled-L.aif".standardizePath;
		p2 = "~/Desktop/Untitled-R.aif".standardizePath;
		
		("Can we call? "++p1.canCallOS).inform;	// --> TRUE
		
		c = Condition.new;
		s.sendMsgSync(c, \b_allocRead, s.bufferAllocator.alloc(1), p1, 0, 0);

		("Can we call? "++p1.canCallOS).inform;	// --> FALSE

		s.sendMsg( \b_allocRead, s.bufferAllocator.alloc(1), p2 );
	});
});

looks like a bug. best, -sciss-


Am 06.06.2006 um 07:24 schrieb Joshua Parmenter:

That's what I thought. {}.defer didn't do anything (same error), and I think it is strange that this only happens on the second file (not the first!).

Thanks,

Josh

******************************************
Joshua Parmenter
joshp@xxxxxxxxxxxxxxxx
Post-Doctoral Research Associate - Center for Digital Arts and Experimental Media
Raitt Hall - University of Washington
Seattle, Washington 98195

http://www.dxarts.washington.edu
http://www.realizedsound.net/josh/


On Jun 5, 2006, at 10:05 PM, Tim Kreger wrote:

Maybe a Cocoa call from within the Routine.

does defer fix it?



On 06/06/2006, at 2:36 PM, Joshua Parmenter wrote:

Not sure what this is... I have this in a chunk of code:

s.waitForBoot({
	Routine.run({
		c = Condition.new;
		s.sendMsgSync(c, \b_allocRead, file1 = s.bufferAllocator.alloc(1),
			"~/Desktop/spreadgraincramp.aif".standardizePath, 0, 0);
		s.sendMsg( \b_allocRead, file2 = s.bufferAllocator.alloc(1),
			"~/Desktop/vibes.aif".standardizePath);
...

And I get this error:



a Server
ERROR: Primitive '_Cocoa_StandardizePath' failed.
operation cannot be called from this Process.
RECEIVER:
Instance of String {    (16B91A70, gc=40, fmt=07, flg=10, set=02)
  indexed slots [19]
      0 : ~
      1 : /
      2 : D
      3 : e
      4 : s
      5 : k
      6 : t
      7 : o
      8 : p
      9 : /
     10 : v
     11 : i
     12 : b
     13 : e
     14 : s
     15 : .
     16 : a
     17 : i
     18 : f
}
CALL STACK:
	MethodError-reportError   16ADFA40
		arg this = <instance of PrimitiveFailedError>
	Nil-handleError   16ADF760
		arg this = nil
		arg error = <instance of PrimitiveFailedError>
	Object-throw   16ADE620
		arg this = <instance of PrimitiveFailedError>
	Object-primitiveFailed   16B5E0B0
		arg this = "~/Desktop/vibes.aif"
	< FunctionDef in closed FunctionDef >  (no arguments or variables)
	Routine-prStart   16ADC9A0
		arg this = <instance of Routine>
		arg inval = 525.5300143950001


But if I set the basepath to a variable prior to the Routine like this:

p = "~/Desktop".standardizePath ++ "/";
s.waitForBoot({
	Routine.run({
		c = Condition.new;
		s.sendMsgSync(c, \b_allocRead, file1 = s.bufferAllocator.alloc(1),
			p ++ "spreadgraincramp.aif", 0, 0);
		s.sendMsg( \b_allocRead, file2 = s.bufferAllocator.alloc(1),
			p ++ "vibes.aif");
...

Not a problem.

Any ideas?

Thanks,

josh




******************************************
Joshua Parmenter
joshp@xxxxxxxxxxxxxxxx
Post-Doctoral Research Associate - Center for Digital Arts and Experimental Media
Raitt Hall - University of Washington
Seattle, Washington 98195

http://www.dxarts.washington.edu
http://www.realizedsound.net/josh/


_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users