Core dumps in ruby-tk on Mandriva 2008.1

L

Len Lawrence

This may not be the appropriate forum for this problem but I have
exhausted other avenues of enquiry, including Bugzilla. The fault
applies to a particular release of Mandriva Linux; on 2007.0 it did
not occur and neither in 2008.0. Mandriva 2008 Spring (2008.1)
however does exhibit the bug or whatever it is. Somebody using
Cooker, essentially 2009.0, does not see the fault.

Ruby fails almost immediately for any ruby-tk script with a message
which always has this form:

alloc: invalid block: 0x95e190: ef ef 30
Abort (core dumped)

The address varies to some extent but the contents or whatever they
are (registers maybe) always come up as ef ef 30. My guess is that
there is a failure to initialize some variable or pointer which is
used in memory allocation. As far as I can see the root window is
created successfully and it may be possible to run one or two lines of
code beyond that. Then it breaks. Ruby itself works without a
problem, likewise fxruby, and Tcl/Tk scripts on their own work and so
do combinations of Tcl/Tk and C or C++. There are no architecture or
version mismatches. The test system is x86_64 dual core with Tk
8.5a5. Other people have already pointed out that Mandriva should
have moved on to 8.5b3 by now but that may be irrelevant because Tk
does work. I have reinstalled 2008.1 two or three times and also
reverted to 2008.0 to prove that 2008.1 always behaves this way and
only 2008.1.

Has anybody else here seen this? It would be helpful to me if someone
with an installation of Mandriva Spring 2008 on a 64-bit machine could
check this out, maybe using an example from the Pickaxe or Using Ruby
Gems. I could supply a simple test script if necessary.

TIA

Len
 
M

michel

I had excatly the same problem with a 32 bits mandriva 2008.1 running on
a single core sempron with 1 Go RAM, but because I did not have any
need to upgrade, I came back to mandriva 2007.1.
 
L

Len Lawrence

I had excatly the same problem with a 32 bits mandriva 2008.1 running on
a single core sempron with 1 Go RAM, but because I did not have any need
to upgrade, I came back to mandriva 2007.1.

Further investigation reveals that the ttk themed widget set can be used
without causing core dumps but any attempt to reference the legacy
widgets raises signal 6. The change here is from Tk8.5.0 to Tk8.5.1 and
affects only ruby-tk, not Tcl/Tk.

Len
 
L

Len Lawrence

This may not be the appropriate forum for this problem but I have
exhausted other avenues of enquiry, including Bugzilla. The fault
applies to a particular release of Mandriva Linux; on 2007.0 it did not
occur and neither in 2008.0. Mandriva 2008 Spring (2008.1) however does
exhibit the bug or whatever it is. Somebody using Cooker, essentially
2009.0, does not see the fault.

Ruby fails almost immediately for any ruby-tk script with a message
which always has this form:

alloc: invalid block: 0x95e190: ef ef 30 Abort (core dumped)

The address varies to some extent but the contents or whatever they are
(registers maybe) always come up as ef ef 30. My guess is that there is
a failure to initialize some variable or pointer which is used in memory
allocation. As far as I can see the root window is created successfully
and it may be possible to run one or two lines of code beyond that.
Then it breaks. Ruby itself works without a problem, likewise fxruby,
and Tcl/Tk scripts on their own work and so do combinations of Tcl/Tk
and C or C++. There are no architecture or version mismatches. The
test system is x86_64 dual core with Tk 8.5a5. Other people have
already pointed out that Mandriva should have moved on to 8.5b3 by now
but that may be irrelevant because Tk does work. I have reinstalled
2008.1 two or three times and also reverted to 2008.0 to prove that
2008.1 always behaves this way and only 2008.1.

Has anybody else here seen this? It would be helpful to me if someone
with an installation of Mandriva Spring 2008 on a 64-bit machine could
check this out, maybe using an example from the Pickaxe or Using Ruby
Gems. I could supply a simple test script if necessary.

