68

I am working on an opengl project. I have used some images (2 for x-y scales) and labels (8) to display the scale on the screen. My first view is a tableview from which I go to openglView. But whenever I go back from openglView to the tableView it gives me this error and app crashes.

"This UIView seems to be the delegate of an NSISVariable it doesn't know anything about. This is an internal UIKit bug."

ANY Suggestions? Is this happening because I am including too many UI elements, other than those images and labels I have used some buttons also. And I am applying affineTransform to those images and labels and one button also.

Exact error is:

2013-01-31 12:20:18.743 EMtouch[50496:12203] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '{ Rows:
    UILayoutContainerView:0x9835660.Height == 480 + 1*0x7e53030.marker + 1*0x7e546c0.marker
    UILayoutContainerView:0x9835660.Width == 320 + 1*0x7e52f90.marker + 1*0x7e54330.marker
    UILayoutContainerView:0x9835660.minX == 0 + 1*0x7e52ca0.marker + -0.5*0x7e52f90.marker
    UILayoutContainerView:0x9835660.minY == 0 + 1*0x7e52fd0.marker + -0.5*0x7e53030.marker
    UINavigationTransitionView:0x9837ea0.Height == 480 + 1*0x7e51bf0.marker + 1*0x7e53030.marker + 1*0x7e546c0.marker
    UINavigationTransitionView:0x9837ea0.Width == 320 + 1*0x7e519c0.marker + 1*0x7e52f90.marker + 1*0x7e54330.marker
    UINavigationTransitionView:0x9837ea0.minX == 0 + 1*0x7e51940.marker + -0.5*0x7e519c0.marker
    UINavigationTransitionView:0x9837ea0.minY == 0 + 1*0x7e51b80.marker + -0.5*0x7e51bf0.marker
    UIWindow:0x7e1aea0.Height == 480 + 1*0x7e546c0.marker
    UIWindow:0x7e1aea0.Width == 320 + 1*0x7e54330.marker
    UIWindow:0x7e1aea0.minX == 0 + -0.5*0x7e54330.marker + 1*0x7e54410.marker
    UIWindow:0x7e1aea0.minY == 0 + 1*0x7e542d0.marker + -0.5*0x7e546c0.marker
    objective == <250:-0.000579834> + <250:-9.72015e-08>*UILabel:0x7b44bf0.Width + <250:9.72015e-08>*UILabel:0x7b45100.Width

  Constraints:
    <NSAutoresizingMaskLayoutConstraint:0x7e51940 h=-&- v=-&- UINavigationTransitionView:0x9837ea0.midX == UILayoutContainerView:0x9835660.midX>        Marker:0x7e51940.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e519c0 h=-&- v=-&- UINavigationTransitionView:0x9837ea0.width == UILayoutContainerView:0x9835660.width>      Marker:0x7e519c0.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e51b80 h=-&- v=-&- UINavigationTransitionView:0x9837ea0.midY == UILayoutContainerView:0x9835660.midY>        Marker:0x7e51b80.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e51bf0 h=-&- v=-&- UINavigationTransitionView:0x9837ea0.height == UILayoutContainerView:0x9835660.height>        Marker:0x7e51bf0.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e52ca0 h=-&- v=-&- UILayoutContainerView:0x9835660.midX == UIWindow:0x7e1aea0.midX>      Marker:0x7e52ca0.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e52f90 h=-&- v=-&- UILayoutContainerView:0x9835660.width == UIWindow:0x7e1aea0.width>        Marker:0x7e52f90.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e52fd0 h=-&- v=-&- UILayoutContainerView:0x9835660.midY == UIWindow:0x7e1aea0.midY>      Marker:0x7e52fd0.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e53030 h=-&- v=-&- UILayoutContainerView:0x9835660.height == UIWindow:0x7e1aea0.height>      Marker:0x7e53030.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e54330 h=--- v=--- H:[UIWindow:0x7e1aea0(320)]>      Marker:0x7e54330.marker
    <NSAutoresizingMaskLayoutConstraint:0x7e546c0 h=--- v=--- V:[UIWindow:0x7e1aea0(480)]>      Marker:0x7e546c0.marker
    <_UIWindowAnchoringConstraint:0x7e542d0 h=--- v=--- UIWindow:0x7e1aea0.midY == + 240>       Marker:0x7e542d0.marker
    <_UIWindowAnchoringConstraint:0x7e54410 h=--- v=--- UIWindow:0x7e1aea0.midX == + 160>       Marker:0x7e54410.marker
}: internal error.  Cannot find an outgoing row head for incoming head UILabel:0x7b44bf0.Width, which should never happen.'
*** First throw call stack:
(0x1fb1012 0x19f4e7e 0x1fb0deb 0x1599609 0x159c64f 0x159c753 0xe7e8f9 0x982b24 0x982783 0xbba3fe 0xbba698 0x97a3b6 0x97a554 0x28f7d8 0x1c2b014 0x1c1b7d5 0x1f57af5 0x1f56f44 0x1f56e1b 0x34d37e3 0x34d3668 0x93c65c 0xc56d 0x2b35 0x1)
libc++abi.dylib: terminate called throwing an exception
the swine
  • 10,713
  • 7
  • 58
  • 100
user1589426
  • 681
  • 5
  • 4
  • Definitely won't be too many UI elements. Just taking a guess, but I know that when an affine transform is applied it the value of the `frame` property is undefined. Maybe autolayout is using the frame? To test that theory you could remove the transforms and see if the bug still happens. Someone with more Autolayout experience than me probably has a better guess, as I don't know what 'outgoing row heads' are. Also might be worth filing a radar with Apple. – MaxGabriel Jul 20 '13 at 19:59
  • I concur with MaxGabriel, it sounds like an autolayout issue. Any chance this opengl was written for iphone4s and earlier, that is, you're not using ES 3? – Meshach Oct 15 '13 at 00:28
  • We would need your tableview parent controller code to see how everything is set up. Also the controller code you are coming from and its code to see what is actually happening when going from one viewcontroller to the other. I do not think the problem is the UI elements at all, but thats my guess. – S.H. Nov 09 '13 at 19:19
  • It sounds as if your application is crashing because when loading the openGL view, you are using that as your UIView overrider, and then when going back to the tableview, it's as if the program doesn't know anything about the tableview, so it returns the bug, thus, crashing the application – user2277872 Nov 10 '13 at 04:42
  • try this if its working or not http://stackoverflow.com/questions/11303563/container-view-controller-addsubview-exception – Ahmad Arslan Jun 12 '14 at 05:12

1 Answers1

2

"tableview from which I go to openglView" - this statement combined with usage of affine transform suggest that you are not using standard navigation and try to move views and use Autolayout simultaneously.

This crash is related to the contrary set of constraints, I guess you are applying affine transform and thus mess up with some frames. Try to modify constraints constants instead of using any transforms.

Wladek Surala
  • 2,590
  • 1
  • 26
  • 31