You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jake Williams (JIRA)" <ji...@apache.org> on 2014/04/21 20:38:20 UTC

[jira] [Commented] (CB-6479) App Crash: Requesting the window of a view with a nil layer

    [ https://issues.apache.org/jira/browse/CB-6479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975861#comment-13975861 ] 

Jake Williams commented on CB-6479:
-----------------------------------

I tried a very strictly coded loading overlay with preventDefault, stopPropagation and return false all bound to the click event of a page covering div, but that didn't turn out to be a viable option.

I also tried to catch the error in main to see if it was something that had to crash the app, and apparently it is.  I didn't see a way of using our javascript error emailing function to send errors from main.m.

Here's an error log, I believe the actual cause is happening in UIKit.

	0   CoreFoundation                      0x00000001003ad495 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x00000001031e599e objc_exception_throw + 43
	2   CoreFoundation                      0x00000001003ad2ad +[NSException raise:format:] + 205
	3   UIKit                               0x0000000100680875 __windowForView + 445
	4   UIKit                               0x00000001009533cb _UIGestureRecognizerUpdate + 4337
	5   UIKit                               0x0000000100666a15 -[UIWindow _sendGesturesForEvent:] + 928
	6   UIKit                               0x00000001006676d4 -[UIWindow sendEvent:] + 909
	7   UIKit                               0x000000010063f29a -[UIApplication sendEvent:] + 211
	8   UIKit                               0x000000010062caed _UIApplicationHandleEventQueue + 9579
	9   CoreFoundation                      0x000000010033cd21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	10  CoreFoundation                      0x000000010033c5f2 __CFRunLoopDoSources0 + 242
	11  CoreFoundation                      0x000000010035846f __CFRunLoopRun + 767
	12  CoreFoundation                      0x0000000100357d83 CFRunLoopRunSpecific + 467
	13  GraphicsServices                    0x0000000104821f04 GSEventRunModal + 161
	14  UIKit                               0x000000010062ee33 UIApplicationMain + 1010
	15  <AppName>                      0x00000001000446a7 main + 71
	16  libdyld.dylib                       0x0000000103b337e1 start + 0

> App Crash: Requesting the window of a view with a nil layer
> -----------------------------------------------------------
>
>                 Key: CB-6479
>                 URL: https://issues.apache.org/jira/browse/CB-6479
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.3.0
>         Environment: IOS 6 and 7 on ipod, ipad and on simulator.
>            Reporter: Jake Williams
>              Labels: crash
>
> We're getting an error sometimes while making page changes in our app.  We're using an iframe to have an outer page with a navigation footer and inner pages that change and have animations.  Occasionally when changing the page in the iframe, if you click before the page has finished transitioning/loading, it will throw an error.
> Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Requesting the window of a view (<UIWebOverflowContentView:...>) with a nil layer.  This view probably hasn't received initWithFrame: or initWithCoder:.'
>  https://groups.google.com/forum/#!topic/PhoneGap/bhU_Ug8wPr0  
> This guy seemed to have the same issue.  I've been unable to setup a delay that fixes the issue and we're at the top of pages that aren't tall enough to have scrolling when the error occurs.  I tried covering the page with a loading div to prevent clicks, but that didn't work.  I haven't figured out a good way to delay the page load or stop button clicks while we wait for objective-c to catch up either.  I've also been unable to find a way to catch or handle the error in objective c, mainly because I have had no luck actually finding the code that's causing the issue, I assume it's in cordova or a framework, but haven't been able to figure out where it is.
> I've reported the issue here https://groups.google.com/forum/#!topic/phonegap/5UBdxxu7RBU but haven't gotten any suggestions for fixes yet.



--
This message was sent by Atlassian JIRA
(v6.2#6252)