On 19 May 2012 01:24, Javier Pimás <[email protected]> wrote:
> it depends. Sometimes, passing a wrong type of argument through nbffi
> (because of a badly wrapped signature), breaks the VM, almost but not
> completely freezing it while consuming 100% CPU. Maybe this is happening,
> but in that case the native window would probably not open.
>

basically , among infinite possibilities of a memory corruption, an
operating systems +
VM can detect only few:
 - memory overflow
 - access to invalid memory address
and one which cannot be detected:
  - an infinite loop

the rest is up to the human's decree about what is correct behavior
and what is not..

To address that we usually write tests. :)
But it is hard, especially in domain of FFI, where external
function/library is completely opaque ( you cannot see what happens
there, and what is involved there).
Especially that most of functions are far from being fault tolerant
and idiot proof: if you pass nil pointer to some function which
expects only a valid address, it will most probably just crash the
whole thing instead of throwing nice exception, which you can handle
and therefore build your tests cases on top of it.

ah yes.. btw.. if you think that VM is busy doing something but
irresponsible, you can send a SIGUSR1 to it to see what it does.

>
> On Fri, May 18, 2012 at 5:29 PM, Igor Stasenko <[email protected]> wrote:
>>
>> On 18 May 2012 07:34, chadwick <[email protected]> wrote:
>> >
>> >>
>> >> yeah.. but make sure you linking with right 32bit lib.. otherwise you
>> >> will get things like that.
>> >>
>> >
>> >
>> > ok I changed the FFI path to OpenGL library to
>> >
>> > /usr/lib32/nvidia-current-updates/libGL.so.1/usr/lib32/nvidia-current-updates/libGL.so.1
>> >
>> > and now
>> >
>> > GLTTRenderingDemo new openInWorld.
>> >
>> > does something, i.e. there's no error either in Pharo or in the console,
>> > but
>> > I don't see anything, there's just a sense that something is being
>> > computed
>> > as the machine runs slower.
>> >
>> hard to say anything. looks like it renders something somewhere but
>> then results are lost.
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Lic. Javier Pimás
> Ciudad de Buenos Aires



-- 
Best regards,
Igor Stasenko.

Reply via email to