IOException occurred

Help
WeeDom
2008-05-14
2013-05-20
  • WeeDom

    WeeDom - 2008-05-14

    Environment:

    Ubuntu Hardy Heron (8.10?)
    Perl 5.8.8
    PadWalker: not sure, but fresh install from Ubuntu repo this morning

    I can't really post code for commericial reasons, but if the below doesn't point to anything obvious with Eclipse I'll drum up a non-commercial example.

    Cheers
    WeeDom

    Output from Debugger Console:

    Loading DB routines from perl5db.pl version 1.28
    Editor support available.

    Enter h or `h h' for help, or `man perldebug' for more help.

    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<1> printf $DB::OUT "%vd", $^V;
    5.8.8
      DB<2> print $DB::OUT eval { require PadWalker; PadWalker->VERSION(0.08) }
    1.5
      DB<3> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<3> T
      DB<3> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<3> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<3> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<3> ;{   
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;

    my $offset = 0;
    my $savout = select($DB::OUT);
    dumpvar_epic::dump_lexical_vars($offset);
    select($savout);
    };

      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:13):
    13:    my $dbh = DBI->connect($PRS_STORAGE{'PRS_DB_DSN'},
    14:                                   $PRS_STORAGE{'PRS_DB_USER'}, $cvs_password);
      DB<4> n
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> T
      DB<4> .
    main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<4> ;{   
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;

    my $offset = 0;
    my $savout = select($DB::OUT);
    dumpvar_epic::dump_lexical_vars($offset);
    select($savout);
    };

    4|$dbh|1|2|14|REF(0x825d134)|23|DBI::db=HASH(0x8c7aae8)|3|...|1|3

      DB<5> ;{   
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;
       
    my $offset = 0;
    my $varexpr = <<'EOT';
    ${$h->{'$dbh'}}
    EOT
    my $subref = \&amp;dumpvar_epic::dump_hash_expr;
    my $savout = select($DB::OUT);
    my $savbuf = $|;
    $| = 0;
    $subref->($offset, $varexpr);
    $| = $savbuf;
    print "";
    select($savout);
    };

    Substitution replacement not terminated at (eval 25)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 12.
    at (eval 25)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 12
        eval '\';
    my $subref = \\&amp;dumpvar_epic::dump_hash_expr;
    my $savout = s;

    ;' called at /home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 628
        DB::eval called at /home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 3410
        DB::DB called at /home/dominic/workspace/BugCounter/project.bugcounter.pl line 17

      DB<6> Unmatched right curly bracket at (eval 26)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 9, at end of line
    syntax error at (eval 26)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 9, near ";
    }"

      DB<7> ;{   
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;
       
    my $offset = 0;
    my $varexpr = <<'EOT';
    ${$h->{'$dbh'}}
    EOT
    my $subref = \&amp;dumpvar_epic::dump_hash_expr;
    my $savout = select($DB::OUT);
    my $savbuf = $|;
    $| = 0;
    $subref->($offset, $varexpr);
    $| = $savbuf;
    print "";
    select($savout);
    };

    Substitution replacement not terminated at (eval 27)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 12.
    at (eval 27)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 12
        eval '\';
    my $subref = \\&amp;dumpvar_epic::dump_hash_expr;
    my $savout = s;

    ;' called at /home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 628
        DB::eval called at /home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 3410
        DB::DB called at /home/dominic/workspace/BugCounter/project.bugcounter.pl line 17

      DB<8> .
    Unmatched right curly bracket at (eval 28)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 9, at end of line
    syntax error at (eval 28)[/home/dominic/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl:628] line 9, near ";
    }"

      DB<9> main::(/home/dominic/workspace/BugCounter/project.bugcounter.pl:17):
    17:    my @projects_to_be_analysed = readReviewIds();
      DB<9>

     
    • Jan Ploski

      Jan Ploski - 2008-05-14

      The "Unmatched right curly bracket" problem has been discussed extensively here before (see past threads), and I guess this is another such instance. Generally, perl5db.pl runs into trouble when it split commands sent by EPIC into two buffer-fulls at an arbitrary character position instead of executing them all together. Have a look at your perl5db.pl around the line with "$IN->recv" and insert some debugging statements there to find out if it's really happening.

       
    • WeeDom

      WeeDom - 2008-05-15

      thanks. I guess I was just looking for the wrong error message :)

      I'll have another dig through the forums, then, and see what I can find out.

       
    • WeeDom

      WeeDom - 2008-05-15

      had a go. Couldn't get patch /path/to/real/perl5db.pl patchfile.patch to work... it complained of bad headers in the patch file. So, being the bold type, I set about it manually.

      My perl5db.pl now reads like this, at the appropriate part.

      start quote:

      $OUT->write( join( '', @_ ) );

              # Receive anything there is to receive.

              my $buf='';
              my $stuff='x';
              while(!($buf=~ m/\n/)&&length($stuff)>0){
              $IN->recv( $stuff, 2048 ); # XXX "what's wrong with sysread?"
                                          # XXX Don't know. You tell me.
              $buf.=$stuff;
              }

              # What we got.

              $buf;
              } ## end if (ref $OUT and UNIVERSAL::isa...

              # No socket. Just read from the terminal.

      : end quote

      ##############################################

      but still getting the same error message.

      I inserted deliberate fluff into the code snippet and compared it with what is in workspace/.metadata/.plugins/org.epic.debug/perl5db.pl, and the changes are being copied across as expected?

      This is, naturally, a bit of a show-stopper with Eclipse/EPIC.

      Any other ideas?

      Regards
      Dominic

       
      • Jan Ploski

        Jan Ploski - 2008-05-15

        If you are using the gcj JVM (find out in Help/About Eclipse Platform), then you should switch to Sun's JVM and repeat the tests.

        If you are already using Sun's JVM, it would be interesting to print out the content of $buf before it gets executed. For example:

        open(FL, '>>/tmp/somefile.txt');
        print FL "buf=>>>$buf<<<\n";
        close(FL);

        To see if the commands are really cut off/split into multiple buffers.

         

Log in to post a comment.