-
Notifications
You must be signed in to change notification settings - Fork 167
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
[Bug]: Failed to weave assembly error when opening a unity project. #2720
Comments
Hey, thanks for the report! The first error looks like there are multiple processes trying to write to the same file. I am not sure what may be causing it as we've never seen this issue, but would be very interested in a repro. One thing that is interesting is - is this happening only when the editor is launched? I.e. if you go ahead and change some code, thus forcing a recompilation, do you still get an error from the Realm weaver or does it go away? If it's happening only at launch, it may indicate that we're racing with the compiler which is trying to recompile your code while we're trying to save the woven assembly. |
Hi, |
Looking at the weaving code, maybe a fix would be to wait for the editor to finish compiling or updating the AssetDatabase before weaving ?
|
Hey Tom, yeah, that is pretty much in line with what I was thinking. It's going to be tough to verify the fix without a repro case, but if you're up for it, I can send you a .tgz package you can test with your main project. |
Here's a link to the package from the PR with your proposed changes. If you have the time, please give it a try and let me know if it fixes the issue for you. |
Thanks, I'll try this package then ! Will let you know asap if it fixes the issue for us :) |
Issue is still here sadly even with this PR. I'll try to find some time to work on my repro project but looks like it's a hard one to fix. |
If you're able to share your project privately, I can provide you with a secure upload link. Happy to also sign an NDA if you're concerned about it. I imagine it should be something silly/easy to fix, but without a repro case, it's hard to iterate. |
Checked with the company and we're ok to send you the project privately. You can reach me at tom@minsar.com for the upload link :) |
Updating the ticket with new informations, this only happens on MacOS (M1 & Intel). Never on Windows. |
Hey Tom, thanks for the update and sorry for the long wait for a place to upload your project - there's some delay with setting up an account for me and all the folks who can help are off for Thanksgiving 😕 I'll send you an email as soon as everything is setup. |
I managed to find a fix in the end. Looks like it was the array of Task.Run that was causing the issue for some reason. Don't know why it only happens on MacOS 🤷 See #2737 |
What happened?
When opening our unity project, we get the Failed to weave assembly error all the time on one of our internal unity package called Opuscope.Core.Runtime. This package does not not have any dependence on realm btw.
Repro steps
Tried to reproduce on a new empty project but cannot reproduce the issue so far. Will update if can repro.
Version
10.6.0
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
What type of application is this?
Unity
Client OS and version
MacOS & Unity Editor 2021.1.27f1
Code snippets
No response
Stacktrace of the exception/crash you're getting
Relevant log output
No response
The text was updated successfully, but these errors were encountered: