Ticket #159 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Mac OSX 10.4 crash on launch

Reported by: ChrisDolan Owned by:
Priority: blocker Milestone:
Component: editor Version: 0.19
Keywords: workaround fix Cc:

Description

I don't know enough about Wx to know if this is a Padre flaw or something lower level. When I launch by typing "padre" at the command line, I see the editor window for a couple seconds, then:

Deep recursion on subroutine "Padre::Wx::MainWindow::refresh_status" at /Users/chris/perl/lib/perl5/site_perl/Padre/Wx/MainWindow.pm line 2020.
Deep recursion on subroutine "Padre::Wx::MainWindow::on_stc_update_ui" at /Users/chris/perl/lib/perl5/site_perl/Padre/Wx/MainWindow.pm line 686.

then it crashes (see attached log)

% wxPerl -v
This is perl, v5.8.6 built for darwin-thread-multi-2level
(with 4 registered patches, see perl -V for more detail)

Attachments

padre-crashlog.txt (71.4 KB) - added by ChrisDolan 5 years ago.
crashlog

Change History

Changed 5 years ago by ChrisDolan

crashlog

comment:1 Changed 5 years ago by ChrisDolan

Oh, forgot to add version numbers. I installed wx via Fink.

% perlversion Wx
Wx 0.86

% wx-config --version
2.8.3

comment:2 Changed 5 years ago by szabgab

I suspect it is some code that the older versions of wxWidget cannot handle.
For now I'd recommend commenting out first line 686

$self->{notebook}->SetPageText($pageid, $modified . $text);

and if that does not help then line 2020

$self->refresh_status;

in file /Users/chris/perl/lib/perl5/site_perl/Padre/Wx/MainWindow.pm

Neither seem critical for the functioning of Padre (just updating the name of the file in the notebook and the status bar, respectively).

Please let us if this helps.

We'll have to find out why did it call itself recursively and if this is related to the relatively old wxWidgets or Mac.

It does not happen on my Linux machine with wxWidgets 2.8.8

comment:3 Changed 5 years ago by ChrisDolan

  • Keywords workaround added

