On Wed, 15 Sep 2010, Schwab,Wilhelm K wrote:

I am interested in the opinions of helpful people who might have something 
constructive to add.

Sorry, but don't expect any help with this attitude. Even the most helpful people - like Henrik - can't help you, because you don't give enough information about your problem.

Which platform do you use?
Which VM/image do you use?
What's the library you'd like to use?
Is #cPlgver: an FFI call or do you use Alien? Maybe something else?
What's the type of the argument it expects?
If it calls a library function, does it store the pointer you're passing to it?
Can you share your code?


Levente




________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Henrik Johansen 
[[email protected]]
Sent: Wednesday, September 15, 2010 6:18 PM
To: [email protected]
Subject: Re: [Pharo-project] Another silent failure?

How do you expect us to help you debug this?
Really?

Cheers,
Henry

On Sep 15, 2010, at 8:45 38PM, Schwab,Wilhelm K wrote:

I am playing with a new library and for kicks thought I would call its 
get-version function:

| buffer |
buffer := String new:80.
PLplotLibrary default cPlgver:buffer.
buffer.

The above appears to do nothing; the buffer remains blank, and there is no 
error raised from it.  I tried something more complicated involving external 
address and #alloc: and got the version number.  That is encouraging from a 
perspective of talking to the library, but then I had to square the above 
failure with my use of memcpy() not long ago (different topic).  In that case, 
I had real need to allocate a buffer in a fixed heap, but was told that I could 
ultimately copy from said buffer (which lives across multiple gcs and would 
move) into a ByteArray of the needed size, which would not move during the 
memcpy() call.  That worked.  So I tried

| buffer |
buffer := ByteArray new:80.
PLplotLibrary default cPlgver:buffer.
buffer asString.

and get the version number.  What's up?  Why is it ok to pass a byte array but 
not a string?  If there really is a difference, there should be an exception 
hinting that something is wrong and what it might be - right?

Bill



_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to