The error should happen in following code

... warn sprintf "(Sub)string is [%s]", substr($js,$offset,20); die $@ ...

The function is:

# Take a JSON response and convert it to a Perl data structure sub to_perl { my ($self,$js) = @_; local $_ = $js; #s/^(\.+\>\s*)+//; # remove Mozrepl continuation prompts s/^"//; s/"$//; if (/\.+>/) { # This should now be eliminated! die "Continuation prompt found in [$_]"; } #warn $js; # reraise JS errors from perspective of caller if (/^!!!\s+(.*)$/m) { croak "MozRepl::RemoteObject: $1"; }; if (! /\S/) { # We got an empty string back from the REPL ... warn "Got empty string from REPL"; return; } # In the case that we don't have a unicode string # already, decode the string from UTF-8 $js = decode('UTF-8', $_); #warn "[[$_]]"; my $res; local $@; my $json = $self->json; if (! eval { $res = $json->decode($js); #use Data::Dumper; #warn Dumper $res; 1 }) { my $err = $@; my $offset; if ($err =~ /character offset (\d+)\b/) { $offset = $1 }; $offset -= 10; $offset = 0 if $offset < 0; warn sprintf "(Sub)string is [%s]", substr($js,$offset,20); die $@ }; $res };

As i remember, with previous firefox releases(6.0,5.0,4.0), i encounter this problem occasionally. Now it happens always in firefox 8. How could avoid this problem?


In reply to Re^2: RemoteObject.pm fails in open firefox8.0 by seven_shen
in thread RemoteObject.pm fails in open firefox8.0 by seven_shen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.