TIA

Len

More debugging runs using various examples from Mark Roseman's website
(first class documentation). So far all the Tcl scripts have worked
flawlessly but any script which tries to create legacy widgets fails in
the way described before. Take the Listbox example; peppering the code
with diagnostics shows that the line:

$countries = TkListbox.new(content) {listvariable $names; height 5}

causes an immediate core dump.

Here is the version information for the system:

ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux-gnu]
ruby-tk-1.8.6-9p114mdv2008.1
Tk 8.5.1

The legacy widgets seem to be invoked via scripts in /usr/lib/ruby/1.8/
tk/ such as listbox.rb. I cannot follow any of the code at that level.

Any ideas about what could be wrong?

Len
 
H

Hidetoshi NAGAI

From: Len Lawrence <[email protected]>
Subject: Re: Core dumps in ruby-tk on Mandriva 2008.1
Date: Tue, 10 Jun 2008 04:15:21 +0900
Message-ID: said:
Here is the version information for the system:

ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux-gnu]
ruby-tk-1.8.6-9p114mdv2008.1
Tk 8.5.1

I'm very sorry, but I don't have x86_64-linux environment.
Can you try to use ruby 1.8.7, or port C files (tcltklib.c,
stubs.c, tkutil.c) to ruby 1.8.6 ?
 
L

Len Lawrence

From: Len Lawrence <[email protected]> Subject: Re: Core dumps in
ruby-tk on Mandriva 2008.1 Date: Tue, 10 Jun 2008 04:15:21 +0900
Message-ID: said:
Here is the version information for the system:

ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux-gnu]
ruby-tk-1.8.6-9p114mdv2008.1
Tk 8.5.1

I'm very sorry, but I don't have x86_64-linux environment. Can you try
to use ruby 1.8.7, or port C files (tcltklib.c, stubs.c, tkutil.c) to
ruby 1.8.6 ?

Rebuilding ruby from 1.8.7 might be the better choice for me. I may be
gone some time...

Thanks for the advice

Len
 
L

Len Lawrence

From: Len Lawrence <[email protected]> Subject: Re: Core dumps in
ruby-tk on Mandriva 2008.1 Date: Tue, 10 Jun 2008 04:15:21 +0900
Message-ID: said:
Here is the version information for the system:

ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux-gnu]
ruby-tk-1.8.6-9p114mdv2008.1
Tk 8.5.1

I'm very sorry, but I don't have x86_64-linux environment. Can you try
to use ruby 1.8.7, or port C files (tcltklib.c, stubs.c, tkutil.c) to
ruby 1.8.6 ?

Thanks again for the advice Hidetoshi. Installing 1.8.7 did the trick.
Everything except photo image support works perfectly. Another thread
for that problem.

Len
 
L

Len Lawrence

I had excatly the same problem with a 32 bits mandriva 2008.1 running on
a single core sempron with 1 Go RAM, but because I did not have any need
to upgrade, I came back to mandriva 2007.1.

If you do need to go back to 2008.1 try installing ruby1.8.7, currently
only available as a tarball. There should be no problems with that but
you should check the ruby build environment before you do to figure out
which options to pass to configure. Drop me a line if you need help with
that. The other good news is that the tkimg package should continue to
work if you have it installed. The documentation fot ruby and ttk
indicates that you need to register read and write image format handlers
for each type of image but the libjpeg etc. code seems to be picked up OK.

Len
 
M

michel

If you do need to go back to 2008.1 try installing ruby1.8.7,
currently only available as a tarball. There should be no problems
with that but you should check the ruby build environment before you
do to figure out which options to pass to configure. Drop me a line
if you need help with that. The other good news is that the tkimg
package should continue to work if you have it installed. The
documentation fot ruby and ttk indicates that you need to register
read and write image format handlers for each type of image but the
libjpeg etc. code seems to be picked up OK.

Len

Thanks a lot for your investigation.
Michel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top