<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ok, I think I understand the problem. The eric debugger backend is assigning its own handler for stderr and stdout in order to communicate their output back to the frontend (it is what you would see in the shell window). By your reopening you take stderr away from it and that causes the issue later on.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Please try it with disabled stderr redirection. You may do this on a project basis (Project->Debugger->Debugger Properties) or more general via the configuration dialog, Ruby Debugger page.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Regards,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Detlev<br /><br />On Monday 26 November 2012, 15:40:56 Josep Ferrandiz wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Detlev,</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">I have attached the file and have been able to isolate the lines that cause the problem:</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">$stderr.reopen("/dev/null", "w") and $stderr.sync = true.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">They are in the function add_R_lib() that turns off $stderr while an R library is loaded that generates a bunch of warnings when loaded.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Thanks</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Josep</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"> </span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Josep M. Ferrandiz<br /></span></p>
<hr />
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><a name="yiv1725751280"></a><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;">C</span><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;">an you send the script, that causes this issue. I might look at it (haven't used the Ruby debugger for years now).</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;"> </span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;">Detlev<br /><br />On Sunday 25 November 2012, 23:36:48 Josep Ferrandiz wrote:<br /></span></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Hello,</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">I am using </span><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">Eric4 4.4.18 (r4127) with Ruby 1.8.7.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">If I run a single ruby file on the command line in the Terminal view,</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">user@ubuntu:~/Code/ruby/RApps$ ./foo.rb</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">the file executes with no problem.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">But if I run the same file through Eric's Run Script I get:</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">ruby 1.8.7 (2011-06-30) [i686-linux] on ubuntu, No Qt-Version</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">>>> /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:172:in `unhandled_exception': private method `sub' called for nil:NilClass (NoMethodError)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:343:in `handleLine'</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/AsyncIO.rb:73:in `readReady'</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:619:in `eventLoop'</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:595:in `interact'</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:1172:in `main'</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">from /usr/share/eric/modules/DebugClients/Ruby/DebugClient.rb:44</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">in the interactive shell.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">It also looks like the ruby debugger is not working. </span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#000000;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000; background-color:#000000;">Any suggestions?</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;"> </span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:85px; margin-right:120px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'tahoma,new york,times,serif'; font-size:10pt; color:#000000;">Josep M. Ferrandiz</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;"><br /><br />-- </span></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:11pt; font-weight:600; color:#000000;">Detlev Offenbach</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:80px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;">detlev@die-offenbachs.de</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'times new roman,new york,times,serif'; font-size:12pt; color:#000000;"><br /><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br />-- </p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-size:11pt; font-weight:600;">Detlev Offenbach</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">detlev@die-offenbachs.de</p></body></html>