-
Notifications
You must be signed in to change notification settings - Fork 933
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
This PR solves a crash with Robert's bodies logged on your bugtracker. #3095
Conversation
The ci fails with an error 404, while succeeding in master. How is this possible? Is it somehow my fault? |
Unfortunately you'll just have to find a way to submit a GitLab MR as GitHub repo CI doesn't quite get the full unit test and platform coverage and really, maintaining the GitHub CI infrastructure just isn't worth it. And you should give your commits descriptive names. As for the changes, partially breaking instance preloading and doing a const_cast to properly process skinned body parts seems evil. |
Thank you for the hints. I really appreciate a review from a more experienced developer as I am not too familiar with all of this.
The description is in the PR description. I was under the impression this is the description that will be assigned to the commit once merged. Is this not the case? If I need another description for the commit, what is the difference between the PR description and commit description?
The const_cast approach I copied from another place working with getTemplate. It is necessary because osg provides no const version of the NodeVisitor class. vsg provides if you would like to upgrade. Instance preloading was mostly unused even before this PR. It was turned off for non-animated objects, probably because we hardly have to clone anything for them (As described in the PR, non-skinned drawables are not cloned). For animated objects, the preloader did prepare instances, but these were mostly not used. Animation::setObjectRoot strips the instance of some unneeded nodes and stores the result into its own cache independent of the SceneManager's instance cache. In summary, the preloader instancing was mostly redundant. The non-redundant portion of it is not as necessary anymore. |
We get a merge commit, whose name will be something like Merge #3095 This PR solves a crash with Robert's bodies logged on your bugtracker plus all the other commits you've got on this branch. |
It's possible to squash at our end, but then we've only got one commit, rather than the commit plus the merge commit that adds it. If you squash the commits yourself, then that's preferable. You might find that you can do more via GitHub's rich editor at https://github.dev/OpenMW/openmw |
How amazing is that. I was totally unaware. Will be using this next time for sure. There is still no squash capability unfortunately so we are left with the present mess and I will try to do better next time. |
Hello @bosvensson1 , sadly enough github has been left to languish a bit because we focus on GL; but if there are people willing to put time in to get github pipelines up and running so we don't have to rely on travis or appveyor, that would work too. I can try to open a MR on GL. Would this work for the time being? |
Absolutely @psi29a, I appreciate. Is it possible to keep the committer intact in the process of uploading to another platform? I want to build a portfolio for myself in the hopes of applying to a better job in the future. Otherwise, I will be content with a "credit to Bo Svensson" in the title. Hopefully there are no gross compilation errors as I've had to manually copy across the changes in the webedit like an idiot. Thanks a lot. |
Sure, let's see what https://gitlab.com/OpenMW/openmw/-/merge_requests/1196 says too :) |
You can click on the
|
The android compiler in particular is being more strict with const correctness. I am grateful for the pointer as it pointed to a legitimate mistake. Should be fixed now. |
I put a lot of effort into getting OpenMW part of the FOSS program at gitlab and they are fully committed in helping us out. When we reached out about a limit, that replied that we are part of their top tier. They have been very good to us and we have provided a lot of feedback to their beta instances/pipelines (like Mac and Windows) runners. As @AnyOldName3 has pointed out elsewhere, it's thanks to the different types of pipelines for windows (for example) we were able to track down a nasty cmake issue that would have gone unnoticed. So we've had contact with upstream cmake (and other libraries we use) to point out those issues. |
Seems like GL pipelines are happy, there was a problem with file rename because of an errant |
Now we just need people to test the artefacts, and you need to add a changelog entry please and include yourself as a list of contributors. :) |
Half of the Windows jobs are because we can't build everything within the one-hour time limit. It was taking an average of 62 minutes to build all our applications, so I had to split the build. Now we spend about forty minutes on duplicated work and ten to fifteen on job-specific stuff. If the free agents were faster, we could do more with each of them. |
Well, if you plan on sticking around we can get this into main for further testing. This not only resolves the issue but apparently also conserves memory usage while at it. Cheers! |
There is a warning https://gitlab.com/OpenMW/openmw/-/jobs/1578121095:
|
This PR causes a crash:
|
Now this is interesting, you awake @bosvensson1 ? |
Hello,
Firstly my apologies for using this, as I understand deprecated github repository. I use Open MW as a means of slacking off at work and sadly, the gitlab site is blocked on our company network.
This PR solves the crash with Robert's bodies logged on your bugtracker.
Explanation: the code assumes that the node to attach is not shared (has at most one parent), but when a non-skinned trishape is used in a place where we expect skinned trishapes, this assumption breaks. Because in SceneUtil::CopyOp, we do not clone non-skinned trishapes. I assume this is intentional to conserve memory.
My solution puts SceneUtil::attach in charge of cloning exactly the node to attach, so we can be sure the node is not shared.
Also this reduces some redundant cloning that was going on before. We were cloning the entire skeleton for each skinned body part only to discard most of it. Now we are cloning only the nodes belonging to the bodypart.
How to test this PR:
[ ] Ensure Roberts bodies doesn't crash.
[ ] Check if the count of Drawables and Nodes in the scene remains roughly the same as before. (I hope I didn't add any unnecessary cloning)