-
Notifications
You must be signed in to change notification settings - Fork 174
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 due to meshStates.empty() assertion #958
Comments
I don't think I have ever encountered an issue like that on Linux. Could you run it in
The output of |
I'm not sure if my setup currently makes it easy to trace this with GDB. I noticed I seem to get similar crashes too, but some of them don't print that message thus I'm unsure if they're even related... I'm not sure how to even isolate this exact one then. Only detail I forgot to add is that they usually occur when going to another domain, a few seconds after it starts loading, the crash occurs before everything finishes loading up. If I start the interface again and go back to that same domain it will work, so it's not a broken object constantly crashing viewers but likely some random condition at loading time. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Maybe stalebot did good for once. Either that, or we have a different issue which causes the same problem to occur. |
I've been trying to catch this one for a while, but the darn thing seems to always strike right when I'm not using a debugger. I'll try to do another attempt at catching it after the dev meeting. If anybody wants to join, please run under gdb or another debugger, and get a backtrace ( |
Okay, finally! Backtrace:
|
Now let's see if we can figure out where this is going wrong. So we want _meshStates to be empty (it's a vector), to fill it with whatever needs to be there. However, it is not, and contains: $6 = std::vector of length 1, capacity 1 = {{clusterDualQuaternions = std::vector of length 1, capacity 1 = {{_scale = {{{x = 1,
y = 1, z = 1, w = 0}, {r = 1, g = 1, b = 1, a = 0}, {s = 1, t = 1, p = 1, q = 0}, data = {data = {1, 1, 1, 0}}}}, _dq = {
_real = {{{x = 0, y = 0, z = 0, w = 1}, data = {data = {0, 0, 0, 1}}}}, _dual = {{{x = 0, y = 0, z = 0, w = 0}, data = {
data = {0, 0, 0, 0}}}}}, _cauterizedPosition = {{{x = 0, y = 0, z = 0, w = 1}, {r = 0, g = 0, b = 0, a = 1}, {s = 0,
t = 0, p = 0, q = 1}, data = {data = {0, 0, 0, 1}}}}}}, clusterMatrices = std::vector of length 1, capacity 1 = {{
value = {{{{x = 1, y = 0, z = 0, w = 0}, {r = 1, g = 0, b = 0, a = 0}, {s = 1, t = 0, p = 0, q = 0}, data = {data = {1, 0, 0,
0}}}}, {{{x = 0, y = 1, z = 0, w = 0}, {r = 0, g = 1, b = 0, a = 0}, {s = 0, t = 1, p = 0, q = 0}, data = {data = {
0, 1, 0, 0}}}}, {{{x = 0, y = 0, z = 1, w = 0}, {r = 0, g = 0, b = 1, a = 0}, {s = 0, t = 0, p = 1, q = 0}, data = {
data = {0, 0, 1, 0}}}}, {{{x = 0, y = 0, z = 0, w = 1}, {r = 0, g = 0, b = 0, a = 1}, {s = 0, t = 0, p = 0, q = 1},
data = {data = {0, 0, 0, 1}}}}}}}}} A MeshState is a class MeshState {
public:
std::vector<TransformDualQuaternion> clusterDualQuaternions;
std::vector<glm::mat4> clusterMatrices;
}; Hm. So far I don't quite know what is going on there. We iterate over the meshes in the model, simply create space for the MeshStates without actually computing anything, and I guess whatever hooks up to rigReady will want that. I'm thinking this might be a threading issue because it seems to happen more or less at random. |
And there's the entire Model where this happens: https://paste.ubuntu.com/p/6rCGNR4qXn/ The location is Hayashi |
Ok, trying to figure out more here. So, our assert happens because _meshStates is not empty, like it should be. Then if all is well, we fill it. Now _meshStates is used in a bunch of places. CauterizedModel inherits from Model and reads data from it, but doesn't add anything. So that's out.
And apparently, that's it. So possible issues here:
|
Another option is this line: Assertion won't be triggered if So So So current conclusion: The issue here is something having no joints. I'm not yet sure whether this is something that happens normally and isn't accounted for, or it's a bug in the code. |
So, quick and dirty fix here: just clear the mesh states, and log a message. That should be generally harmless, the only question is whether this will hide some other issue down the line. |
I run the latest AppImage downloaded from the official website on Linux openSUSE Tumbleweed x64 / KDE. Occasionally the interface crashes when visiting some areas. When ran from a console I get this error message:
The text was updated successfully, but these errors were encountered: