4

First and foremost, I have searched this thoroughly and I'm not convinced with any solution to start.

I have a simple UIWebView wrapper and we have our code deployed on a static server. The URL of our server is the loading URL of the UIWebView, if there isn't any valid JSessionID, it redirects to the login page(from the client) which redirects back to our server when a successful JSessionID is captured.

The console displays the following error

Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.

though the functionality is working perfect. But i receive these logs in console.

When I try to replace the URL with "google", "facebook" or even the login page directly, I dont receive any error. I have tried commenting the CSS and JQuery code, and its still the same.

Please give me some insight as to what is wrong here.

Anshuk Garg
  • 1,540
  • 12
  • 14
  • possible duplicate of [Overriding layoutSubViews: causes "CGAffineTransformInvert: singular matrix" randomly](http://stackoverflow.com/questions/7471027/overriding-layoutsubviews-causes-cgaffinetransforminvert-singular-matrix-ran) – CodaFi Oct 29 '12 at 12:53
  • @CodaFi No its not, i haven't used any font and I tried allocating the UIWebView object programmatically. No help from any of it. – Anshuk Garg Oct 29 '12 at 12:59
  • UIWebView is a subclass of UIScrollView, and despite the fact that ***you*** may not have explicitly allocated a label, UIWebView must have. That's what web views do. Something in your site is most likely forcing UIWebView to allocate an element that has an invalid transform applied to it. – CodaFi Oct 29 '12 at 13:15
  • I tried commenting the whole code, but its still there if I hit the server address. If I delete my HTML code, then there is no error. – Anshuk Garg Oct 29 '12 at 17:44

2 Answers2

3

I was getting this error but I wasn't using a UIWebView. It turned out that the font I was using for an UILabel had a point size of zero... [UIFont fontWithName:@"AFontName" size:0]

AutomatonTec
  • 666
  • 6
  • 15
2

Use Safri 6 Web Inspector and iOS 6 to inspect your web page.

First, delete some node in the inspector. If deleting one node eliminates the "singular matrix" error, then reload the page and inspect CSS styles of that node.

Uncheck CSS styles of that node one by one. Usually when checking or unchecking one style, some error messages appear. But if unchecking one certain CSS style eliminates error message, then you find the root cause.

For me, it's the display: inline-block style of one <div> causes such errors.

Quotation
  • 711
  • 8
  • 12