RedMadRobot / input-mask-ios

User input masking library repo.
MIT License
578 stars 96 forks source link

Error while using profiler #35

Closed KompoD closed 6 years ago

KompoD commented 6 years ago

Hey guys! I recently tested my app and while try to profile memory leaks I got error in FormatSanitizer.swift in func getFormatBlocks(_ string: String) -> [String] block. 2018-05-11 12 43 17

Error message is Main Thread Checker: UI API called on a background thread: -[UIView retainCount] PID: 1884, TID: 190199, Thread name: (none), Queue name: com.apple.keyboard.xpc, QoS: 25 Please check this :)

P.S. Thanks for awesome library! 👍🏻

taflanidi commented 6 years ago

Hey @KompoD! Thanks for your report.

I'll try to reproduce your issue. Meanwhile, how often do you get this error?

KompoD commented 6 years ago

@taflanidi I just started typing first symbol in masked textfield and catch this error.

taflanidi commented 6 years ago

@KompoD, Alright, I've reproduced your issue, and it seems I've found a potential solution.

Could you try profiling your project with a "Blank" profiler template by adding necessary instruments? See below.

1.

screen shot 2018-05-11 at 21 54 53

2.

screen shot 2018-05-11 at 21 55 11

3.

screen shot 2018-05-11 at 21 55 26

Please, share your results.

KompoD commented 6 years ago

@taflanidi, using Blank I have no errors. It's magic :) P.S. Sorry for late answer.

taflanidi commented 6 years ago

@KompoD you're welcome.