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

NSRangeException in PDDOMDomainController when UIAlertView shown #90

Open
JD- opened this issue Oct 31, 2013 · 2 comments
Open

NSRangeException in PDDOMDomainController when UIAlertView shown #90

JD- opened this issue Oct 31, 2013 · 2 comments
Labels
bug debugger The PonyDebugger iOS framework

Comments

@JD-
Copy link

JD- commented Oct 31, 2013

Running on IPad simulator with the Elements tab of the Chrome Developer opened.

Showing a UIAlertView, I get an NSRangeException.

0  CoreFoundation                      0x0279e5e4 __exceptionPreprocess + 180
1  libobjc.A.dylib                    0x025218b6 objc_exception_throw + 44
2  CoreFoundation                      0x0273f4e6 -[__NSArrayM objectAtIndex:] + 246
3  .........                          0x000a43fe -[PDDOMDomainController addView:] + 1758
4  .........                          0x000a388d -[PDDOMDomainController windowShown:] + 125
5  Foundation                          0x021f4bf9 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
6  CoreFoundation                      0x027fa524 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
7  CoreFoundation                      0x0275200b _CFXNotificationPost + 2859
8  Foundation                          0x0212e951 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
9  Foundation                          0x0213de2a -[NSNotificationCenter postNotificationName:object:] + 55
10  UIKit                              0x012cbeb3 -[UIWindow _setHidden:forced:] + 596
11  UIKit                              0x012cc02d -[UIWindow _orderFrontWithoutMakingKey] + 49
12  UIKit                              0x012d689a -[UIWindow makeKeyAndVisible] + 65
13  UIKit                              0x0183c9c7 -[_UIModalItemsCoordinator _presentingViewControllerForAlertCompatibilityCreateIfNeeded:] + 798
14  UIKit                              0x0183c6a4 -[_UIModalItemsCoordinator _presentingViewControllerForAlertCompatibility] + 41
15  UIKit                              0x0177153c -[UIAlertView(Private) popupAlertAnimated:animationType:atOffset:] + 382
16  UIKit                              0x01771963 -[UIAlertView(Private) popupAlertAnimated:animationType:] + 56
17  UIKit                              0x01776948 -[UIAlertView showWithAnimationType:] + 48
18  UIKit                              0x01776976 -[UIAlertView show] + 41

The exception occurs at line 531 in PPDOMDomainController.m
UIWindow *previousWindow = [windows objectAtIndex:indexOfWindow - 1];

As a quick fix, I have replaced

 if (indexOfWindow > 0) { 

by

 if (indexOfWindow > 0 && indexOfWindow != NSNotFound) {

but I think there must be some more complex work to do as it possibly affects a feature.

@wlue
Copy link
Contributor

wlue commented Nov 1, 2013

What version of iOS are you using?

@JD-
Copy link
Author

JD- commented Nov 1, 2013

iOS7.

@asmallteapot asmallteapot added bug debugger The PonyDebugger iOS framework labels Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug debugger The PonyDebugger iOS framework
Projects
None yet
Development

No branches or pull requests

3 participants