Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing at SwiftMessages.Config() or SwiftMessags.defaultConfig version 7.0.1 #423

Closed
Nathan2017 opened this issue Oct 12, 2020 · 19 comments

Comments

@Nathan2017
Copy link

Screen Shot 2020-10-13 at 12 50 57 AM

version 5.0.1 working fine but when upgrading to 7.0.1 instantiate SwiftMessages.Config() or SwiftMessages.defaultConfig caused retain cycle. Hope someone can help me thank you.

@wtmoose
Copy link
Member

wtmoose commented Oct 12, 2020

Sounds like you need to clean your derived data. Also, why aren't you upgrading to version 8?

@Nathan2017
Copy link
Author

Sounds like you need to clean your derived data. Also, why aren't you upgrading to version 8?

Already clean the derived data and also upgrading to version 8 , still getting the retain cycle crash

@wtmoose
Copy link
Member

wtmoose commented Oct 12, 2020

Nobody else is having this issue, so I need more to go on. What do you mean by "retain cycle crash"?

@Nathan2017
Copy link
Author

Screen Shot 2020-10-13 at 1 52 12 AM
Screen Shot 2020-10-13 at 1 51 57 AM
Setting up the config seem to fix the problem but now there is an error on windowviewcontroller

@Nathan2017
Copy link
Author

Screen Shot 2020-10-13 at 2 01 58 AM
Its kind of weird that if i comment out the setup just instantiate the SwiftMessages.Config() i will get swift_retain error

@wtmoose
Copy link
Member

wtmoose commented Oct 12, 2020

I've never seen swift_retain and I don't see much online. Are you compiling with some non-default config? Did you check if you get this in the Demo app? If you can help me reproduce the problem, I can take a look. A sample project would be super helpful.

@Drusy
Copy link

Drusy commented Oct 21, 2020

I've got this issue switch from 7.0 to work/xcode12 for SPM migration. Clean build helped.

@wtmoose
Copy link
Member

wtmoose commented Oct 25, 2020

Try 8.0.3

@wtmoose
Copy link
Member

wtmoose commented Dec 16, 2020

Closing. No reply since my last suggestion.

@wtmoose wtmoose closed this as completed Dec 16, 2020
@RaghavaNaidu46
Copy link

RaghavaNaidu46 commented May 30, 2021

Screen Shot 2021-05-30 at 8 02 12 PM

I've gone through the thread, but no solution was found. I'm using the latest version(9.0.2). Also cleared derived data and did project clean.

FYI: Your demo project with the same line work perfectly.

kindly help me with the same.

You can contact me at "raghava.dokala@gmail.com" for further discussion. I'm ready to help you to find the root cause.

@wtmoose
Copy link
Member

wtmoose commented May 30, 2021

@RaghavaNaidu46 this is going to be an issue with your project configuration, not SwiftMessages itself. Now are you installing SwiftMessages, e.g. CocoaPods, Carthage, Swift Package Manager?

@RaghavaNaidu46
Copy link

RaghavaNaidu46 commented May 31, 2021

Screen Shot 2021-05-31 at 8 23 01 AM

Oh okay. Actually, I'm using SwiftMessages(CocoaPods) for three years, but recently I did a pod update. There the issue occurred. And I agree, my project configuration may be an issue for your new changes. If incase please help to get rid out of it.

@RaghavaNaidu46
Copy link

@wtmoose Any update for me...

@jhfkf
Copy link

jhfkf commented Jun 7, 2021

emmm...
change
public struct Config
to
public class Config
everthing will be ok

@jhfkf
Copy link

jhfkf commented Jun 7, 2021

so weird! crashing will appear in one project...

@wtmoose
Copy link
Member

wtmoose commented Jun 7, 2021

@RaghavaNaidu46 I suggest looking through the list of EXC_BAD_ACCESS issues that have been filed:

https://github.com/SwiftKickMobile/SwiftMessages/issues?q=is%3Aissue+exc_bad_access

I believe the most common problem is wrong Swift version. If none of this helps, I really have no idea how to help without reproduction steps or a sample project. This might be a good one to post on StackOverflow.

@RaghavaNaidu46
Copy link

As I told above, it works perfectly within a new project. Will try again to reproduce the issue and share the POC here.

@RaghavaNaidu46
Copy link

@RaghavaNaidu46 I suggest looking through the list of EXC_BAD_ACCESS issues that have been filed:

https://github.com/SwiftKickMobile/SwiftMessages/issues?q=is%3Aissue+exc_bad_access

I believe the most common problem is wrong Swift version. If none of this helps, I really have no idea how to help without reproduction steps or a sample project. This might be a good one to post on StackOverflow.

@wtmoose Yes, it's because of an unspecified swift version. Thanks, brother.

@wtmoose
Copy link
Member

wtmoose commented Jun 16, 2021

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants