AHSAppDevTeam / Arcadia-High-Mobile-iOS

Official Github Repository for the iOS AHS Mobile App
MIT License
3 stars 1 forks source link

Singleton category dictionary causing illegal memory access in searchPage #6

Closed richardwei6 closed 3 years ago

richardwei6 commented 3 years ago

https://github.com/AHSAppDevTeam/Arcadia-High-Mobile-iOS/blob/master/AHS/AHS/UI/homePage/contentViewControllers/searchPage/searchPage.swift#L74

Seems like the usage of multiple DispatchQueues that are not the main thread is causing an issue listed here: https://stackoverflow.com/questions/26515968/swift-access-to-dictionary-of-a-singleton-causes-exc-bad-access/28910283

Possible fix: https://www.raywenderlich.com/5370-grand-central-dispatch-tutorial-for-swift-4-part-1-2

richardwei6 commented 3 years ago

https://sachithrasiriwardhane.medium.com/thread-safe-singletons-and-their-usage-in-swift-c992d34d85dd

richardwei6 commented 3 years ago

Still have some UI performance issues, however.