oleksii-demedetskyi / Parus

Parus is simple chain style auto-layout helper for objective-c.
MIT License
106 stars 4 forks source link

Broken backtrace with incorrect VFL #22

Closed oleksii-demedetskyi closed 10 years ago

oleksii-demedetskyi commented 11 years ago

When incorrect VFL parsed. Like [self addConstraints:PVVFL(@"|[tableView|").withViews(views).asArray]; then broken backtrace disallow user to debug.

Broken backtrace

oleksii-demedetskyi commented 11 years ago

Defult constraint also behave like this. What we can do with this?

Forsarion commented 11 years ago

Here is the console output that I receive (VFL):

2013-08-15 14:33:44.055 temp[5862:a0b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse constraint format: Expected a ']' here. That is how you give the end of a view. |[view1| ^' * First throw call stack: ( 0 CoreFoundation 0x017476f4 exceptionPreprocess + 180 1 libobjc.A.dylib 0x014c78b6 objc_exception_throw + 44 2 Foundation 0x01285c6b -[NSLayoutConstraintParser failWithDescription:] + 256 3 Foundation 0x011319fa -[NSLayoutConstraintParser parseView] + 652 4 Foundation 0x01130c04 -[NSLayoutConstraintParser parse] + 333 5 Foundation 0x0113081c +[NSLayoutConstraintParser constraintsWithVisualFormat:options:metrics:views:] + 105 6 Foundation 0x011307ae +[NSLayoutConstraint constraintsWithVisualFormat:options:metrics:views:] + 64 7 temp 0x0000cdc8 -[PVVFLContext buildConstraints] + 248 8 temp 0x0000c910 -[PVVFLLayout(ArrayConstrainable) asArray] + 352 9 temp 0x00008c64 -[ViewController viewDidLoad] + 468 10 UIKit 0x00351c18 -[UIViewController loadViewIfRequired] + 696 11 UIKit 0x00351eb4 -[UIViewController view] + 35 12 UIKit 0x0027b6fd -[UIWindow addRootViewControllerViewIfPossible] + 66 13 UIKit 0x0027ba97 -[UIWindow _setHidden:forced:] + 312 14 UIKit 0x0027bd2d -[UIWindow _orderFrontWithoutMakingKey] + 49 15 UIKit 0x0e246c66 -[UIWindowAccessibility(SafeCategory) _orderFrontWithoutMakingKey] + 77 16 UIKit 0x00286562 -[UIWindow makeKeyAndVisible] + 65 17 UIKit 0x00239ea0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851 18 UIKit 0x0023e578 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824 19 UIKit 0x0025257c -[UIApplication handleEvent:withNewEvent:] + 3447 20 UIKit 0x00252ae9 -[UIApplication sendEvent:] + 85 21 UIKit 0x002401f5 _UIApplicationHandleEvent + 736 22 GraphicsServices 0x0366633b _PurpleEventCallback + 776 23 GraphicsServices 0x03665e46 PurpleEventCallback + 46 24 CoreFoundation 0x016c2e95 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 53 25 CoreFoundation 0x016c2bcb CFRunLoopDoSource1 + 523 26 CoreFoundation 0x016ed8ac CFRunLoopRun + 2156 27 CoreFoundation 0x016ecbf3 CFRunLoopRunSpecific + 467 28 CoreFoundation 0x016eca0b CFRunLoopRunInMode + 123 29 UIKit 0x0023dcad -[UIApplication _run] + 840 30 UIKit 0x0023ff0b UIApplicationMain + 1225 31 temp 0x000090ad main + 141 32 libdyld.dylib 0x01d83725 start + 0 ) libc++abi.dylib: terminating with uncaught exception of type NSException

As I see this output points user to the problem.

oleksii-demedetskyi commented 10 years ago

I close this as obsolete.