3.0.2 migration crash #124

Closed
opened 2025-12-29 15:24:58 +01:00 by adam · 13 comments
Owner

Originally created by @laeroah on GitHub (Feb 8, 2017).

Some weird crash happening with version 3.0.2. The same code works fine in 3.0.1
With 3.0.2, the app starts to crash at this line:
_dataStack = DataStack(modelName: "AppFriendsCore", bundle: bundle, migrationChain: nil)
I also tried to explicitly specify the migration chain here, but it still crashes.
The same code works fine in 3.0.0 and 3.0.1

screen shot 2017-02-08 at 2 28 26 am
Originally created by @laeroah on GitHub (Feb 8, 2017). Some weird crash happening with version 3.0.2. The same code works fine in 3.0.1 With 3.0.2, the app starts to crash at this line: `_dataStack = DataStack(modelName: "AppFriendsCore", bundle: bundle, migrationChain: nil)` I also tried to explicitly specify the migration chain here, but it still crashes. The same code works fine in 3.0.0 and 3.0.1 <img width="927" alt="screen shot 2017-02-08 at 2 28 26 am" src="https://cloud.githubusercontent.com/assets/1928509/22727515/456c6c3c-eda7-11e6-8788-cdbcdc10d62c.png">
adam added the fixedregression labels 2025-12-29 15:24:58 +01:00
adam closed this issue 2025-12-29 15:24:58 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Feb 8, 2017):

@laeroah Can you add an Exception breakpoint and print the message argument when it crashes?

@JohnEstropia commented on GitHub (Feb 8, 2017): @laeroah Can you add an Exception breakpoint and print the `message` argument when it crashes?
Author
Owner

@laeroah commented on GitHub (Feb 8, 2017):

@JohnEstropia the message is
"Invalid migration chain passed to the DataStack. Check that the model versions' order is correct and that no repetitions or ambiguities exist."

@laeroah commented on GitHub (Feb 8, 2017): @JohnEstropia the message is "Invalid migration chain passed to the DataStack. Check that the model versions' order is correct and that no repetitions or ambiguities exist."
Author
Owner

@JohnEstropia commented on GitHub (Feb 8, 2017):

Hmm there isn't any change with migrations between 3.0.1 and 3.0.2.
I can't reproduce it on my side either.
Can you try quitting Xcode then deleting the derived data?

@JohnEstropia commented on GitHub (Feb 8, 2017): Hmm there isn't any change with migrations between 3.0.1 and 3.0.2. I can't reproduce it on my side either. Can you try quitting Xcode then deleting the derived data?
Author
Owner

@laeroah commented on GitHub (Feb 8, 2017):

@JohnEstropia ok, will give it a try. thanks

@laeroah commented on GitHub (Feb 8, 2017): @JohnEstropia ok, will give it a try. thanks
Author
Owner

@laeroah commented on GitHub (Feb 8, 2017):

I tried cleaning and restarting Xcode, but still crashes. The same crash happens in two of my apps after they update Corestore to 3.0.2. I don't think it's crashing due to the migration anymore, it's more like a memory issue.
screen shot 2017-02-08 at 4 41 31 pm
screen shot 2017-02-08 at 4 42 07 pm
screen shot 2017-02-08 at 4 42 23 pm

@laeroah commented on GitHub (Feb 8, 2017): I tried cleaning and restarting Xcode, but still crashes. The same crash happens in two of my apps after they update Corestore to 3.0.2. I don't think it's crashing due to the migration anymore, it's more like a memory issue. <img width="963" alt="screen shot 2017-02-08 at 4 41 31 pm" src="https://cloud.githubusercontent.com/assets/1928509/22758907/8ad6aee6-ee1e-11e6-9134-02475353a46b.png"> <img width="949" alt="screen shot 2017-02-08 at 4 42 07 pm" src="https://cloud.githubusercontent.com/assets/1928509/22758910/8e1b675e-ee1e-11e6-97c1-93a69750a7b8.png"> <img width="304" alt="screen shot 2017-02-08 at 4 42 23 pm" src="https://cloud.githubusercontent.com/assets/1928509/22758913/9191e35e-ee1e-11e6-9e3a-247bb82b54fb.png">
Author
Owner

@JohnEstropia commented on GitHub (Feb 9, 2017):

@laeroah Okay thanks. I'll rollback the update today, sorry about that. In the mean time please use the 3.0.1 release.

@JohnEstropia commented on GitHub (Feb 9, 2017): @laeroah Okay thanks. I'll rollback the update today, sorry about that. In the mean time please use the 3.0.1 release.
Author
Owner

@JohnEstropia commented on GitHub (Feb 9, 2017):

@laeroah Can you share these info?

  • Device/simulator iOS version
  • Xcode version (Swift version)
  • Installation method (Cocoapods / Carthage)
@JohnEstropia commented on GitHub (Feb 9, 2017): @laeroah Can you share these info? - Device/simulator iOS version - Xcode version (Swift version) - Installation method (Cocoapods / Carthage)
Author
Owner

@laeroah commented on GitHub (Feb 9, 2017):

I am using cocoapod
Device: iPhone7, 10.2.1
Simulator: iPhone7, 10.2
Xcode: 8:2.1
Swift: 3.0.1

@laeroah commented on GitHub (Feb 9, 2017): I am using cocoapod Device: iPhone7, 10.2.1 Simulator: iPhone7, 10.2 Xcode: 8:2.1 Swift: 3.0.1
Author
Owner

@JohnEstropia commented on GitHub (Feb 9, 2017):

thanks!

@JohnEstropia commented on GitHub (Feb 9, 2017): thanks!
Author
Owner

@laeroah commented on GitHub (Feb 9, 2017):

@JohnEstropia thank you!

@laeroah commented on GitHub (Feb 9, 2017): @JohnEstropia thank you!
Author
Owner

@laeroah commented on GitHub (Feb 13, 2017):

@JohnEstropia sry, just want to check on this. Is it fixed on 3.0.2?

@laeroah commented on GitHub (Feb 13, 2017): @JohnEstropia sry, just want to check on this. Is it fixed on 3.0.2?
Author
Owner

@JohnEstropia commented on GitHub (Feb 13, 2017):

I reverted the 3.0.2 changes and released it as 3.0.3 so please update to the latest version. So far I haven't reproduced the problem on my dev environment yet so I'll probably defer that update until I successfully find the cause.

@JohnEstropia commented on GitHub (Feb 13, 2017): I reverted the 3.0.2 changes and released it as 3.0.3 so please update to the latest version. So far I haven't reproduced the problem on my dev environment yet so I'll probably defer that update until I successfully find the cause.
Author
Owner

@laeroah commented on GitHub (Feb 14, 2017):

Thank you! 3.0.3 works for me.

@laeroah commented on GitHub (Feb 14, 2017): Thank you! 3.0.3 works for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#124