Hi Mario, Jim!
When I tried to reproduce the error with RDT 0.7.0RC1 and ruby 1.8.4 I
ran immediately into the segfault. After some hours of poking around in
the source code I found a patch to eval.c which avoids the segfault.
Unfortunately, I've no idea what ramifications the little hack has. I am
just taking a high value of local_tbl[0] as an indicator that something
bad has happend (the value seems to be less than 20 usually). In the
case of a high value of tag->scope->local_tbl[0] the expression
tag->prev creates the segmentation fault.
I was searching for the reason behind it, but couldn't find it.
Jim had also found a patch some weeks ago, but his proposal didn't work
in my case.
Jim, did you find out more about it? What ruby version did you use? You
mentioned that the segfault seemed to disappear under certain
circumstances: I also had the situation that the same ruby 1.8.4
executable behaved differently if invoked from RDT as opposed to be
invoked manually from a shell (also with gdb).
Mario, could you try the patch? If that doesn't help, please switch on
tracing and send me the output.
Tracing can be enabled by providing a .options file in the directory of
the eclipse exe and starting eclipse with -DEBUG.
.options:
org.rubypeople.rdt.debug.core/debug=true
org.rubypeople.rdt.debug.core/rubyDebuggerVerbose=true
Markus
--- ruby-1.8.4/eval.c 2005-12-20 13:41:47.000000000 +0000
+++ ruby-1.8.4.mod/eval.c 2006-01-01 17:32:06.000000000 +0000
@@ -6334,6 +6334,9 @@
scope_dup(ruby_scope);
for (tag=prot_tag; tag; tag=tag->prev) {
+ if (tag->scope->local_tbl && tag->scope->local_tbl[0] >
1000000) {
+ break ;
+ }
scope_dup(tag->scope);
}
for (vars = ruby_dyna_vars; vars; vars = vars->next) {
Mario Scalas wrote:
Hi all,
I'm using the latest 0.7RC candidate of the RDT (under eclipse
3.1.1/linux/GTK/java5) and the problem in the mail's subject is really
annoying since I cannot effectively use the debugger for something more
complex than an "hello world" app :S
What happens:
1) I put a breakpoint after I create an object of some class
2) In the debugger "variables" view I can see the variable with the '+' (well,
an arrow under GTK, meaning I can expand it)
3) I click upon the '+' but nothing happens: object's fields do not appear and
the '+' is gone :|
Though there is no crash: I can still trace my application till the end
without any sign of NPE, segfaults or whatever: all happens silently.
For the chronicles I've just installed the latest 1.8.4 version (compiled from
source) but there is no evident difference compared to my own ubuntu's 1.8.3
(the problem persists).
So before I fill a bug report, anybody has got this same behaviour?
Regards,
Mario
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rubyeclipse-development mailing list
Rubyeclipse-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development