Opened 9 years ago

Last modified 9 years ago

#48134 new defect

p5-sdl unusable

Reported by: johan.schurer@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec), dbevans (David B. Evans)
Port: p5-sdl

Description

Exception message:

2015-06-21 23:21:27.233 perl[40433:507] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating CGSWindow on line 263'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff80a3725c __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x00007fff84814e75 objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff80a3710c +[NSException raise:format:] + 204
	3   AppKit                              0x00007fff8b48ce95 _NSCreateWindowWithOpaqueShape2 + 1403
	4   AppKit                              0x00007fff8b48ba21 -[NSWindow _commonAwake] + 3720
	5   AppKit                              0x00007fff8b367400 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 882
	6   AppKit                              0x00007fff8b366882 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1054
	7   AppKit                              0x00007fff8b366458 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
	8   libSDL-1.2.0.dylib                  0x000000010e2ad856 -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 279
	9   libSDL-1.2.0.dylib                  0x000000010e2ab29b QZ_SetVideoMode + 1417
	10  libSDL-1.2.0.dylib                  0x000000010e2a25a9 SDL_SetVideoMode + 906
	11  Video.bundle                        0x000000010e4849f4 XS_SDL__Video_set_video_mode + 516
	12  libperl.dylib                       0x000000010e15814e Perl_pp_entersub + 1166
	13  libperl.dylib                       0x000000010e151366 Perl_runops_standard + 22
	14  libperl.dylib                       0x000000010e0dcaa5 perl_run + 901
	15  perl                                0x000000010e0b8ddb main + 155
	16  libdyld.dylib                       0x00007fff823795fd start + 1
	17  ???                                 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Steps to reproduce:
Install p5-sdl, create simple file with the following contents and run it:

#!/opt/local/bin/perl
use strict;
use warnings;

use SDL;
use SDLx::App;

my $app = new SDLx::App(
   -title   => 'kaboom!',
   -width   => 1280,
   -height  => 800,
   -depth   => 32,
);

I'm running OSX 10.9.5 and Xcode: 6.1.1 (6A2008a)

Change History (6)

comment:1 Changed 9 years ago by dbevans (David B. Evans)

FWIW, running in debug mode shows the error occurs here

SDLx::App::new(/opt/local/lib/perl5/vendor_perl/5.20/darwin-thread-multi-2level/SDLx/App.pm:123):
123:		my $surface = SDL::Video::set_video_mode( $w, $h, $d, $f )
124:			or Carp::confess SDL::get_error();

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Keywords: Perl SDL removed

comment:3 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:4 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: devans@… added
Version: 2.3.3

Here's a "minimum" example that fails:

use SDL;
use SDL::Video;

SDL::init(SDL_INIT_VIDEO);

my $display = SDL::Video::set_video_mode( 320, 320, 32, SDL_SWSURFACE );

You can see an example in examples/cookbook/1.pl.

This should be fixed and a test should be added to catch this problem (port test p5.22-sdl works fine). Someone should report this upstream (https://github.com/PerlGameDev/SDL/issues perhaps?)

comment:5 Changed 9 years ago by mojca (Mojca Miklavec)

Also, I would imagine that the port should at least depend on libsdl.

comment:6 in reply to:  5 Changed 9 years ago by dbevans (David B. Evans)

Replying to mojca@…:

Also, I would imagine that the port should at least depend on libsdl.

That's what p5-alien-sdl is for.

Note: See TracTickets for help on using tickets.