What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

The question "Matrices causing crash" was sort of hijacked. A user (not the OP) offered a bounty and it was allowed to edit the question to add his code, not once but twice.

Am I right to think this should not have been allowed and that a new question should have been opened if the code was that different?

share|improve this question
    
Andrew Barber has handled that for you... –  Benjol Feb 12 '13 at 6:27
2  
Okay. So I'm having the same issue as the OP. Yet there is no answer and I need to clarify with my own code. How do you guys suggest I should do this? Open a new question? Will it get closed as duplicate? –  Caesar Feb 12 '13 at 6:33
1  
@Caesar You already did the correct thing: Added a bounty. The fact that you had to add so much code (when the OP already also had a lot of code) leads me to think the question was largely a "debug this for me" type of thing. If it's not that, then either the question is a duplicate (meaning you shouldn't need more of your code), or it's not. –  Andrew's a Unitato Feb 12 '13 at 6:35
    
@AndrewBarber Not asking anyone to debug anything for me. I have done the debug and I posted where the error happens. What I need to know is WHY it happens and the only one I can show people is by posting code that is short and clean and the OP DOESN'T have that. –  Caesar Feb 12 '13 at 6:36
    
@Caesar Well, for one thing; the question had an answer that partially solved the issue, then you came along and said it didn't help you, causing the OP of that answer to delete it. From that, it seems again that you do not have the same issue. –  Andrew's a Unitato Feb 12 '13 at 6:39
    
@AndrewBarber The answer that was there was never accepted as the answer and not once voted up. Yet I can tell you it IS the same error –  Caesar Feb 12 '13 at 6:41
1  
@Caesar The OP's comment to that answer: "Thank you, that helped partially, so now I can get World and Projection matrices, though I still can't get last line of CameraClass::Render() to work". Basically, the OP said that answer addressed the issue in the question. –  Andrew's a Unitato Feb 12 '13 at 6:44
    
@AndrewBarber "though I still can't get last line of CameraClass::Render() to work" That is where I have the issue and that is what the question is about –  Caesar Feb 12 '13 at 6:48
    
@AndrewBarber That is where both of our programs crashes. And what I would like to know is why. What do you suggest, open a new question WITH THE EXACT same symptom? –  Caesar Feb 12 '13 at 6:51
2  
@Caesar I would certainly not suggest you continue to muddy the waters and cause useful answers to be deleted and confusing, additional answers to be added by adding complicating, alternate code samples to the question. –  Andrew's a Unitato Feb 12 '13 at 6:54
    
@AndrewBarber I did not delete the answer. The original answer decided to delete it as he clearly saw it unhelpful when I pointed it out.. –  Caesar Feb 12 '13 at 6:56
7  
@Caesar Unhelpful to you, maybe. The OP clearly said it was helpful to them. –  Andrew's a Unitato Feb 12 '13 at 7:06
    
@AndrewBarber Yes it did help him in other aspect. but it did not hep in what the question is asking. The OP is asking why an error happens when he tries to set a class member matrix value. The answer might have helped him with a different thing but not what the original question was asking. Once again I would like to point out what that I did not force the answerer to delete his question. He did so on his own free will. –  Caesar Feb 12 '13 at 7:07
    
@AndrewBarber I don't disagree with you. I'm sure that answer helped the OP in some way. But it did not solve the issue. "though I still can't get last line of CameraClass::Render() to work" –  Caesar Feb 12 '13 at 7:12
add comment

2 Answers

up vote 7 down vote accepted

Yes; You were right to think that sort of edit is not supported.

I rolled that question back to its last form by the original poster. The new user edited it too drastically, in my opinion, by adding their own code and error; It could have been a very different issue, even with a minor, seemingly inconsequential change in the code.

The important part here is that the editor added in his own code; Not clarification of the OP's code, or bringing in the OP's code from somewhere else - but added his own code that he thought was directly related. Whether that code was, in fact, equal to the OP's or not is not the important point. The important point is that in order to maintain clear standards for editing, we don't generally permit this sort of modification. Because more often than not, the issues are going to be significantly different.

It is OK to edit someone's question to clarify language and the like, or add in code that you know is directly related (perhaps the OP had linked to a jsfiddle or some other resource), but not to just take over the question in that manner.

share|improve this answer
    
That's what I thought but the fact that his edits were approved by someone else and with a bounty in the mix made me doubt. –  madth3 Feb 12 '13 at 6:32
2  
@madth3 The approvers might have just been 'robo-approving', or they may have thought that the editor was the OP (perhaps with a different account). the Bounty was the correct thing for the editor to do here, assuming 'his' question was a duplicate, as he says. –  Andrew's a Unitato Feb 12 '13 at 6:34
add comment

As the person who made the edit to the post I would like to explain why I did so.

Currently, I'm having the EXACT same issue that the Original poster with the EXACT same symptoms.

I found the current answer that was there was not accepted as the answer and it didn't have a single up vote on it. I pointed it out the poster that the answer was not helpful and he deleted the answer.

I went on to add a bounty to the question and started seeing some answers started showing up asking for more clarifying on the issue and slimmed down code so they can test it out for them self.

I created a small example and and edited the original post with the code and the error that I receive when this happens.

This is when this happened.

What I would like to clarify is that I never deleted anything from what the original poster has wrote, and that I have added a workable example of this issue so that it can tested by others. Yes the original poster did have some code there but it was snippets of his code and not a full working example.

