[Gridflow-dev] Gridflow/LTI-LIB 64-bit problems
Mathieu Bouchard
matju at artengine.ca
Wed Jun 21 14:01:09 EDT 2006
On Thu, 15 Jun 2006, Alexey Baranov wrote:
> For my machine it starts well, but when you start any METRO or try to
> pass anything to LTI-lib object it simply quits with this:
> /home/bara/pd/lib/pd/extra/gridflow/optional/lti.rb:218: [BUG]
> Segmentation fault Darsha's error is similar but she's runnung Ubuntu
> for MAC (which I suspect is a 64bit Debian) and her PD doesn't even
> start with LTI-lib hooked up. It also gives out Segmentation fault
> error. Me and Heri think that might be caused by lti.rb Line 41.
Sorry for the delay. Yes there is lti.rb to fix first :
class String
# returns a Fixnum that is a pointer divided by 4
def meat # warning: not 64-bit-safe
[self].pack("p").unpack("I")[0]>>2
end
end
I'm trying to replace it with the following but I can't test it, as my OS
is 32-bit (even though I use an AMD K8) :
class String
# returns a Fixnum that is a pointer divided by 4
def meat # warning: not 64-bit-safe
stuff = [self].pack("p")
if stuff.length == 4 then # 32 bit...
unpack("I")[0]>>2
elsif GridFlow::OurByteOrder==1 # 64 bit LE (AMD K8)
a,b=unpack("I2")
(a>>2)|(b<<30)
else # 64 bit BE (Apple G5)
b,a=unpack("I2")
(a>>2)|(b<<30)
end
end
end
This is now in CVS.
There might be other parts of LTI support that aren't 64-bit safe.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Gridflow-dev
mailing list