Re: Random crashes
Re: Random crashes
- Subject: Re: Random crashes
- From: Kevin Muldoon <email@hidden>
- Date: Tue, 01 Apr 2014 17:57:11 -0400
Perhaps do an NSLog on the [NSWindow becomeKeyWindow] / [NSWindow updateWindows] and see if an NSLog on NSNotification willEnterForeground fires before either of those methods. If so, then you have a good chance of closing down whatever SpriteKit is doing when your app is going to background and then restarting those processes upon willEnterForeground notification. At the very least, you should be able to get a better look at the error logs by adding a bit of delay.
On Apr 1, 2014, at 5:19 PM, Alexander Reichstadt <email@hidden> wrote:
> Hi,
>
> in a project using the default Spritekit template all works fine until one leaves the app and switches to another process, which results in random crashes without a backtrace. After having switched to another process and returning to the running or also paused game, it's only a question of time when it will crash.
>
> It always seems to involve the main window. The trace is not very helpful as it crashes outside the app's own code. The last calls that I can see in the debugger are sometimes [NSApplication updateWindows], other times it's [NSWindow becomeKeyWindow].
>
> Googling this issue was not very helpful. Suggestions varied from putting the entire app in a try-block, subclassing NSApplication for testing purposes, up to including creating the entire project from scratch and copy pasting line by line.....good luck with that. Except for that last option I tried the other two to no avail. Is there a way to find the root cause of such a crash?
>
> Thx
>
>
>
> _______________________________________________
>
> 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
References: | |
| >Random crashes (From: Alexander Reichstadt <email@hidden>) |