NB crash boom

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NB crash boom

Sean P. DeNigris
Administrator
Why is this simple experiment crashing the vm? It seemed like such a small change from the getenv example that I was sure it would succeed. Mac 10.8.2 with lastest nbcog vm...

run: str
"self run: 'open http://www.google.com'."

        <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode >
         ^ self nbCall: #( int system (String str) ) module: NativeBoost CLibrary

Thanks,
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: NB crash boom

Igor Stasenko
On 14 February 2013 23:21, DeNigris Sean <[hidden email]> wrote:
> Why is this simple experiment crashing the vm? It seemed like such a small change from the getenv example that I was sure it would succeed. Mac 10.8.2 with lastest nbcog vm...
>
> run: str
> "self run: 'open http://www.google.com'."
>
>         <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode >
>          ^ self nbCall: #( int system (String str) ) module: NativeBoost CLibrary
>

ahaha... system call..
yeah.. what could go wrong?
(was thinking me as well, when tried to demonstrate the use of this
function couple months ago :)

there is very complicated machinery behind this function (most in C)..
i have not much clues what happens, but i can imagine that it does
something which interrupts/blocks VM thread
(add there signals and stuff) until command finishes.. which VM can't handle..

i remember i did or checked something to make system() call working..
but i can't remember what exactly.

(so, i dunno, but your sample works fine on my machine with my VM ;)
.. and of course i am not giving it away, because its mine! :)

just lets wait till we will get fresh VMs, and we'll see :)


> Thanks,
> Sean

--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: NB crash boom

Camillo Bruni-3

On 2013-02-14, at 23:35, Igor Stasenko <[hidden email]> wrote:

> On 14 February 2013 23:21, DeNigris Sean <[hidden email]> wrote:
>> Why is this simple experiment crashing the vm? It seemed like such a small change from the getenv example that I was sure it would succeed. Mac 10.8.2 with lastest nbcog vm...
>>
>> run: str
>> "self run: 'open http://www.google.com'."
>>
>>        <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode >
>>         ^ self nbCall: #( int system (String str) ) module: NativeBoost CLibrary
>>
>
> ahaha... system call..
> yeah.. what could go wrong?
> (was thinking me as well, when tried to demonstrate the use of this
> function couple months ago :)
>
> there is very complicated machinery behind this function (most in C)..
> i have not much clues what happens, but i can imagine that it does
> something which interrupts/blocks VM thread
> (add there signals and stuff) until command finishes.. which VM can't handle..
>
> i remember i did or checked something to make system() call working..
> but i can't remember what exactly.
>
> (so, i dunno, but your sample works fine on my machine with my VM ;)
> .. and of course i am not giving it away, because its mine! :)
>
> just lets wait till we will get fresh VMs, and we'll see :)

Yes I would put that even on high-priority for NB, as it is the most important
use-case that makes sense to me :D
Reply | Threaded
Open this post in threaded view
|

Re: NB crash boom

Sean P. DeNigris
Administrator
In reply to this post by Igor Stasenko
Igor Stasenko wrote
i remember i did or checked something to make system() call working..
but i can't remember what exactly.

(so, i dunno, but your sample works fine on my machine with my VM ;)
Okay, thanks for checking. I can use OSProcess for now - I was just exploring.

Igor Stasenko wrote
.. and of course i am not giving it away, because its mine! :)
That's not very friendly... I take back my "thank you" ;)

Let me know if you remember how you got it working...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: NB crash boom

Sean P. DeNigris
Administrator
Issue 7583: [ENH]: NB system example
https://code.google.com/p/pharo/issues/detail?id=7583
Cheers,
Sean