Application got crashed at JTACMonthLayout due to nil value
(Required) Version Number: 8.0.3
Description
trictBoundaryRulesShouldApply = thereAreHeaders || delegate._cachedConfiguration.hasStrictBoundaries line 168 Thread 1: Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value
Steps To Reproduce
Expected Behavior
Additional Context
can you produce a sample app with the issue please?
I tried using pods and package dependancies, still getting crash here
can you produce a sample app with the issue please?
I am having a similar Issue with a crash in JTACMonthLayout.swift+168. The problem is only present on iOS 17 and the app always crashes in the first few seconds of execution suggesting an issue while loading the view, where the cachedConfiguration has not been set, but the view is already being laid out.
So far I have not been able to reproduce the crash nor produce a sample app with the issue, but it affects roughly 25% of my app's users on iOS 17, so this is not just a rare edge case.
Maybe this additional context as to when the crash occurs can help you diagnose the issue. I will continue to look for ways to fix this and keep you posted on any progress.
Ok, it help a bit, but do you have any crash logs at all? Or is it crashing in the same location as the image above? Also can you confirm what version you are using?
8.0.5 has a fix for that very crash
We have been using 8.0.5 for a while now, the issue only came up with iOS 17. You can find a crash log here. Yes, as mentioned above it crashes in JTACMonthLayout.swift on Line 168.
im just updating to the latest xcode today. give some time to investigate
@timfraedrich possible. In your app, is it possible that your start date is greater than your end date?
@Swathiga-proj
you were able to see the crash in development mode, can you please provide a sample app? I just updated to latest iOS my mine is running fine
@NIRANJANPRASAD if you are able to provide a smple app this will help
@timfraedrich
i still need some sort of sample code. I need to know how you are setting up the delegate, setting up the configs etc. I cant tell anything more seeing some code/sample app.
These things are important:
- are you setting things up in code?
- are you using storyboard?
- is it a mixture of both? and if so, how is the delegate setup?
etc etc
If you make a bare minimum sample app that closely resembles your real app i can know. forget about designing it, just a base app will do. If you are unable to do this, then we'll have to spend time here with many questions (since i am unable to reproduce it)
Since its happening for some of your users (on ios 17) and not all on ios 17, then I am interested to see what setup you have.
@timfraedrich Ok i had some time to debug your issue.
You are experiencing this crash because you data source is not set by the time by the time the following code is run:
strictBoundaryRulesShouldApply = thereAreHeaders || delegate._cachedConfiguration.hasStrictBoundaries
Your data source should have been set before that code is hit. Can you tell me how/where you are setting your dataSource?
But regardless, you code should not crash, therefore I have updated the code base to make the code safer.
fix done here 6b1f96b
Also, adding to the confusion,
The errors mentioned here on this issue are 2 separate errors. @Swathiga-proj you issue is due to you not correctly setting up the delegates and data source. while @timfraedrich Your issue should be resolved in the latest fix to master branch