Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSException on mac os x snow leopard (10.6.8) with Perl 5.14.1 #208

Closed
asb-capfan opened this issue Dec 20, 2011 · 5 comments
Closed

NSException on mac os x snow leopard (10.6.8) with Perl 5.14.1 #208

asb-capfan opened this issue Dec 20, 2011 · 5 comments

Comments

@asb-capfan
Copy link

Hi!

I tried to run this piece of code:

        #!perl

        use strict;
        use warnings;
        use SDL;
        use SDL::Event;
        use SDLx::App;

        my $app = SDLx::App->new(
            w     => 200,
            h     => 200,
            d     =>  32,
            title => "Quit Events",
            exit_on_quit => 1
        );

        $app->add_event_handler( \&quit_event );

        $app->run();
        exit(0);

        sub quit_event {
            # the callback receives the appropriate SDL::Event
            my $event = shift;

            # ... as well as the calling SDLx::Controller
            my $controller = shift;

            # stopping the controller will exit $app->run() for us
            $controller->stop if $event->type == SDL_QUIT;
        } # /quit_event```

I'm getting this error:

```text
        2011-12-20 10:49:53.368 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101512a00 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.377 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x10151bf20 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.378 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015190f0 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.378 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x10151c880 of class NSCFDictionary autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.379 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff70070c68 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.379 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015192c0 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.380 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bec8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.380 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015192e0 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.380 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.381 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015192a0 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.381 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007c5a8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.382 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015192a0 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.382 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.383 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007c5a8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.383 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.383 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007c5a8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.384 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.384 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.385 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7007bfa8 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.385 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101504550 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.389 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1012ab020 of class __NSFontTypefaceInfo autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.390 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1012ab3b0 of class NSAffineTransform autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.392 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101520320 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.392 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101520680 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.396 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101524ab0 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.397 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525210 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.397 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015255e0 of class NSCFSet autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.398 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015256b0 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.398 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015256f0 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.399 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1012ab570 of class NSCFSet autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.400 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708a0910 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.400 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708ac6f0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.401 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708ae590 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.401 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525740 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.402 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525920 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.402 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708ab8d0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.402 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708a2b30 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.403 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708a3ed0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.403 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708ad450 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.404 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708abdd0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.404 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525780 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.405 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7089f830 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.414 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015258e0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.415 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525980 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.415 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015259d0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.417 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101520680 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.419 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff708ade30 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.419 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff7089fe70 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.420 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101501b60 of class NSCFNumber autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.421 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1012aa820 of class NSCalibratedWhiteColor autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.421 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1013f8670 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.422 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1013f8eb0 of class NSCFDictionary autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.535 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015360f0 of class NSMutableParagraphStyle autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.536 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015361b0 of class NSCFDictionary autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.536 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101533580 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.537 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537780 of class __NSFontTypefaceInfo autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.538 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537930 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.538 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537ce0 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.539 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff70065588 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.539 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1015370b0 of class _NSThemeCloseWidget autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.542 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101525f30 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.543 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537ce0 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.543 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff70065588 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.544 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101538790 of class _NSThemeWidget autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.544 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537290 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.545 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537ce0 of class NSFont autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.546 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x7fff70065588 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.546 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101536760 of class _NSThemeWidget autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.547 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101523ea0 of class NSCFArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.549 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x101537e70 of class NSTrackingArea autoreleased with no pool in place - just leaking
        Tue Dec 20 10:49:53 imac24.fritz.box perl5.14.1[51900] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
        Tue Dec 20 10:49:53 imac24.fritz.box perl5.14.1[51900] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
        2011-12-20 10:49:53.550 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x114501fe0 of class NSTrackingArea autoreleased with no pool in place - just leaking
        Tue Dec 20 10:49:53 imac24.fritz.box perl5.14.1[51900] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
        Tue Dec 20 10:49:53 imac24.fritz.box perl5.14.1[51900] <Error>: kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection
        2011-12-20 10:49:53.551 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1002076d0 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.551 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x1012a3a10 of class NSException autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.552 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x114506a40 of class _NSCallStackArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.552 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x114506af0 of class _NSCallStackArray autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.552 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x114506c00 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.553 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x100e09000 of class NSCFString autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.554 perl5.14.1[51900:903] *** __NSAutoreleaseNoPool(): Object 0x114506c70 of class NSConcreteMutableData autoreleased with no pool in place - just leaking
        2011-12-20 10:49:53.554 perl5.14.1[51900:903] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
        *** Call stack at first throw:
        (
            0   CoreFoundation                      0x00007fff84ca3784 __exceptionPreprocess + 180
            1   libobjc.A.dylib                     0x00007fff8522df03 objc_exception_throw + 45
            2   CoreFoundation                      0x00007fff84ca35a7 +[NSException raise:format:arguments:] + 103
            3   CoreFoundation                      0x00007fff84ca3534 +[NSException raise:format:] + 148
            4   AppKit                              0x00007fff80567f52 _NSCreateWindowWithOpaqueShape2 + 473
            5   AppKit                              0x00007fff804fc691 -[NSWindow _commonAwake] + 1214
            6   AppKit                              0x00007fff804f9376 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 1501
            7   AppKit                              0x00007fff804f8002 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1396
            8   AppKit                              0x00007fff804f7a8b -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
            9   libSDL-1.2.0.dylib                  0x00000001006b72ac -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 349
            10  libSDL-1.2.0.dylib                  0x00000001006b385e QZ_SetVideoWindowed + 832
            11  libSDL-1.2.0.dylib                  0x00000001006b411c QZ_SetVideoMode + 169
            12  libSDL-1.2.0.dylib                  0x00000001006a5b0c SDL_SetVideoMode + 655
            13  Video.bundle                        0x0000000100724a92 XS_SDL__Video_set_video_mode + 210
            14  perl5.14.1                          0x00000001000a0a36 Perl_pp_entersub + 1782
            15  perl5.14.1                          0x0000000100099103 Perl_runops_standard + 35
            16  perl5.14.1                          0x0000000100021c0f perl_run + 895
            17  perl5.14.1                          0x000000010000165b main + 283
            18  perl5.14.1                          0x0000000100001534 start + 52
        )
        terminate called after throwing an instance of 'NSException'```


