From: Wybo Dekker Date: 2006-04-10T18:06:08+09:00 Subject: Re: segfault with tk.rb On Thu, 6 Apr 2006, Hidetoshi NAGAI wrote: > From: Hidetoshi NAGAI > Subject: Re: segfault with tk.rb > Date: Sat, 1 Apr 2006 09:59:27 +0900 > Message-ID: <20060401.095916.41648212.nagai@ai.kyutech.ac.jp> >> Thank you for your report. >> I think that depends on the finalize operation of a Tk interpreter >> when Ruby is exiting. >> But now, I have no time to fix the problem. > > I'd try to fix the problem. The diff of ruby_1_8 branch is > . > Could you try it? Sorry for being so late with my reaction. Had other troubles and also had to find out how to get 1.8.4 from cvs. It does not seem to work. What I did was: cvs -z4 -d :pserver:anonymous@cvs.ruby-lang.org:/src checkout -r ruby_1_8 ruby patch -p0 patching file ruby/ext/tk/tcltklib.c # Reversed (or previously applied) patch detected! Assume -R? [n] y # Hunk #5 succeeded at 4375 (offset 5 lines). # Hunk #6 succeeded at 4385 (offset 5 lines). # Hunk #7 succeeded at 4404 (offset 5 lines). # Hunk #8 succeeded at 4414 (offset 5 lines). # Hunk #9 succeeded at 4472 (offset 5 lines). # Hunk #10 succeeded at 4915 (offset 5 lines). # Hunk #11 succeeded at 6197 (offset 5 lines). # Hunk #12 succeeded at 6376 (offset 5 lines). # Hunk #13 succeeded at 7934 (offset 5 lines). cd ruby autoconf ./configure make ./ruby ../warntest ./ruby -w ../warntest where warntest contained: require 'tk' class TkVariable def to_m "%.2f" % [self.to_i.abs/100.0] end end puts TkVariable.new(12345).to_m The first run on warntest worked fine. But the ruby -w ../warntest gave the old problem: very heavy system load ending in a segmentation fault. -- Wybo