3 ms·
The reproducible thing about this error would be: I forgot to initialize my variables.
by usrbinbash 5y ago
The reproducible thing about this error would be: I forgot to initialize my variables.
- MereInterest 5y agoThat results in undefined behavior, which is by definition, not reproducible.
- usrbinbash 5y agoThe behavior of the program is not reproducible. The cause of the error is.
- programmer_dude 5y agoI think you are confused. The cause is not something you reproduce. It just exists. You can however "isolate/determine" the root cause.
- usrbinbash 5y agoIf I have 10 different errors, but the root cause for all of them is that I forgot to do something I should have done (initialize a variable), then the cause is the same across all 10 different errors. If I don't start initializing the variables, then I will continue to have erros (which may or may not be similar to each other), thus making the problem reproduceable. The errors are not the problem, but the result of the underlying problem.
- MereInterest 5y agoIf you have an error that only occurs on your computer, on your compiler version, on your particular optimization level, on this particular phase of the moon, how do you determine that the root cause is forgetting to initialize a variable? In the context of debugging, "reproducible" means "can reproduce that exact error in order to better identify the root cause", not "frequently occurs as a root cause".