A
A
Alexey Laud2019-01-23 12:23:59
Debugging
Alexey Laud, 2019-01-23 12:23:59

What difficult debugging cases have you encountered?

If this question violates Toaster's rules, please tell me. I didn't find it in the rules, but you never know.
What in your experience was difficult to debug? Situations are interesting when the search for a bug/error was difficult/impossible.
Any languages ​​and technologies will do, but JavaScript is the most interesting.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2019-01-23
@vt4a2h

Until they delete it, I will answer:
1) Any "floating" bugs, i.e. those that can be played or not pseudo-randomly, and even sometimes and only on one platform. It can be very difficult or even sometimes almost impossible to identify a pattern and understand the cause, especially if it is not a regression.
2) Bugs that are stably reproduced by clients and depend on external factors, such as the environment or connected devices. It can take a lot of time to fix this.
3) Debugging any fairly complex and long-lived multi-threaded system.
More to C++
1) Memory corruption
2) UB on certain compilers and architectures
The rest is usually not that interesting to debug.

R
res2001, 2019-01-23
@res2001

There was an experience of implementing a mathematical model written in Matlab by physicists in Si.
The model considered everything in double. In C, floats are used for speed. It was not possible to check the direct result, at least due to rounding errors, and if there were still errors in the C implementation (and they were), then in general a pipe, because It was not clear even in what part of the code the error was.
I had to fully implement the model in Python with the ability to switch the calculation mode by setting one option from double to float. This intermediate model was debugged with the original model in double mode. Then we switched to float and debugged the C implementation with an intermediate model.
There is a lot of work, but we did not come up with another way to confirm the correctness of the implementation.
As a result, the scheme turned out to be quite working.
Theoretically, it was possible to modify the Matlab model so that it worked with floats, but in Matlab it turned out to be quite problematic to control each operation. You can do it on Pinton.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question