Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash for tableView.delegate = self #532

Open
vhuichen opened this issue Dec 24, 2024 · 2 comments
Open

crash for tableView.delegate = self #532

vhuichen opened this issue Dec 24, 2024 · 2 comments

Comments

@vhuichen
Copy link

vhuichen commented Dec 24, 2024

Trapped fatal signal 'SIGABRT(6)'
(
"0 ??? 0x0000000190a85000 000000000000000000 + 0",
"1 libsystem_c.dylib 0x000000011a975d25 abort + 134",
"2 libsystem_malloc.dylib 0x000000011a9e1da7 malloc_vreport + 926",
"3 libsystem_malloc.dylib 0x000000011a9e2149 malloc_zone_error + 190",
"4 UIKitCore 0x00000001532814ec -[UIResponder dealloc] + 145",
"5 UIKitCore 0x0000000153969ad8 -[UIView dealloc] + 1303",
"6 UIKitCore 0x00000001538ed1a8 -[UIScrollView dealloc] + 900",
"7 UIKitCore 0x000000015353c8ae -[UITableView dealloc] + 437",
"8 libobjc.A.dylib 0x000000010de5cbc8 _ZN11objc_object17sidetable_releaseEbb + 204",
"9 libobjc.A.dylib 0x000000010de5e3ff _ZN19AutoreleasePoolPage12releaseUntilEPP11objc_object + 201",
"10 libobjc.A.dylib 0x000000010de5e2dd objc_autoreleasePoolPop + 208",
"11 CoreFoundation 0x00000001169bd223 _CFAutoreleasePoolPop + 22",
"12 CoreFoundation 0x00000001169059cd __CFRunLoopPerCalloutARPEnd + 39",
"13 CoreFoundation 0x0000000116900da9 __CFRunLoopRun + 2549",
"14 CoreFoundation 0x00000001168fffb3 CFRunLoopRunSpecific + 536",
"15 GraphicsServices 0x000000012a32c0cb GSEventRunModal + 137",
"16 UIKitCore 0x000000015324ac3b -[UIApplication _run] + 875",
"17 UIKitCore 0x000000015324fb7c UIApplicationMain + 123",
"18 UIKitCore 0x00000001521de263 block_destroy_helper.22 + 9747",
"19 TX-Swift.debug.dylib 0x00000001107ab8eb $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 123",
"20 TX-Swift.debug.dylib 0x00000001107ab867 $s8TX_Swift11AppDelegateC5$mainyyFZ + 39",
"21 TX-Swift.debug.dylib 0x00000001107af758 __debug_main_executable_dylib_entry_point + 24",
"22 ??? 0x000000010cb02478 0x000000010cb01000 + 0",
"23 ??? 0x0000000204453366 000000000000000000 + 0"
)

normal code
`
lazy var tableView1: UITableView = {

    let tableView = UITableView()    

    tableView.register(AAMyOrderCell.self, forCellReuseIdentifier: cellID)

    tableView.dataSource = self

    //tableView.delegate = self

    return tableView

}()
`

crash code
`
lazy var tableView1: UITableView = {

    let tableView = UITableView()

    tableView.register(AAMyOrderCell.self, forCellReuseIdentifier: cellID)

    tableView.dataSource = self

    tableView.delegate = self  // only different code

    return tableView

}()
`

Xcode 16.1
Mac 14.5

@vhuichen
Copy link
Author

the crash happen when i dismiss the ViewController

@johnno1962
Copy link
Owner

Sounds like the object creating the TableView is being deallocated. There isn't much I can do to track this down this end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants