Originally created by @llKoull on GitHub (Apr 13, 2019).
Hi!
I've been using this amazing library since 2 years ago but I'm experiencing many crashes in a class named DefaultLogger since March.
I don't really know where the problem is, but fabric says that the line 126 of DefaultLogger.swift crashes. I can't even reproduce the error in any of my devices, but the users are complaining about it and Fabric tells that there are many crashes of the same kind.
I attach one of the crash logs that fabrics generates. Can you help me?
Originally created by @llKoull on GitHub (Apr 13, 2019).
Hi!
I've been using this amazing library since 2 years ago but I'm experiencing many crashes in a class named DefaultLogger since March.
I don't really know where the problem is, but fabric says that the line 126 of DefaultLogger.swift crashes. I can't even reproduce the error in any of my devices, but the users are complaining about it and Fabric tells that there are many crashes of the same kind.
I attach one of the crash logs that fabrics generates. Can you help me?
Thanks and best regards!
[com.arcadiaseed.nootric_issue_crash_0d57e54adbfd4283817e1f88fa5ed81e_DNE_0_v2.txt](https://github.com/JohnEstropia/CoreStore/files/3075861/com.arcadiaseed.nootric_issue_crash_0d57e54adbfd4283817e1f88fa5ed81e_DNE_0_v2.txt)
adam
added the question label 2025-12-29 15:27:53 +01:00
The logger will get called if there are any errors or any assertion failures, so it will be the last line in your stack trace. You will need to look at the stack trace right before the logger calls as that is where the real issue will be.
@JohnEstropia commented on GitHub (Apr 14, 2019):
The logger will get called if there are any errors or any assertion failures, so it will be the last line in your stack trace. You will need to look at the stack trace right before the logger calls as that is where the real issue will be.
Thanks for your answer, I was inspecting the stack trace and I found that the crash is generated in a method that persists the information of the user called in the "applicationWillResignActive" method of the AppDelegate.
Do you know if there is any problem if I call this method just before the app resign active?
CoreStore.perform(
asynchronous: { (transaction) -> Void in
do {
if let user = try transaction.fetchOne(From()) {
... // SAVE INFORMATION
}catch{
print("Error: User couldn't be stored...")
}
}, completion: { _ in })
Maybe there's some internal timeout or maybe it should be called on the main thread.
Thanks and best regards!
@llKoull commented on GitHub (Apr 15, 2019):
Hi @JohnEstropia ,
Thanks for your answer, I was inspecting the stack trace and I found that the crash is generated in a method that persists the information of the user called in the "applicationWillResignActive" method of the AppDelegate.
Do you know if there is any problem if I call this method just before the app resign active?
> CoreStore.perform(
> asynchronous: { (transaction) -> Void in
> do {
> if let user = try transaction.fetchOne(From<User>()) {
> ... // SAVE INFORMATION
> }catch{
> print("Error: User couldn't be stored...")
> }
> }, completion: { _ in })
Maybe there's some internal timeout or maybe it should be called on the main thread.
Thanks and best regards!
The most common issue around this is that your transaction.fetchOne is getting called before your DataStack.addStorage(...) processing completes.
@JohnEstropia commented on GitHub (Apr 15, 2019):
The most common issue around this is that your `transaction.fetchOne` is getting called before your `DataStack.addStorage(...)` processing completes.
Thanks for your (really) fast answer @JohnEstropia !
I checked it but I Initialize Core Store in the "application: didFinishLaunchingWithOptions" and the I use it during all the session. Just before the app resigns active I persist the information. I don't know what's happening 😆
Best regards!
@llKoull commented on GitHub (Apr 15, 2019):
Thanks for your (really) fast answer @JohnEstropia !
I checked it but I Initialize Core Store in the "application: didFinishLaunchingWithOptions" and the I use it during all the session. Just before the app resigns active I persist the information. I don't know what's happening 😆
Best regards!
Can you show how you are initializing your DataStack? From your stack trace it looks like it's crashing during loading of xcdatamodeld file
@JohnEstropia commented on GitHub (Apr 15, 2019):
Can you show how you are initializing your `DataStack`? From your stack trace it looks like it's crashing during loading of xcdatamodeld file
@JohnEstropia commented on GitHub (Apr 16, 2019):
Try to set the `CoreStore.defaultStack` to your `DataStack` as early as you can.
```swift
CoreStore.defaultStack = DataStack(/* ... */)
_ = dataStack.addStorage(
// ...
)
```
Ok @JohnEstropia I did the cande and I'm uploading a new version to the Store.
I hope it works! hehehe
I'll tell you something as soon as I see the Crashlytitcs stats ;)
Thanks and best regards!
@llKoull commented on GitHub (Apr 16, 2019):
Ok @JohnEstropia I did the cande and I'm uploading a new version to the Store.
I hope it works! hehehe
I'll tell you something as soon as I see the Crashlytitcs stats ;)
Thanks and best regards!
I released a new version of the app with the change that you proposed me but the issue is still there 😟 I don't know why but 2 of the most common issues of my app are related to CoreStore.
Maybe I am doing something wrong but I don't know where is the problem and I can't reproduce the error on my devices.
Thanks and best regards!
@llKoull commented on GitHub (Apr 22, 2019):
Hi @JohnEstropia !
I released a new version of the app with the change that you proposed me but the issue is still there 😟 I don't know why but 2 of the most common issues of my app are related to CoreStore.
Maybe I am doing something wrong but I don't know where is the problem and I can't reproduce the error on my devices.
Thanks and best regards!
<img width="1015" alt="Captura de pantalla 2019-04-22 a las 9 05 02" src="https://user-images.githubusercontent.com/5525265/56488235-1b986400-64de-11e9-944d-5d1f9addc6bc.png">
It's been a long time since my last message and i've been investigating those issues that i'm still experiencing.
One weird thing that i saw is that if i look the full session information of the crash in fabric, theres a crash_info_entry_1 with the path of the CoreStore sources in my local computer. Is it normal? I've never saw this before.
I'm using CoreStore 6.3.1 right now and those crashes are the most repeated in my app :S
Thanks and best regards!
@llKoull commented on GitHub (Jul 18, 2019):
Hello @JohnEstropia !
It's been a long time since my last message and i've been investigating those issues that i'm still experiencing.
One weird thing that i saw is that if i look the full session information of the crash in fabric, theres a crash_info_entry_1 with the path of the CoreStore sources in my local computer. Is it normal? I've never saw this before.

I'm using CoreStore 6.3.1 right now and those crashes are the most repeated in my app :S
Thanks and best regards!
This issue is my biggest problem right now. Look the statistics just for the last version:
Anyone has any ideas?
Thanks and best regards!
@llKoull commented on GitHub (Aug 3, 2019):
Hello again!
This issue is my biggest problem right now. Look the statistics just for the last version:
<img width="1041" alt="Captura de pantalla 2019-08-03 a las 11 29 31" src="https://user-images.githubusercontent.com/5525265/62410147-2df86280-b5e2-11e9-9bd9-c434460ebd84.png">
Anyone has any ideas?
Thanks and best regards!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @llKoull on GitHub (Apr 13, 2019).
Hi!
I've been using this amazing library since 2 years ago but I'm experiencing many crashes in a class named DefaultLogger since March.
I don't really know where the problem is, but fabric says that the line 126 of DefaultLogger.swift crashes. I can't even reproduce the error in any of my devices, but the users are complaining about it and Fabric tells that there are many crashes of the same kind.
I attach one of the crash logs that fabrics generates. Can you help me?
Thanks and best regards!
com.arcadiaseed.nootric_issue_crash_0d57e54adbfd4283817e1f88fa5ed81e_DNE_0_v2.txt
@JohnEstropia commented on GitHub (Apr 14, 2019):
The logger will get called if there are any errors or any assertion failures, so it will be the last line in your stack trace. You will need to look at the stack trace right before the logger calls as that is where the real issue will be.
@llKoull commented on GitHub (Apr 15, 2019):
Hi @JohnEstropia ,
Thanks for your answer, I was inspecting the stack trace and I found that the crash is generated in a method that persists the information of the user called in the "applicationWillResignActive" method of the AppDelegate.
Do you know if there is any problem if I call this method just before the app resign active?
Maybe there's some internal timeout or maybe it should be called on the main thread.
Thanks and best regards!
@JohnEstropia commented on GitHub (Apr 15, 2019):
The most common issue around this is that your
transaction.fetchOneis getting called before yourDataStack.addStorage(...)processing completes.@llKoull commented on GitHub (Apr 15, 2019):
Thanks for your (really) fast answer @JohnEstropia !
I checked it but I Initialize Core Store in the "application: didFinishLaunchingWithOptions" and the I use it during all the session. Just before the app resigns active I persist the information. I don't know what's happening 😆
Best regards!
@JohnEstropia commented on GitHub (Apr 15, 2019):
Can you show how you are initializing your
DataStack? From your stack trace it looks like it's crashing during loading of xcdatamodeld file@llKoull commented on GitHub (Apr 15, 2019):
Hey @JohnEstropia !
Yeah, sure 😉
Thanks and best regards!
@JohnEstropia commented on GitHub (Apr 16, 2019):
Try to set the
CoreStore.defaultStackto yourDataStackas early as you can.@llKoull commented on GitHub (Apr 16, 2019):
Ok @JohnEstropia I did the cande and I'm uploading a new version to the Store.
I hope it works! hehehe
I'll tell you something as soon as I see the Crashlytitcs stats ;)
Thanks and best regards!
@llKoull commented on GitHub (Apr 22, 2019):
Hi @JohnEstropia !
I released a new version of the app with the change that you proposed me but the issue is still there 😟 I don't know why but 2 of the most common issues of my app are related to CoreStore.
Maybe I am doing something wrong but I don't know where is the problem and I can't reproduce the error on my devices.
Thanks and best regards!
@llKoull commented on GitHub (Jul 18, 2019):
Hello @JohnEstropia !
It's been a long time since my last message and i've been investigating those issues that i'm still experiencing.
One weird thing that i saw is that if i look the full session information of the crash in fabric, theres a crash_info_entry_1 with the path of the CoreStore sources in my local computer. Is it normal? I've never saw this before.
I'm using CoreStore 6.3.1 right now and those crashes are the most repeated in my app :S
Thanks and best regards!
@llKoull commented on GitHub (Aug 3, 2019):
Hello again!
This issue is my biggest problem right now. Look the statistics just for the last version:
Anyone has any ideas?
Thanks and best regards!