Closed cezaraag closed 7 months ago
Mmm, need more info before we can even begin to debug this.
What version of macOS? What version of cacao - published release on crates.io or trunk?
thank you for the quick response. Few more details: Apple M2 Pro macOS: 14.1.1 (23B81)
I tried in two cacao releases: v0.3.2 and I'm currently testing on v0.4.0-beta2. Both had the same issue.
I started trying to println the value. When I tried it, it print the url value but also exit with segmentation fault.
Sounds like shenanigans with retain/release in the ObjC layer. Can you share a quick test case by any chance?
Sorry, I didn't understand your question. Would you like me to provide a test case for you to reproduce the error or would you like me to run a specific test on my machine?
If the goal is to reproduce the error, in my environment the error happens in any call of URLRequest.absolute_url from the NavigationAction. I'm doing the call on the policy_for_navigation_action of WebViewDelegate implementation.
Yeah, it's most likely that the NSURLRequest that the Action has needs to be retained.
You could tweak src/webview/action.rs
absolute_url
to call retain
rather than from_retained
, would likely fix it. If it does, feel free to PR it.
I am happy to submit the pull request, but it appears to have already been fixed in the trunk. I will test the trunk version and inform you of the results. Thank you for your assistance.
Your suggestion fixed the issue. :) Thank you! I did a change locally to the v0.4.0-beta2 tag since web view seems to have other issues in trunk. But the fix is applied to trunk already. Let me know if there is a specific branch that you would like to have the PR.
I'm experiencing a segmentation fault error when calling _action.request.absolute_url() in policy_for_navigation_action of the web view delegate. Do you have any suggestions for fixing this?