Hi, I tried shoes on Arch Linux x86_64, it builds fine, but on startup it segfaults: ./dist/shoes: line 22: 7907 Segmentation fault LD_LIBRARY_PATH=$APPPATH $APPPATH/shoes-bin "$@" So I compiled previous versions to find out where it starts happening. This is the commit, where it first happens: http://github.com/shoes/shoes/commit/1fc71d0f4343f7adb740aed59b90ef93024ef5b6 Up to that point shoes -m starts up the manual, but from that point on, all I get is a segfault. Any chance to get it sorted out? I can help with testing patches, but I don't know enough shoes/ruby internals to fix it myself. Thanks. csm
csm,
thanks for tracking down the problem. Looks like the fix ashbb did needs to
be Windows only then. Ashbb should be able to sort this for you, but in the
meantime have a go yourself. Try editing world.c to say:
{
VALUE v;
char *argv[] = {"ruby", "-e", "1"};
#ifdef SHOES_WIN32
int sysinit_argc = 0;
char** sysinit_argv = NULL;
#endif
RUBY_INIT_STACK;
#ifdef SHOES_WIN32
ruby_sysinit( &sysinit_argc, &sysinit_argv );
#endif
ruby_init();
v = (VALUE)ruby_options(3, argv);
return !FIXNUM_P(v);
}
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B
On Wed, Mar 10, 2010 at 7:33 AM, Csomay Mihaly <list@csomay.hu> wrote:
> Hi,
>
> I tried shoes on Arch Linux x86_64, it builds fine, but on startup it
> segfaults:
> ./dist/shoes: line 22: 7907 Segmentation fault
> LD_LIBRARY_PATH=$APPPATH $APPPATH/shoes-bin "$@"
>
> So I compiled previous versions to find out where it starts happening.
> This is the commit, where it first happens:
>
> http://github.com/shoes/shoes/commit/1fc71d0f4343f7adb740aed59b90ef93024ef5b6
>
> Up to that point shoes -m starts up the manual, but from that point on, all
> I get is a segfault.
>
> Any chance to get it sorted out?
> I can help with testing patches, but I don't know enough shoes/ruby
> internals to fix it myself.
> Thanks.
>
> csm
>
i5m <i5ivem@googlemail.com> writes: > thanks for tracking down the problem. Looks like the fix ashbb did > needs to be Windows only then. Ashbb should be able to sort this for > you, but in the meantime have a go yourself. Try editing world.c to > say: > > { > VALUE v; > char *argv[] = {"ruby", "-e", "1"}; > #ifdef SHOES_WIN32 > int sysinit_argc = 0; > char** sysinit_argv = NULL; > #endif > RUBY_INIT_STACK; > #ifdef SHOES_WIN32 > ruby_sysinit( &sysinit_argc, &sysinit_argv ); > #endif > ruby_init(); > v = (VALUE)ruby_options(3, argv); > return !FIXNUM_P(v); > } Yeah, that works, I tried that already before posting, I just don't know if ruby_sysinit does something I might need on Linux too :) Looking through the commits, it seems that this commit was already reverted once: http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040 and then put back once again: http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504 So... what does ruby_sysinit do? I couldn't find anything after a quick search, only complaints about segfaults... csm
I don't know. Getting in way over my head. Some reading here: http://www.ruby-forum.com/topic/126298 (same thing also here; http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 and here: http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 ) and also this email thread: <http://www.ruby-forum.com/topic/126298> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947 <http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947>Interestingly, nobu, the guy(?) who reverted the commit would seem to know what he's doing. As far as I can tell he implemented this function in Ruby. Perhaps we could send him an email and ask him to explain? ----------------------- i5m.co.uk GPG Key: 0xA18A602B On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote: > i5m <i5ivem@googlemail.com> writes: > > > thanks for tracking down the problem. Looks like the fix ashbb did > > needs to be Windows only then. Ashbb should be able to sort this for > > you, but in the meantime have a go yourself. Try editing world.c to > > say: > > > > { > > VALUE v; > > char *argv[] = {"ruby", "-e", "1"}; > > #ifdef SHOES_WIN32 > > int sysinit_argc = 0; > > char** sysinit_argv = NULL; > > #endif > > RUBY_INIT_STACK; > > #ifdef SHOES_WIN32 > > ruby_sysinit( &sysinit_argc, &sysinit_argv ); > > #endif > > ruby_init(); > > v = (VALUE)ruby_options(3, argv); > > return !FIXNUM_P(v); > > } > > Yeah, that works, I tried that already before posting, I just don't know > if ruby_sysinit does something I might need on Linux too :) > Looking through the commits, it seems that this commit was already > reverted once: > > http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040 > and then put back once again: > > http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504 > So... what does ruby_sysinit do? I couldn't find anything after a quick > search, only complaints about segfaults... > > csm >
This is awesome. I'll look into this when I get back from SXSW, as Linux x86_64 is near and dear to my heart. On 3/10/10, i5m <i5ivem@googlemail.com> wrote: > I don't know. Getting in way over my head. Some reading here: > > http://www.ruby-forum.com/topic/126298 > > (same thing also here; > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 > and > here: > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 > ) > > and also this email thread: > <http://www.ruby-forum.com/topic/126298> > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947 > > <http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947>Interestingly, > nobu, the guy(?) who reverted the commit would seem to know what he's doing. > As far as I can tell he implemented this function in Ruby. Perhaps we could > send him an email and ask him to explain? > > > ----------------------- > i5m.co.uk > GPG Key: 0xA18A602B > > > On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote: > >> i5m <i5ivem@googlemail.com> writes: >> >> > thanks for tracking down the problem. Looks like the fix ashbb did >> > needs to be Windows only then. Ashbb should be able to sort this for >> > you, but in the meantime have a go yourself. Try editing world.c to >> > say: >> > >> > { >> > VALUE v; >> > char *argv[] = {"ruby", "-e", "1"}; >> > #ifdef SHOES_WIN32 >> > int sysinit_argc = 0; >> > char** sysinit_argv = NULL; >> > #endif >> > RUBY_INIT_STACK; >> > #ifdef SHOES_WIN32 >> > ruby_sysinit( &sysinit_argc, &sysinit_argv ); >> > #endif >> > ruby_init(); >> > v = (VALUE)ruby_options(3, argv); >> > return !FIXNUM_P(v); >> > } >> >> Yeah, that works, I tried that already before posting, I just don't know >> if ruby_sysinit does something I might need on Linux too :) >> Looking through the commits, it seems that this commit was already >> reverted once: >> >> http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040 >> and then put back once again: >> >> http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504 >> So... what does ruby_sysinit do? I couldn't find anything after a quick >> search, only complaints about segfaults... >> >> csm >> >
heh :D On Wed, Mar 10, 2010 at 9:29 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > This is awesome. I'll look into this when I get back from SXSW, as > Linux x86_64 is near and dear to my heart. > > On 3/10/10, i5m <i5ivem@googlemail.com> wrote: > > I don't know. Getting in way over my head. Some reading here: > > > > http://www.ruby-forum.com/topic/126298 > > > > (same thing also here; > > > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 > > and > > here: > > > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/31900?31774-32131 > > ) > > > > and also this email thread: > > <http://www.ruby-forum.com/topic/126298> > > > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947 > > > > < > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/15756?15701-33947 > >Interestingly, > > nobu, the guy(?) who reverted the commit would seem to know what he's > doing. > > As far as I can tell he implemented this function in Ruby. Perhaps we > could > > send him an email and ask him to explain? > > > > > > ----------------------- > > i5m.co.uk > > GPG Key: 0xA18A602B > > > > > > On Wed, Mar 10, 2010 at 9:58 AM, Csomay Mihaly <list@csomay.hu> wrote: > > > >> i5m <i5ivem@googlemail.com> writes: > >> > >> > thanks for tracking down the problem. Looks like the fix ashbb did > >> > needs to be Windows only then. Ashbb should be able to sort this for > >> > you, but in the meantime have a go yourself. Try editing world.c to > >> > say: > >> > > >> > { > >> > VALUE v; > >> > char *argv[] = {"ruby", "-e", "1"}; > >> > #ifdef SHOES_WIN32 > >> > int sysinit_argc = 0; > >> > char** sysinit_argv = NULL; > >> > #endif > >> > RUBY_INIT_STACK; > >> > #ifdef SHOES_WIN32 > >> > ruby_sysinit( &sysinit_argc, &sysinit_argv ); > >> > #endif > >> > ruby_init(); > >> > v = (VALUE)ruby_options(3, argv); > >> > return !FIXNUM_P(v); > >> > } > >> > >> Yeah, that works, I tried that already before posting, I just don't know > >> if ruby_sysinit does something I might need on Linux too :) > >> Looking through the commits, it seems that this commit was already > >> reverted once: > >> > >> > http://github.com/shoes/shoes/commit/782608bf0ec114c069f0ab334e4bf5d4a5515040 > >> and then put back once again: > >> > >> > http://github.com/shoes/shoes/commit/7c9236ee4dd2ade08a9d0cd8818b8ff073857504 > >> So... what does ruby_sysinit do? I couldn't find anything after a quick > >> search, only complaints about segfaults... > >> > >> csm > >> > > > -- ~devyn