What do you guys suggest? Should I start a new question? Will it get flagged as duplicate? If no then how can I clarify the original poster question?

Edit The question is now solved, please see this for the answer

Also to counter Andrew Barber argument about how my edit made such a dramatic different.

He argues that the original poster error is

Everything's fine until it reaches that line: m_ViewMatrix = XMMatrixLookAtLH( vecPosition, vecLookAt, vecUp ); Somehow it causes application crash

and that is dramatically different then mine because I point out that the exception is

First-chance exception at 0x001b2a7c in example.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x77ab15de in example.exe: 0xC0000005: Access violation reading location 0x00000000.

I'm not saying that my program is not crashing just like the original poster. What I'm saying is that my program is crashing and this is the exception that is being thrown before the program crash. The original poster did not say what his exception but I believe they are the same if you view my answer.

Second he claims that my code IS WAYYYYY different then the original poster, lets take a look:

Orginal Poster code

void CameraClass::Render()
{
    XMFLOAT3 sUp, sLookAt, sRotationInRadians;

    sUp.x = 0.0f;
    sUp.y = 1.0f;
    sUp.z = 0.0f;

    sLookAt.x = 0.0f;
    sLookAt.y = 0.0f;
    sLookAt.z = 1.0f;

    sRotationInRadians.x = m_Rotation.x * 0.0174532925f;
    sRotationInRadians.y = m_Rotation.y * 0.0174532925f;
    sRotationInRadians.z = m_Rotation.z * 0.0174532925f;

    XMVECTOR vecLookAt = XMVectorSet( sLookAt.x, sLookAt.y, sLookAt.z, 0.0f );
    XMVECTOR vecUp = XMVectorSet( sUp.x, sUp.y, sUp.z, 0.0f );
    XMVECTOR vecPosition = XMVectorSet( m_Position.x , m_Position.y, m_Position.z, 0.0f );

    XMMATRIX RotationMatrix( XMMatrixRotationRollPitchYaw( sRotationInRadians.x, sRotationInRadians.y, sRotationInRadians.z ));

    vecLookAt = XMVector3TransformCoord( vecLookAt, RotationMatrix );
    vecUp = XMVector3TransformCoord( vecUp, RotationMatrix );

    vecLookAt += vecPosition;   

    m_ViewMatrix = XMMatrixLookAtLH( vecPosition, vecLookAt, vecUp );
}

My Code:

XMMATRIX const& Update()
{
    XMVECTOR Eye    = XMVectorSet( position_.x, position_.y, position_.z, position_.w);
    XMVECTOR At     = XMVectorSet( look_.x, look_.y, look_.z, look_.w);
    XMVECTOR Up     = XMVectorSet( up_.x, up_.y, up_.z, up_.w);

    this->view_ =  XMMatrixLookAtLH( Eye, At, Up );
    return this->view_;
}

Anyone who has ever done any DirectX stuff can tell you that there is nothing different between his code and mine. They both achieve the same thing at the end. They find the matrix of location of the camera.

share|improve this answer
6  
I understand your motive but it's still hijacking a question posted by other user and I don't think it's proper. You should start new question pointing to the other one and explaining what you said here. It still might get closed, but there is also good chance it won't and you'll be able to start the bounty on your own question if needed. If you choose this path you can also flag the question with your bounty, choose "Other" and ask the bounty to be cancelled. (Not sure it will be refunded though) –  Shadow Wizard Feb 12 '13 at 8:01
1  
@ShaWizDowArd I'm sorry but I don't feel like I hijacked anyone's posts. I never deleted a single line of code from the OP and I merely added a workable code so that others can test it out. To be honest, I feel like SO has let me down. I thought it was a collaborative site where people helped each other out. Not a bureaucracy where nothing gets done. –  Caesar Feb 12 '13 at 8:09
1  
It's collaborative to some extent, but it's not Wikipedia. Each user still has his/her own posts and it's not proper for user A to add/change/remove code in post made by user B. You can however ask the OP of the question for permission to add code and see how he responds. –  Shadow Wizard Feb 12 '13 at 8:15
4  
@ShaWizDowArd While I get that. I now feel like I'm stuck between two SO rules. You can't ask a duplicate question and you can't clarify a question if it means bringing in your own code. :-/ –  Caesar Feb 12 '13 at 8:30
    
@AndrewBarber Why do you think my code is unique? The intend of my code is to have a workable example so that others can see and test it. The OP code is a snippet of his code and you can't copy and paste it into a workable project because that code is intended for his project. How can I turn his code into a workable example without making it "unique"? –  Caesar Feb 12 '13 at 9:03
1  
Sorry to put you in this position, but I did give you two valid options. (post new question anyway or contact the OP via comment and ask to make your changes) –  Shadow Wizard Feb 12 '13 at 9:12
    
@Caesar You were trying to follow rules, so you have my sympathy - I get very upset when people tell me off when I was trying to do the right thing. –  AndrewC Feb 12 '13 at 9:27
4  
You may well not be aware that the rules on closing as duplicate were changed recently, so that because the question you put a bounty on had no upvoted or accepted answer, we wouldn't have been able to close your question as a duplicate under the new rules. The change in rules has sparked some controversy, so I can't promise you that a duplicate would have been well received, but it would have been within the current rules. –  AndrewC Feb 12 '13 at 9:39
    
@AndrewC Thank you, I didn't know about this. –  Caesar Feb 12 '13 at 9:46
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .