Core dump

My ruby/tk application is segfaulting. Seemingly randomly. How can I
figure out why? I have a core dump, but don't have much experience
debugging those.

Thanks,
Joe

I know there is a big warning about making sure to compile ruby with
--enable-pthread if you have a thread enabled Tk. Maybe this is the
problem? What platform/ruby/tk versions have you got?

I'm afraid I don't know much about debugging core files either though.

Jason

···

On 7/14/05, Joe Van Dyk <joevandyk@gmail.com> wrote:

My ruby/tk application is segfaulting. Seemingly randomly. How can I
figure out why? I have a core dump, but don't have much experience
debugging those.

Thanks,
Joe

Message-ID: <c715e6405071412543cf0486c@mail.gmail.com>

My ruby/tk application is segfaulting. Seemingly randomly. How can I
figure out why? I have a core dump, but don't have much experience
debugging those.

First of all, please try to the latest version of tcltklib on CVS.
If you use Ruby 1.8 or 1.9, I think that you'll be able to
replace only tcltklib.c (and stubs.c) to the latest version(s).

If you get SEGV on the latest also, please report the followings.

···

From: Joe Van Dyk <joevandyk@gmail.com>
Subject: core dump
Date: Fri, 15 Jul 2005 04:55:08 +0900
---------------------------------------------------------
* Ruby version:
     return value of "ruby -v"

* Compile information of tcltklib
     return value of "ruby -r tcltklib -e 'p TclTkLib::COMPILE_INFO"

* Tcl/Tk library version:
     return value of "ruby -r tk -e 'p Tk::TK_PATCHLEVEL"

* pthread support on Ruby:
     For example on linux, does "ldd /usr/local/bin/ruby" include
     libpthread.so ?

* thread support on Tcl/Tk libraries:
     For example on linux, does "ldd /usr/local/lib/libtcl8.4.so"
     include libpthread.so ?

* release date of tcltklib:
     return value of "ruby -r tcltklib -e 'p TclTkLib::RELEASE_DATE'

* release date of tkutil:
     return value of "ruby -r tkutil -e 'p TkUtil::RELEASE_DATE'

* release date of tk:
     return value of "ruby -r tkutil -e 'p Tk::RELEASE_DATE'

* (If you can) the script which raises SEGV

* (If you can) the patch to fix the SEGV trouble :wink:
---------------------------------------------------------

If you use some Tcl/Tk extensions, please check whether the extensions
are compiled under current Tcl/Tk libraries.
The reason of SEGV sometimes depends on the extensions.
If so, that cannot be fixed on Ruby/Tk side probably.
Please try the latest version of such extensions.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)