Ticket #1388 (closed defect: fixed)
Using breakpoints toolbar item on un-named file causes crash
| Reported by: | tome | Owned by: | bowtie |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Debugger for Perl 5 | Version: | 0.95 |
| Keywords: | breakpoints | Cc: |
Description
On the latest svn:
If the breakpoints toolbar item is clicked while a file has not yet been named (new file), it executes the code in Breakpoints.pm 'set_breakpoints_clicked'.
The breakpoints SQL query dies there for me because of a null file name, and the error isn't trapped (in svn), and Padre crashes for me.
My guess would be that it makes sense to prompt the user if they should save the file, but I don't know enough about the code to know if we should also do the same if there are any unsaved changes in the file?
Change History
comment:1 Changed 17 months ago by bowtie
- Owner set to bowtie
- Status changed from new to accepted
- Component changed from not classified yet to Debugger for Perl 5
comment:2 Changed 17 months ago by bowtie
- Priority changed from major to minor
As the tool-bar icon is just a short cut, to protect Padre, it will now only be active against a saved perl file
thanks tome
see r18081
as for the Debug2 Panels see wiki for update.
ps tome i had forgot to test this case, it just seamed illogical to me
comment:3 Changed 17 months ago by bowtie
just install Padre r18171, as make install rather than svn up
kevin@billy:~/perl5/perlbrew/perls/perl-5.14.2/bin$ perl -d padre
Loading DB routines from perl5db.pl version 1.33
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(padre:3): eval 'exec /home/kevin/perl5/perlbrew/perls/perl-5.14.2/bin/perl -S $0 ${1+"$@"}'
main::(padre:4): if 0; # not running under some shell
DB<1> b load /home/kevin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Padre/Wx/Directory.pm
Will stop on load of `/home/kevin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Padre/Wx/Directory.pm'.
DB<2> c
11:18:55: Error: Image file is not of type 1.
'/home/kevin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Padre/Wx/Directory.pm' loaded...
Padre::Wx::Main::directory(/home/kevin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Padre/Wx/Directory.pm:19):
19: our $VERSION = '0.95';
DB<2> .
Padre::Wx::Main::directory(/home/kevin/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Padre/Wx/Directory.pm:19):
19: our $VERSION = '0.95';
DB<2> b 580
DB<3> c
dose not generate any errors,
