So I have been here before asking about this issue but no one has been able to answer my question thus far. So I made a video that demonstrates the issue.
I have so far checked and rechecked my math files, so has two of my college professors, I have checked my shaders, and I am just using a simple pass through shader.
I have create a video of the issue happening, I will describe a little of my process.
I have set initial values of my rotations to, this pushes it to the point where the issue appears.
rotX = 0.0f;
rotY = -22.0f;
rotZ = -62.0f;
These values ensure that I do not have to rotate the object at run time, these values are where the problem occurs. As you can see in the video the cow will start to rotation without any place in the code actually telling it to. I output the rotations matrices and rotations values to my log file and they are all normal.
http://www.youtube.com/watch?v=LB7_zftalT8
So I have never seen this before ever, anywhere. If anyone has seen something like this let me know. I have not posted any code because there are far to many possible issues, however I can provide code snippets on demand, or provide access to my source svn.
I have spent three weeks debugging this issue, I have at least 10 other sets of eyes look at this issue and review my code.
The only issue floating around that I haven't been able to remove as an issue is memory corruption, I hope you have better luck.
Edit:
Code Samples: http://pastebin.com/hRSvEYAZ
I use quaternions for my rotations, I create them with axis angles. I then multiple my rotations together and create my 4x4.
Edit:
I have tried the answer provided by MadCoreTom, it did not help, I have also continued to take a look at memory and I cannot see any issue.
Edit:
So I have removed the normalization calls from my quaternions, now I only normalize the axis when I create my quaternion from an axis angle. I have also rewritten my toMatrix3 for my quaternion to see if that helps, it hasn't.
I also moved my updating the rotations to inside my key press, I intend to provide more code soon as well.
Alright so I solved my issue. There was a floating point error covering up the actual issue.
So once I fixed that, not using the method provided by MadcoreTom though. What I ended up doing was only normalizing the the axis, and never normalizing my quaternion during rotations.
The real issue was I was storing my angle and accumulating it, this was causing the issue.
Now I just pass in the change in rotation, create my quaternion from the axis/angle change, then I multiply this to my quaternionF.