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
Crash at macOS Runtime, possible recursive error? #34
Comments
Hi, first thing to check is that you're using the right version. It says https://github.com/johnno1962/SwiftTrace/ @ 0.7.4 at the end but the current tag is 7.4.2, how are you adding it to your project? The best way is as a Swift Package. |
Whoops, sorry for that - typo or something. The version I'm using is indeed |
When it does this sort of recursion it's usually because something has been swizzled that SwiftTrace itself uses. When you look at the stack trace can you see the method "signature" in the "swizzle" instance which looks after the forwarding? |
Took that advice and moved the
I'm calling
|
But can you tell me the signature of the method where it recurses? |
Sorry, took me a minute to figure out what I needed to do for that. Is this is what you're after? :
Stringified:
I also saw a few blocks like this that may be different behavior, but don't really have a good clue as to why that's going on:
I captured this by sticking a breakpoint on |
Thanks for the info. Looks like there is an Objective-C method named "self" that shouldn't get swizzled. Can you try adding that to the |
If you don't see what I mean, I've created a branch |
I just gave this a shot on that branch and my fork and it seems to work great! Thanks one more time for helping troubleshoot this. I may have a few more questions in a bit, specifically about output formatting or skipping certain parameters prints. For example, I've got a function with a param whose string description is a massive formatted string, meaning the log gets filled up with big unhelpful blocks. I figured something like that isn't an issue, and more a general usage question or feature request potentially. To that end, I can Close this if you're comfortable with that additional branch as a solution, and either open another issue with questions, or can DM you directly on some client. Just let me know either way. Cheers! |
Great! Thanks for raising the issue. You can't filter individual arguments or types but you can filter which methods get swizzled before applying the trace with the method(Inclusion/Exclusion)Pattern static property. There is also real time filtering using the traceFilter(Include/Exclude) properties which are all regex patterns. Closing this now. Will release to main soon. |
Hey there - awesome library, looking forward to integrating this and giving it a try in my applications!
On first run, I'm getting a long what seems to be recursive stack trace when attempting to track instances of a single class (I'm not using the bundle methods right now). I'm linking a
.gist
with the full trace, it's rather long, but the info is below.Trace Gist:
https://gist.github.com/tikimcfee/8cdfaefd84e62bc61c69d1c1ed99ee53
I'm running this:
Much appreciate your time and help, and again, thanks for the great tool!
EDIT: Version is 7.4.2, not 0.7.4
The text was updated successfully, but these errors were encountered: