Re: Problems with NSApp runModalForWindow
Re: Problems with NSApp runModalForWindow
- Subject: Re: Problems with NSApp runModalForWindow
- From: Vojtěch Meluzín <email@hidden>
- Date: Mon, 17 Oct 2011 16:58:12 +0200
Hi folks,
thanks for your answers and sorry for the delay. Anyway here's the stack
trace:
#0 0x7fff862cff10 in objc_msgSend
#1 0x7fff80341206 in _CFAutoreleasePoolPop
#2 0x7fff8a401200 in -[NSAutoreleasePool drain]
#3 0x7fff8687fe35 in -[NSApplication _realDoModalLoop:peek:]
#4 0x7fff8687d951 in -[NSApplication runModalForWindow:]
#5 0x1000265bb in MWindowSystemCocoa::DoModal at mlibrarymac.mm:1026
#6 0x10029a102 in MControl::DoModal at mcontroltoplevel.cpp:678
#7 0x100020d82 in MWindowsTestApplication::Main at main.cpp:23
#8 0x100376bb6 in main at globals.cpp:290
I also noticed these in the console:
2011-10-17 16:45:00.636 ConsoleExperiment[12032:a0f] ***
__NSAutoreleaseNoPool(): Object 0x100f20180 of class NSCFNumber autoreleased
with no pool in place - just leaking
2011-10-17 16:45:00.640 ConsoleExperiment[12032:a0f] ***
__NSAutoreleaseNoPool(): Object 0x100f107d0 of class NSCFArray autoreleased
with no pool in place - just leaking
2011-10-17 16:45:00.641 ConsoleExperiment[12032:a0f] ***
__NSAutoreleaseNoPool(): Object 0x100f3d2b0 of class NSMutableParagraphStyle
autoreleased with no pool in place - just leaking
...
This confuses me even more. The crash seems to be caused by the god damn
release pool and the other messages look llike there is no release pool at
all!
Btw. I'm calling [NSApplication sharedApplication] in the beginning as the
documentation states that this initializes the application and default
release pool, right? I also tried to makes some global release pool manually
like this:
ReleasePool = [[NSAutoreleasePool alloc] init];
and that successfuly make the app crashing all the time. I'm really new to
objc (in fact I don't want to mess with it, I just need the GUI working as
there is no carbon anymore...), but this release pool mess seems crazy to
me. I love the C++ allocator :)).
Thank you,
Vojtech
> Can you provide the stack trace of the exceptions you are facing.
>
>
>>
>> Thanks you,
>> Vojtech
>> <http://www.meldaproduction.com>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden