Why does neko/tora segfault instead of throwing exception ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does neko/tora segfault instead of throwing exception ?

T-Lemon
Hi list.

I'm currently developing a web service in neko/tora, and I have a little problem.
When I'm using a null object, like that:
var a:Array<String>;
a.push("M'hello");

Which should result in a NullPointerException, the current tora thread segfault. If a try to do the same again, the whole tora server segfault.
So, since I have no stacktrace, I have no idea where the error is, which can be a real problem if my code gets bigger.

Is there something I have misdone when I have compiled neko ? Is that a normal behavior ? Is there a way to change that ?

Thanks.
T-Lemon.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

T-Lemon
Forgot to mention, I'm using neko 1.8.2 and tora 1.6.1 (both the lastest versions)

2011/9/14 T-Lemon <[hidden email]>
Hi list.

I'm currently developing a web service in neko/tora, and I have a little problem.
When I'm using a null object, like that:
var a:Array<String>;
a.push("M'hello");

Which should result in a NullPointerException, the current tora thread segfault. If a try to do the same again, the whole tora server segfault.
So, since I have no stacktrace, I have no idea where the error is, which can be a real problem if my code gets bigger.

Is there something I have misdone when I have compiled neko ? Is that a normal behavior ? Is there a way to change that ?

Thanks.
T-Lemon.


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

Nicolas Cannasse
Le 14/09/2011 11:06, T-Lemon a écrit :
> Forgot to mention, I'm using neko 1.8.2 and tora 1.6.1 (both the lastest
> versions)

On which OS ? 32bit or 64bits ?
Could you try to run tora in interpreted mode ? "neko -interp tora.n"

We are using tora in production and don't have this issue.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

Blue Sans douze
32 bits.

With -interp, it works better, it show the null pointer exception instead of segfaulting.

Doesn't it reduces the performance ?
Should I care now using JIT ?

Blue112 (aka T-Lemon)


2011/9/14 Nicolas Cannasse <[hidden email]>
Le 14/09/2011 11:06, T-Lemon a écrit :

Forgot to mention, I'm using neko 1.8.2 and tora 1.6.1 (both the lastest
versions)

On which OS ? 32bit or 64bits ?
Could you try to run tora in interpreted mode ? "neko -interp tora.n"

We are using tora in production and don't have this issue.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

Nicolas Cannasse
Le 15/09/2011 00:12, Blue Sans douze a écrit :
> 32 bits.
>
> With -interp, it works better, it show the null pointer exception
> instead of segfaulting.
>
> Doesn't it reduces the performance ?
> Should I care now using JIT ?

Yes performances are reduced when turning off JIT but it also reduce
memory usage. We have JIT turned off in production at MotionTwin for
this reason, so maybe there's an additional issue with multithreads.
Most of web apps are database-bounded so you shouldn't care about JIT.

Best,
Nicolas



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

florian Hoevenaers
In reply to this post by Nicolas Cannasse
Nique ta grand mère fils de pute

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

bubblebenj
:) That remembers me, my teenage. Sweet old time.

On Thu, Sep 15, 2011 at 9:16 PM, florian Hoevenaers <[hidden email]> wrote:
Nique ta grand mère fils de pute

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Why does neko/tora segfault instead of throwing exception ?

sledorze
In reply to this post by florian Hoevenaers
classe..