I don't think that your problem is in some way related to the echo statement -- echo may in this case only trigger the bug, maybe because due to echo new memory is allocated or freed.
Such types of bugs are very hard.
I don't think that your problem is in some way related to the echo statement -- echo may in this case only trigger the bug, maybe because due to echo new memory is allocated or freed.
Such types of bugs are very hard.