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

Random crash when show message. #112

Closed
ufosky opened this issue Aug 10, 2017 · 6 comments
Closed

Random crash when show message. #112

ufosky opened this issue Aug 10, 2017 · 6 comments

Comments

@ufosky
Copy link

ufosky commented Aug 10, 2017

After I upgrade this library from 3.3.4 to 3.4.0, my app received some crash report like this:

Crashed: com.apple.main-thread
0  SwiftMessages                  0x101080480 IconStyle.image(theme : Theme) -> UIImage? (Theme.swift:37)
1  SwiftMessages                  0x101066650 MessageView.configureTheme(Theme, iconStyle : IconStyle) -> () (MessageView.swift:256)
2  SomeApp                        0x1001675f0 specialized LoginViewEE.(showMessage(content : String, theme : Theme) -> ()).(closure #1) (Login.View.swift:1061)
3  SomeApp                        0x100166c1c partial apply for LoginViewEE.(showMessage(content : String, theme : Theme) -> ()).(closure #1) (Login.View.swift)
4  SwiftMessages                  0x10107ba1c specialized SwiftMessages.(show(config : SwiftMessages.Config, viewProvider : () -> UIView) -> ()).(closure #1) (SwiftMessages.swift:363)
5  SwiftMessages                  0x1010741dc SwiftMessages.(show(config : SwiftMessages.Config, viewProvider : () -> UIView) -> ()).(closure #1) (SwiftMessages.swift)
6  SwiftMessages                  0x10107d87c partial apply for SwiftMessages.(show(config : SwiftMessages.Config, viewProvider : () -> UIView) -> ()).(closure #1) (SwiftMessages.swift)
7  libdispatch.dylib              0x1816214bc _dispatch_call_block_and_release + 24
8  libdispatch.dylib              0x18162147c _dispatch_client_callout + 16
9  libdispatch.dylib              0x181626b84 _dispatch_main_queue_callback_4CF + 1844
10 CoreFoundation                 0x181b8cd50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
11 CoreFoundation                 0x181b8abb8 __CFRunLoopRun + 1628
12 CoreFoundation                 0x181ab4c50 CFRunLoopRunSpecific + 384
13 GraphicsServices               0x18339c088 GSEventRunModal + 180
14 UIKit                          0x186d9e088 UIApplicationMain + 204
15 SomeApp                        0x10007a528 main (AppDelegate.swift:20)
16 libdyld.dylib                  0x1816528b8 start + 4
@wtmoose
Copy link
Member

wtmoose commented Aug 10, 2017

Can you attach the SwiftMessages.framework file?

@wtmoose
Copy link
Member

wtmoose commented Aug 10, 2017

Any crashes on non-jail broken devices? (See #9)

@ufosky
Copy link
Author

ufosky commented Aug 10, 2017

I checked all the crash reports, and all of the devices are jailbroken.

@ufosky
Copy link
Author

ufosky commented Aug 10, 2017

This is my SwiftMessages.framework bundle.
SwiftMessages.framework.zip

@wtmoose
Copy link
Member

wtmoose commented Aug 10, 2017

Sadly, this sounds like a duplicate of #9, which I have no way to solve without help from someone with a jailbroken phone.

@wtmoose wtmoose closed this as completed Aug 10, 2017
@wtmoose
Copy link
Member

wtmoose commented Aug 10, 2017

As noted in #9, the workaround is to not use any images in the framework. You can call this version of configureTheme to avoid having SwiftMessages try to load an icon from the framework's resource bundle:

public func configureTheme(backgroundColor: UIColor, foregroundColor: UIColor, iconImage: UIImage? = nil, iconText: String? = nil)

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

2 participants