Upgrading to wxWidgets 2.8.8 did not solve the problem (I upgraded by uninstalling Fink's wx and instead building from source via Alien::wxwidget). Commenting out those two lines let me start up without a crash.

Thanks.

comment:4 Changed 5 years ago by szabgab

Have you also rebuilt Wx after installing Alien::wxWidgets?
What does this say?

wxPerl -MWx -le'print  "Wx Version: $Wx::VERSION " . Wx::wxVERSION_STRING()'

comment:5 Changed 5 years ago by ChrisDolan

Yes, indeed.

Wx Version: 0.88 wxWidgets 2.8.8

comment:6 Changed 5 years ago by szabgab

Trying to avoid the deep recursion in r1439

Could you please fetch it from
http://svn.perlide.org/padre/trunk
and try it?

comment:7 Changed 5 years ago by ChrisDolan

I tried r1440 and encountered many seemingly unrelated difficulties. I backrevved to 1439 and had the same problems, as reported below

% ./Build test

t/00-compile...........skipped: Needs Test::Compile 0.08 but that does not work on Windows
t/01-load..............2/? # Wx Version: 0.88 wxWidgets 2.8.8
t/01-load..............10/? "my" variable $dir masks earlier declaration in same statement at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 50.
"my" variable $fpath masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 51.
"my" variable $path masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 52.
"my" variable $fpath masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 52.
"my" variable $fpath masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 53.
"my" variable $path masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 54.
"my" variable $fpath masks earlier declaration in same scope at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 54.

# Failed test 'use Padre;'
# at t/01-load.t line 29.
# Tried to use 'Padre'.
# Error: Global symbol "$file" requires explicit package name at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 45.
# syntax error at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 49, near "$dir ( "
# Global symbol "$poddir" requires explicit package name at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 49.
# syntax error at /Users/chris/Work/padre/blib/lib/Padre/Pod/Viewer.pm line 59, near "}"
# Compilation failed in require at /Users/chris/Work/padre/blib/lib/Padre/Pod/Frame.pm line 9.
# BEGIN failed--compilation aborted at /Users/chris/Work/padre/blib/lib/Padre/Pod/Frame.pm line 9.
# Compilation failed in require at /Users/chris/perl/lib/perl5/site_perl/Class/Autouse.pm line 410.
# at /Users/chris/Work/padre/blib/lib/Padre.pm line 54
# Padre::BEGIN() called at /Users/chris/Work/padre/blib/lib/Padre.pm line 54
# eval {...} called at /Users/chris/Work/padre/blib/lib/Padre.pm line 54
# require Padre.pm called at (eval 38) line 2
# main::BEGIN() called at /Users/chris/Work/padre/blib/lib/Padre.pm line 54
# eval {...} called at /Users/chris/Work/padre/blib/lib/Padre.pm line 54
# eval 'package main;
# use Padre @{$args[0]};
# 1;
#
# ;' called at /Users/chris/perl/System/Library/Perl/5.8.6/Test/More.pm line 705
# Test::More::_eval('package main;\x{a}use Padre @{$args[0]};\x{a}1;\x{a}', 'ARRAY(0x1830754)') called at /Users/chris/perl/System/Library/Perl/5.8.6/Test/More.pm line 680
# Test::More::use_ok('Padre') called at t/01-load.t line 29
# BEGIN failed--compilation aborted at /Users/chris/Work/padre/blib/lib/Padre.pm line 54.
# Compilation failed in require at (eval 38) line 2.
# BEGIN failed--compilation aborted at (eval 38) line 2.
# Looks like you failed 1 test of 12.
t/01-load.............. Dubious, test returned 1 (wstat 256, 0x100)

Failed 1/12 subtests

t/02-new...............1/? # Wx Version: 0.88 wxWidgets 2.8.8

# Failed test 'defaults'
# at t/02-new.t line 31.
# Structures begin differing at:
# $got->{editor_indentwidth} = '4'
# $expected->{editor_indentwidth} = Does not exist
# Looks like you failed 1 test of 5.
t/02-new............... Dubious, test returned 1 (wstat 256, 0x100)

Failed 1/5 subtests

t/03-wx................ok
t/60-db................ok
t/70-document..........1/? Could not find encoding of file 'eg/hello_world.pl'. Defaulting to 'utf-8'. Please check it manually and report to the Padre development team. at /Users/chris/Work/padre/blib/lib/Padre/Document.pm line 330.
t/70-document..........ok
t/71-perl..............Could not find encoding of file 't/files/missing_brace_1.pl'. Defaulting to 'utf-8'. Please check it manually and report to the Padre development team. at /Users/chris/Work/padre/blib/lib/Padre/Document.pm line 330.
t/71-perl..............ok
t/80-newline...........ok
t/81-search............ok
t/82-plugin-manager....ok
t/83-autosave..........ok
t/91-vi................1/18 # Testing the t::lib::Padre::Editor a bit
t/91-vi................ok

Test Summary Report


t/01-load (Wstat: 256 Tests: 12 Failed: 1)

Failed test: 10
Non-zero exit status: 1

t/02-new (Wstat: 256 Tests: 5 Failed: 1)

Failed test: 4
Non-zero exit status: 1

Files=12, Tests=113, 19 wallclock secs ( 0.15 usr 0.15 sys + 10.01 cusr 3.43 csys = 13.74 CPU)
Result: FAIL
Failed 2/12 test programs. 2/113 subtests failed.

% wxPerl -Ilib script/padre
DBD::SQLite::db prepare failed: table snippets has no column named mimetype(1) at dbdimp.c line 271 at (eval 15) line 48.
Can't call method "execute" on an undefined value at lib/Padre/DB.pm line 145.
Compilation failed in require at /Users/chris/perl/lib/perl5/site_perl/Class/Autouse.pm line 410.

at lib/Padre/Config.pm line 203

Padre::Config::read('Padre::Config', '/Users/chris/Library/Application Support/.padre/config.yml') called at lib/Padre.pm line 97
Padre::new('Padre') called at script/padre line 26

comment:8 Changed 5 years ago by szabgab

sorry for the failing tests I fixed them in r1445
regarding the DBD::SQLite::db prepare failed: table snippets has no column named mimetype(1) errir
I think it will be gone when you run it the second time.

We should make the upgrade silent there...

comment:9 Changed 5 years ago by ChrisDolan

As of r1447, the tests pass but I still get the SQLite error.

comment:10 Changed 5 years ago by szabgab

r1449 typo fix should probably give you a DBI warning the first time you run it

comment:11 Changed 5 years ago by ChrisDolan

Indeed, r1449 fixes it. Now the editor comes up. Exactly once per second, I get a new warning message on the console that says "CGContextRestoreGState: invalid context", but I think this ticket can now be closed.

comment:12 Changed 5 years ago by szabgab

  • Keywords fix added
  • Status changed from new to closed
  • Resolution set to fixed

great, please open another ticket with that issue

Note: See TracTickets for help on using tickets.