Ticket #1491 (new defect)
Opened 2 months ago
Outline Entries Not Displayed on OSX
| Reported by: | sjm | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Outline | Version: | 0.96 |
| Keywords: | Cc: |
Description
This was a pretty strange issue to track down. Basically on OSX the outline view would show the categories (Modules, Attributes, Methods, etc) but they would all be empty unless you entered a term into the search box, in which case they would render properly.
I tracked it down to Padre::Wx::Outline, line 428:
next if $name !~ /$term/;
That regex would always pass (skipping the entry) if $term was the empty string (which is the case when nothing is in the search box).
This made absolutely no sense, that regex should not pass if $term is the empty string, and could not repeat this behavior in isolation, and clearly this did not happen on any platform other than OSX.
After a bunch more digging, it appears to be a bug in wxPerl. Strangely, if a regex is done on $^X, somehow the behavior of regexes changes. No longer does the empty string always match. Running the following simple script with wxPerl:
my $term = ''; my $name = 'name'; print $name !~ /$term/ ? "skipping\n" : "not skipping\n"; $^X =~ /wxperl/i; print $name !~ /$term/ ? "skipping\n" : "not skipping\n";
Yields:
not skipping
skipping
The padre startup script does a regex on $^X on OSX to determine if its running with wxperl. I guess I can think of a couple possible solutions:
1) Do an explicit check in Padre::Wx::Outline to first make sure $term is not the empty string.
2) Change the 'padre' script to determine if wxperl is being run by not doing a regex on $^X
But I do not know which one is best.
I am using the latest Citrus Perl.
% /usr/local/citrusperl/vendor/bin/wxPerl -V
Summary of my perl5 (revision 5 version 16 subversion 1) configuration:
Platform:
osname=darwin, osvers=10.8.0, archname=darwin-thread-multi-2level
uname='darwin snowcat.dootson.net 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
config_args='-ders -Dcc=gcc -Dld=g++ -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Ud_poll -Ui_poll -Ui_libutil -Aldflags=-Wl,-search_paths_first -Alddlflags=-Wl,-search_paths_first -Accflags=-arch x86_64 -Aldflags=-arch x86_64 -Alddlflags=-arch x86_64 -Accflags=-B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -Aldflags=-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -Wl,-headerpad_max_install_names -Alddlflags=-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -Wl,-headerpad_max_install_names -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DPERL_RELOCATABLE_INCPUSH -Accflags=-fno-merge-constants -Dprefix=/usr/local/citrusperl -Dprivlib=/usr/local/citrusperl/lib -Darchlib=/usr/local/citrusperl/lib -Dsiteprefix=/usr/local/citrusperl/site -Dsitelib=/usr/local/citrusperl/site/lib -Dsitearch=/usr/local/citrusperl/site/lib -Dvendorprefix=/usr/local/citrusperl/vendor -Dvendorlib=/usr/local/citrusperl/vendor/lib -Dvendorarch=/usr/local/citrusperl/vendor/lib -Dsed=/usr/bin/sed -Duseshrplib -Dcf_by=CitrusPerl -Dcf_email=support@citrusperl.org'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -arch x86_64 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector',
optimize='-O3',
cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -arch x86_64 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector'
ccversion='', gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -Wl,-search_paths_first -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -Wl,-headerpad_max_install_names -fstack-protector'
libpth=/usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -Wl,-search_paths_first -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -Wl,-headerpad_max_install_names -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
PERL_RELOCATABLE_INCPUSH USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API USE_SITECUSTOMIZE
Built under darwin
Compiled at Oct 9 2012 09:18:35
@INC:
/usr/local/citrusperl/site/lib
/usr/local/citrusperl/vendor/lib
/usr/local/citrusperl/lib
.
