jbarnette / johnson

Johnson wraps JavaScript in a loving Ruby embrace.
http://github.com/jbarnette/johnson/wikis
466 stars 33 forks source link

Segmentation fault in command line. #10

Closed febuiles closed 15 years ago

febuiles commented 15 years ago

Running 'johnson some_file' under ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-darwin9.6.2] I get an instant segfault:

$ cat foo.js 
var x = 3;

federico@korobushka ~/programacion/orkut_social/app/public/js (master) 
$ johnson foo.js 
JS engine warning: leaking GC root 'JSScriptProxy' at 0x4e4690
JS engine warning: 1 GC root remains after destroying the JSRuntime at 0x39b000.
               This root may point to freed memory. Objects reachable
               through it have not been finalized.
/usr/local/bin/johnson:19: [BUG] Segmentation fault
ruby 1.8.6 (2009-03-31) [i686-darwin9.6.2]

Abort trap

Let me know if I can do anything to get a better report out of this.

matthewd commented 15 years ago

Technically, the segfault wouldn't've been instant -- if it's the one I think, it was actually occurring at the end of the script, as ruby's interpreter was cleaning up.

Anyway, I believe this should now be fixed -- mostly, as of 6074fee538143309b28c16f1b7b0998dc8d1d9c5, and now properly, as of d02834bbe77181ee9994d9dea63b6c39a78f9816.

At least, the above now exits cleanly for me, on ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux].