|
|
|||||
|
|
|
Random errors: what can cause them
|
|
||
|
The number of bytes you requested WILL be read... The only problem is that you don't know WHERE the end of the data will be stored... You will therefore end up with a part of your memory space overwritten by the data you read from the file... And depending of what is stored in memory after your variable, the results will be different... You can have changed the value of another variable of your program, and with luck, the value you set is binary compatible with the type of variable you have overwritten... In that case, you will just have an incorrect result the next time you will use the variable content... Anywhere in your program... If the binary content is incompatible with the variable type (which is much more likely), next time you try to use it, you will have an error message that will seem to come out of nowhere... And of course, at the time any of this symptom becomes visible, the guilty fRead is buried far far away from the code that seems to crash... I have personally reproduced that problem in WinDev 5.5 and 7.5/8... I haven't tested it in WinDev 10... So let me know if you see any difference. |
|||||
| Links: |
|
||||