PerlGameDev/SDL — Issue #216: runtime failure on mac osx lion
Author: FROGGS
Created: 2012-02-16 11:09:19+00:00
State: open
Labels: Alien-SDL, BUG, SDL

```
Note: the bugtracker link specified in the SDL dist is down.

I have no problems building SDL (whether Alien::SDL uses option 1 (using
detected existing sdl libraries installed by macports) or option 4
(having the source downloaded and compiled by Alien::SDL). And the tests
for SDL work fine. But any program I try to run with it fails with
messages similar to the following (for Games::BubbleBreaker):

$ perl -Iblib/lib -Iblb/arch bin/bubble-breaker.pl
objc[10720]: Class SDLTranslatorResponder is implemented in both
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/auto/share/dist/Alien-SDL/1.430_a8dbcbda/lib/libSDL-1.2.0.dylib
and /opt/local/lib/libSDL-1.2.0.dylib. One of the two will be used.
Which one is undefined.
objc[10720]: Class SDL_QuartzWindow is implemented in both
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/auto/share/dist/Alien-SDL/1.430_a8dbcbda/lib/libSDL-1.2.0.dylib
and /opt/local/lib/libSDL-1.2.0.dylib. One of the two will be used.
Which one is undefined.
objc[10720]: Class SDL_QuartzWindowDelegate is implemented in both
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/auto/share/dist/Alien-SDL/1.430_a8dbcbda/lib/libSDL-1.2.0.dylib
and /opt/local/lib/libSDL-1.2.0.dylib. One of the two will be used.
Which one is undefined.
objc[10720]: Class SDL_QuartzView is implemented in both
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/auto/share/dist/Alien-SDL/1.430_a8dbcbda/lib/libSDL-1.2.0.dylib
and /opt/local/lib/libSDL-1.2.0.dylib. One of the two will be used.
Which one is undefined.
**************************** Information **********************************
Click on a bubble to select all contiguous buubles of same color and double
click to destroy them. The more bubbles you destroy at once the more points
you get.

To quit press ESC.

Have fun!
***************************************************************************
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowTags: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorFailure: Set a
breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetDeferOrdering: error setting or clearing window tags
2012-02-14 18:58:37.370 perl[10720:707] _NXCreateWindowWithStyleMask:
error setting window property (1002)
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowShadowAndRimParameters: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowAlpha: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowColorSpace: Invalid connection
2012-02-14 18:58:37.372 perl[10720:707] error [1002] setting colorSpace
to Color LCD colorspace
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowTags: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSGetWindowTags: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetHideOnDeact: error getting window tags
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSClearWindowTags: Invalid connection
2012-02-14 18:58:37.466 perl[10720:707] _NSSetWindowTag, error clearing
window tags (1002)
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowTags: Invalid connection
2012-02-14 18:58:37.466 perl[10720:707] _NSSetWindowTag, error setting
window tags (1002)
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSGetWindowResolution: Invalid connection
2012-02-14 18:58:37.467 perl[10720:707] error [1002] getting window
resolution
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowResolution: Invalid connection
2012-02-14 18:58:37.468 perl[10720:707] Error [1002] setting resolution to 1
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowProperty: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowEventMask: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetEventMask: error setting window event mask
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
_setWindowRegion: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSClearDragRegion: error clearing drag region
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
_setWindowRegion: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSClearActivationRegion: error clearing activation region
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSSetWindowProperty: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
CGSGetWindowEventMask: Invalid connection
Feb 14 18:58:37 MyMac perl[10720] <Error>: kCGErrorInvalidConnection:
_CGSCopyWindowGroup: Invalid connection
perl(10720,0x7fff71c74960) malloc: *** error for object 0x7fff674a6d20:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Abort trap: 6

This is on the latest version of Mac OSX Lion (10.7.3).

$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:

Platform:
osname=darwin, osvers=11.1.0, archname=darwin-2level
uname='darwin MyMac 11.1.0 darwin kernel version 11.1.0: tue jul 26
16:09:02 pdt 2011; root:xnu-1699.22.81~1release_i386 i386 '
config_args='-de -Dprefix=/Users/blue/local/perlbrew/perls/perl-5.14.2'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.2.1 (Based on Apple Inc. build 5658)
(LLVM build 2335.15.00)', 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 ='
-fstack-protector -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/usr/local/lib -L/opt/local/lib -fstack-protector'

Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
Built under darwin
Compiled at Sep 26 2011 11:26:03
%ENV:
PERLBREW_BASHRC_VERSION="0.39"
PERLBREW_HOME="/Users/blue/.perlbrew"

PERLBREW_PATH="/Users/blue/local/perlbrew/bin:/Users/blue/local/perlbrew/perls/perl-5.14.2/bin"
PERLBREW_PERL="perl-5.14.2"
PERLBREW_ROOT="/Users/blue/local/perlbrew"
PERLBREW_VERSION="0.39"
PERLDOC="-n"nroff -Tascii""
PERL_CPANM_OPT="-q"
@INC:

/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/5.14.2/darwin-2level
/Users/blue/local/perlbrew/perls/perl-5.14.2/lib/5.14.2
.

```