Here is some more information:
OS: OS X snow leopard 10.6.8
Perl:  5.14.1 built for darwin-2level, built via perlbrew
SDL.pmversion : 2.534
Alien::SDL.pm version: 1.428
Using the code here http://sdl.perl.org/SDL-Version.html the output is:
SDL::version is 1.2.14
SDL::linked_version is 1.2.14
@jtpalmer
Copy link
Member

Did you use the SDLPerl binary when you ran that code?

@asb-capfan
Copy link
Author

Hi! Sorry for the delay.

What binary do you mean? When I install Alien::SDL, it gives me the following options:

  cpan> install Alien::SDL
  [snip]
  You have the following options:
  [1] Source code build: SDL-1.2.14 & co. (no PANGO, but TTF)
    builds: SDL, SDL_(image|mixer|ttf|gfx)
    needs preinstalled: freetype2-devel
  [2] Source code build: SDL-1.2.14 & co. (no PANGO, no TTF)
    builds: SDL, SDL_(image|mixer|gfx)
  [3] Source code build: SDL-1.2.14 & co. + all prereq. libraries
    builds: zlib, jpeg, tiff, png, freetype, SDL, SDL_(image|mixer|ttf|gfx)
  [4] Quit installation

@jtpalmer
Copy link
Member

jtpalmer commented Jan 4, 2012

When you install SDL, a program named SDLPerl is installed. It should be in your path. Try running the script with that program instead of perl.

@asb-capfan
Copy link
Author

Yes, that's it! Thank you. Um, dumb question: where is it mentioned in the documentation?

@jtpalmer
Copy link
Member

jtpalmer commented Jan 4, 2012

It was in the README at one point, but looks like it's been removed. I'll open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants