Opened 4 years ago

Closed 4 years ago

#855 closed defect (fixed)

Error in running script in Padre causes crash...

Reported by: waxhead Owned by: waxhead
Priority: critical Milestone:
Component: editor Version: trunk
Keywords: Cc: kthakore

Description

I've got a simple script with silly errors, which when run caused Padre to crash with this error:

Can't locate object method "errorlist" via package "Padre::Wx::App" at /home/pete/Programming/Perl/Padre/trunk/Padre/lib/Padre/Task/ErrorParser.pm line 40.

Should be simple to fix.. :)

Change History (6)

comment:1 Changed 4 years ago by waxhead

  • Cc kthakore added

OK, kthakore actually reported this bug first, however the mixed up output of the "IsChecked?" error makes it hard to see what's happening, so I'm add in his original details from #850:

Linux only I think:
[Reproducing this bug]
Don't use ./dev.pl;

make a file.pl with
warn 'crash';
in it.

  1. padre
  2. open file.pl
  3. F5

You get the same output complaining there is no errorlist method as above.

comment:2 Changed 4 years ago by waxhead

  • Priority changed from major to critical

comment:3 Changed 4 years ago by waxhead

  • Owner set to kthakore
  • Status changed from new to assigned

comment:4 Changed 4 years ago by kthakore

We need a sub in lib/Padre/Wx/App.pm to open the Error List tab and give access to the parser on that back.

$errorlist->AppendItem? in lib/Padre/Task/ErrorParser.pm looks like it is trying to access a Wx object.

comment:5 Changed 4 years ago by waxhead

  • Owner changed from kthakore to waxhead

Rather than go to bed, I tracked down the bug and fixed it.. sorry kthakore...

http://padre.perlide.org/trac/changeset/10837 is the fix.

The issue was more that the errorlist method is in Padre::Wx::Main, and the intent of the code shows it thought it was shifting Padre::Wx::Main, but instead it got a Padre::Wx::App.

That's fine, as Padre::Wx::App holds a reference to Padre::Wx::Main, in ->{main}, so the simple fix in this case was to shift->{main}. But Given that it thought it was getting Padre::Wx::Main it would be worth making sure that the code that called ->finish was right.. but I'm too tired now to do that.

Please try it out and let me know if you are still seeing the error.

comment:6 Changed 4 years ago by waxhead

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.