Opened 5 years ago

Closed 3 years ago

#765 closed defect (fixed)

"Run"->"Run Script" on C<print 0;> does not get captured in the Output window

Reported by: danboo Owned by:
Priority: trivial Milestone:
Component: External dependency Version: 0.50
Keywords: Cc:

Description

Create a new script that consists of:

print 1;

Run the script via "Run Script" action, the value of "1" is captured in the output window as expected.

Change the script to be:

print "0\n";

Again, run the script and the output is captured to the output window as expected.

Change the script to be:

print 0;

Run the script and the output window is cleared, but never shows the "0" value, as I expected.

I was unable to track down why this is, but my guess is that somewhere is a test of the basic true-ness of the script's STDOUT, rather than its size or defined-ness.

This is a pretty minor bug, but is really confusing when you do encounter it.

Thanks!

Change History (4)

comment:1 Changed 5 years ago by Sewi

Please add the OS you're using and the Wx::Perl::ProcessStream? version (shown on the last Padre about tab).

Ubuntu W:P:PS ver. 0.20:
The output doesn't even reach the EVP_WXP_PROCESS_STREAM_STDOUT event handler.

comment:2 Changed 5 years ago by Sewi

  • Component changed from editor to External dependency

comment:3 Changed 5 years ago by Sewi

It is a ProcessStream? problem and could be solved by adding "defined" on line 578 and should be the same on line 561:
while (defined(my $linebuffer = $process->read_input_line ) && $linecounter ) {

I wrote this to Mark and hope he'll upload a fixed 0.23 release of ProcessStream? soon.

comment:4 Changed 3 years ago by bowtie

  • Resolution set to fixed
  • Status changed from new to closed

# Turn on $OUTPUT_AUTOFLUSH
$| = 1;

Note: See TracTickets for help on using tickets.