So, my app works perfectly except that it freezes after a while of using it in the simulator. Any ideas?
The following error occurs:
App Game[6352:60b] *** Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:], /SourceCache/UIKit/UIKit-2935.137/UIWindowController.m:223
2014-04-18 11:32:43.237 App Game[6352:60b] *** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSInternalInconsistencyException> Attempting to begin a modal transition from <ViewController: 0x15f625180> to <GADWebAppViewController: 0x15f53e5d0> while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed
2014-04-18 11:32:49.603 App Game[6352:60b] Warning: Attempt to present <Game: 0x15f659030> on <ViewController: 0x15f625180> while a presentation is in progress!
Just dealt with this problem. I was using the SimpleAuth to authenticate Instagram for an app, and found out that I was calling the SimpleAuth authorize method twice. The second call was causing this error by trying to present it's own modal before the first call had dismissed it's own.
Related
With video.js 4.0.3, I got this error when using the flash mode :
Uncaught exception: TypeError: 'this.el_.vjs_pause' is not a function
Error thrown at line 2772
No problem with HTML5 mode.
The pause function seems to be unavailable in the flash object
I ran into this same JS error few days back. The fix that worked for me was to first check if the video element or it's parent is visible or not. Only when it's visible, trigger the pause method.
Hope this helps!
I'm developing ST2 on Chrome which uses localstorage. From time to time, it appears that the storage schema gets corrupted. When this happens, my app fails during load with "Uncaught typeError: Cannot read property 'isModel' of undefined". The only way to get my app running is to do localstorage.clear() in the console.
I'm assuming this is an ST2 bug, since the occurrence of the corruption seems unrelated to my code, or what I do in my app.
My main question is how do I catch the exception in such a way that either the app can recover, or the user is alerted as to what is going on? Right now, the app simply fails to load. I've tried wrapping the Ext.application() in app.js, but that is executing correctly. My launch function is not being reached.
There must be some weird thing going on with your app. Probably you have found the reason meanwhile and recognised the failing bit is somewhere in your app. Anyway if you are experiencing anything like this then probably the best bet is to catch the error event and do your error handling there. I.e.
window.addEventListener("error", function(errorEvent) {
//
// Add your error handling here
//
// if returns true, the error is suppressed and not thrown
return false;
});
When I start up my application I get the error detailed below. If I continue the application everything seems to be working fine. The error is raised between the calls to applicationWillFinishLaunching and applicationDidFinishLaunching.
I suspect the eror is getting generated when the xib is being loaded, however I can see nothing wrong with the xib and how it is connected up. Can anyone give me some tips on how I can trace back to find the source of the error?
Thanks,
2012-08-21 11:31:55.293 ConjugationViewer[32508:707] *** Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], /SourceCache/AppKit/AppKit-1138.47/AppKit.subproj/NSCell.m:1564
2012-08-21 11:31:55.303 ConjugationViewer[32508:707] Ignoring exception raised in __-[NSPersistentUIManager restoreAllPersistentStateWithTalagentWindows:registeringAsReadyWhenDone:completionHandler:]_block_invoke_3: Invalid parameter not satisfying: aString != nil
I had same problem.
In my case I had set
[NSTextField setStringValue:nil] By mistake.
You can trace the problem in your code using crash stack log.
The log shows function call as stack start from bottom. You can search the last call of your function after which cocoa functions get called. You can say problem present at the same function.
I have a WebView which works great except in one instance. When it loads a page with a SWF that loads another SWF, the load delegate gets "The operation couldn’t be completed. (NSURLErrorDomain error -999.)"
From what I gather, this error happens when a second request is made before the first has completed (1, 2, 3, 4). I am not expressly doing so, but the SWF is indeed making another request.
Ignoring the error is not a solution--I'm essentially ignoring it as is, and the entire page loads fine except for the Flash content. What can I do to make Flash work?
I'm not sure if not implementing the delegate call is the same as ignoring it; WebKit might be trying to handle the error under the hood and causing problems.
In my WebKit/Flash application, I have this in my WebFrameLoadDelegate:
- (void) webView:(WebView*)sender
didFailProvisionalLoadWithError:(NSError*)error
forFrame:(WebFrame*)frame
{
// If the user clicks a link while something is loading this error will
// be reported. It can be safely ignored (NSURLErrorCancelled -999)
if ([error code] == NSURLErrorCancelled) return;
// Real error handling here...
}
And everything works fine. If I take this out I start getting weird failures and even crashes when Flash content is displayed.
Background
I'm using UKCrashReporter in my app.
I've installed my own Uncaught
Exception Handler.
I'm setting up the
managedObjectContext of the object
activeItemController in
applicationDidFinishLaunching (1)
The Problem
If the managedObjectContext method throws an exception, the crash reporter dialog box only flashes up before the app crashes and so the user never gets to report the crash.
I want my app to continue only after the crash has been reported, not whilst the window is showing.
What I've tried
If UKCrashReporterCheckForCrash()
were an objective C method, I assume
I could call
performSelectorOnMainThread:waitUntilDone:YES
but it's not.
I've looked at some other Stack
Overflow questions about using
Conditional Locks to pause apps,
but I can't understand how I'd use it
for a C function.
How would I go about doing this in a nice way? Do people have any advice
for me? Any responses would be much
appreciated.
The Code
// In app delegate
-(void)applicationWillFinishLaunching:(NSNotification *)aNotification {
UKCrashReporterCheckForCrash(); // A C function which then creates a window if
// it detects a crash has happened.
}
-(void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[activeItemController setMoContextDisk:[self managedObjectContext]];
[activeItemController setMoContextMemory:[self managedObjectContextMemory]];
}
Update 1
I've been asked for more details on what I'm trying to do, so here goes.
The bug that triggered this thinking was an exception when merging managedObjectModels. My app got caught in a loop printing "Uncaught exception" to the console every few milliseconds.
And when I installed the uncaught exception handler before this exception happened, I'd get the described behaviour - my app would fire up, display the crash report dialog briefly, then continue to load and crash again.
Summary - I want to be able to handle errors that happen on startup.
(1) I'm not using bindings to do this, as I thought bindings would make testing the class more problematic.
I think your problem is with thinking of it as "pausing" your app. Think of it more as a different initial UI state. Your attempts to block the run loop will prevent any interactive window from ... well, being interactive. :-)
Your best bet is to show your main UI (and connect data sources, etc) only if the "am I prompting the user to submit a crash report" method says "no, go ahead and start normally". Otherwise, show your window and, when the user sends or declines to send the report, close the window and ask your app controller to continue the normal startup.
I looked at UKCrashReporterCheckForCrash() and it doesn't appear to create a window of any kind. It merely submits the crash. Could you describe what you're doing with more detail?