xmartlabs / XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.
MIT License
5.77k stars 953 forks source link

Application Crash when calling addFormSection() #890

Open markGilchristBookingBug opened 8 years ago

markGilchristBookingBug commented 8 years ago

I am getting a crash when calling addFormSection(aSection)

here is the stacktrace

0   CoreFoundation                      0x000000010cc8b34b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x000000010c6ec21e objc_exception_throw + 48
2   CoreFoundation                      0x000000010ccfaf34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3   CoreFoundation                      0x000000010cc10c15 ___forwarding___ + 1013
4   CoreFoundation                      0x000000010cc10798 _CF_forwarding_prep_0 + 120
5   XLForm                              0x000000010c12185e -[XLFormDescriptor insertObject:inAllSectionsAtIndex:] + 142
6   XLForm                              0x000000010c11d08a -[XLFormDescriptor addFormSection:] + 138
7   Perfect10                           0x0000000109233b31 _TFC9Perfect1023QuestionsViewController4formfTGVs10DictionarySiSS_6headerGSqSS__CSo16XLFormDescriptor + 417

here is my podfile code

     ..
      pod 'XLForm',     '~> 3.2'
    ...

here is my swift code

   let form = XLFormDescriptor()

    let importSection = XLFormSectionDescriptor()
    importSection.addFormRow(
        XLFormRowDescriptor(tag: "import", rowType: XLFormRowDescriptorTypeButton, title: "test")
    )
    form.addFormSection(importSection)

I am using XlForm in 5 other apps and this doesn't happen, any ideas what I may have done wrong?

mats-claassen commented 8 years ago

That is strange. Your code works for me. The issue must be elsewhere. Are you sure it comes from that line?

markGilchristBookingBug commented 8 years ago

@mats-claassen yes I am sure it is that line, what makes it even stranger is that this doesn't happen for 4 other projects using xlform! I am lost as to why this could happen