Open HalitGumus opened 1 year ago
the latest version is 8.0.5 maybe that might be reason why?
I will update the New issue version to 8.0.5 so this confusion wont happen again
When I check again, I was already using version 8.0.5. There is a bug in this version
we have checked again I am on version 8.0.5. still issue is there
I am also facing same issue with version 8.0.5 version of library installed. And apple is not going to accept my build for further release until the issue is fixed. Please comment any solution if you have
This crash seems to occur when the start and end dates are the same.
func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters {
guard let startDate = self.startDate, let endDate = self.endDate else {
return ConfigurationParameters(startDate: Date(), endDate: Date(), numberOfRows: 5, generateOutDates: .tillEndOfRow, firstDayOfWeek: .monday)
}
return ConfigurationParameters(startDate: startDate, endDate: endDate, numberOfRows: 5, generateOutDates: .tillEndOfRow, firstDayOfWeek: .monday)
}
endDate: Date()
When I changed this code as follows, the problem was solved for me.
endDate: Date().addingTimeInterval(1)
@HalitGumus thank you!! If this is the issue, then the fix is extremely simple.
I'll respond back here in a bit
@HalitGumus i made a code change to master branch. If you are using Swift Package manager, set it to use master branch instead of 8.0.5 and let me know if the issue persists.
Thank you @HalitGumus @patchthecode for quick responses. The solution worked for me.
@patchthecode I am using pod, and when I updated it with the relevant commit as below, the same crash occurred. I'll try again when the version(8.0.6) comes out.
pod 'JTAppleCalendar', :git => 'https://github.com/patchthecode/JTAppleCalendar', :commit => 'abf4cfccc62ef75a070d0dded0fd823d5a86f72a'
@HalitGumus it seems like youre getting crashes consistently which is good.
Any chance you can prove a dry basic app with the crash (remove all company code) The only code that's necessary is the setting up of the calendar etc. You dont even have to design the cells, just create a clean app with the setup.
The reason why I'm asking is because there are many parts it can fail. example
Many failure points. That last commit should have stopped the crash. I also added an Assert in there as a safety. The assert crashes in development mode and gives you a message on whats wrong. But if its still crashing, then I will need some sort of code to recreate this. Everything is working fine on my sample app attached to this github repository.
Also i'm available all day today on discord chat app. So let me me know if you can link up.
Hi, First of all, I am using the latest version of JTAppleCalendar (8.0.2).It was crashing in the previous (8.0.1) version
Description
Only iOS 17 users experience the error in the screenshot below. It doesn't always crash, it crashes every 2-3 attempts.
Firebase Crashlytics
Crashed: com.apple.main-thread 0 JTAppleCalendar 0x26ba8 $s15JTAppleCalendar15JTACMonthLayoutC21setupDataFromDelegateyyF + 1020 1 JTAppleCalendar 0x265fc $s15JTAppleCalendar15JTACMonthLayoutC7prepareyyF + 396 2 JTAppleCalendar 0x2679c $s15JTAppleCalendar15JTACMonthLayoutC7prepareyyFTo + 28 3 UIKitCore 0x1309d4 -[UICollectionViewData _prepareToLoadData] + 100 4 UIKitCore 0x12db5c -[UICollectionViewData validateLayoutInRect:] + 100 5 UIKitCore 0x7a84c -[UICollectionView layoutSubviews] + 220 6 JTAppleCalendar 0x22584 $s15JTAppleCalendar13JTACMonthViewC14layoutSubviewsyyF + 48 7 JTAppleCalendar 0x22698 $s15JTAppleCalendar13JTACMonthViewC14layoutSubviewsyyFTo + 28 8 UIKitCore 0x331d8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528 9 QuartzCore 0x67888 CA::Layer::layout_if_needed(CA::Transaction) + 500 10 QuartzCore 0x67410 CA::Layer::layout_and_display_if_needed(CA::Transaction) + 144 11 QuartzCore 0x6d94c CA::Context::commit_transaction(CA::Transaction, double, double) + 464 12 QuartzCore 0x66c3c CA::Transaction::commit() + 648 13 QuartzCore 0x668e4 CA::Transaction::flush_as_runloop_observer(bool) + 88 14 CoreFoundation 0x361dc CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 36 15 CoreFoundation 0x34be4 CFRunLoopDoObservers + 548 16 CoreFoundation 0x34300 CFRunLoopRun + 1028 17 CoreFoundation 0x33e18 CFRunLoopRunSpecific + 608 18 GraphicsServices 0x35ec GSEventRunModal + 164 19 UIKitCore 0x22f350 -[UIApplication _run] + 888 20 UIKitCore 0x22e98c UIApplicationMain + 340 21 Appname 0x7118 main + 21 (AppDelegate.swift:21) 22 ??? 0x1d03e3d44 (Missing)