nicklockwood / layout

A declarative UI framework for iOS
MIT License
2.23k stars 97 forks source link

SamplesApp crashes on Xcode 11 beta 3 #178

Closed akramhussein closed 5 years ago

akramhussein commented 5 years ago

XCode version: Version 11.0 beta 3 (11M362v)

Couple clicks on Simulator and crashes with nothing more than:

libc++abi.dylib: terminating with uncaught exception of type NSException

akramhussein commented 5 years ago

Sorry, I appreciate this is very vague so let me know if you are need anything else.

Essentially, upon compiling and running on an iPhone Xr simulator with XCode Version 11.0 beta 3 (11M362v), tapping on a Table or Collection it crashes with no useful stack trace. Otherwise rest of UI is quite laggy.

Table

When tapping on Table tab it crashes on https://github.com/nicklockwood/layout/blob/1c7ba36229c96f5d5c98c289ecd5fca69b811037/Layout/LayoutNode.swift#L2762

Screenshot 2019-07-09 at 20 38 23

Collection

If you tap Collection, it crashes on same line. The console shows:

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print('Whoops! You are missing the <' + arg.argName + '> argument.')? (fblldb.py, line 98)
  File "temp.py", line 1, in <module>

View has lost track of its superview, most likely through unsupported use of CALayer API on the view's layer. If this isn't a crash yet, it will be in the near future. 
    Problem view: <_TtC6LayoutP33_E820540BA7B1A5B68DC346B3C080A81D24LayoutCollectionViewCell: 0x7b500006f400; baseClass = UICollectionViewCell; frame = (0 0; 50.5714 50.5714); clipsToBounds = YES; layer = <CALayer: 0x7b0800017be0>>
    Expected parent: <_TtC6LayoutP33_E820540BA7B1A5B68DC346B3C080A81D24LayoutCollectionViewCell: 0x7b500006f400; baseClass = UICollectionViewCell; frame = (0 0; 50.5714 50.5714); clipsToBounds = YES; layer = <CALayer: 0x7b0800017be0>>
Break on UIViewReportBrokenSuperviewChain to debug.
(null)
Screenshot 2019-07-09 at 20 41 12

Note: Updated this message a few times to be more clear.

mgamer commented 5 years ago

Just chiming in with the same issue. It seems quite critical. @nicklockwood do you plan on supporting Layout for iOS 13? We love the library and would gladly use it for our new products (and hopefully provide our own pull requests at some point).

akramhussein commented 5 years ago

I concur, this library is so good and while SwiftUI may take some wind out of it, we still need to support older iOS versions that SwiftUI won't so I can't see us switching away from Layout any time soon! I'm happy to support Layout/@nicklockwood through Github Support too.

Otherwise, happy to more debugging with a little direction.

nicklockwood commented 5 years ago

Sorry for the radio silence. I've not had a chance to look at this yet, but I will definitely make sure Layout is ready for iOS 13 before release.

nicklockwood commented 5 years ago

Fixed in 0.6.38

sebleclerc commented 5 years ago

I had the same problem in my app using iOS13. Everything is fine now, thanks !