I have one instance of FRHED open. Copy 4096 Bytes. I open another instance with another file. I paste to position 0 of the file. I want to insert the new bytes at the top of the file.
I tested this few times with Frhed 1.4.2 and 1.5.2 and didn't see the crash. Does it crash for you with every file you try to do the paste, or perhaps with only some file(s)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-04-28
Always with the same file. Both files have nearly 4MB.
But now I have a repro that crashes always.
Copy 4096 from File 1 from Byte 00x0, replace first 512 Bytes in File 2 (select from byte 0x0 next 0x200 and paste the 0x1000 Bytes).
Crash.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found another (simpler) way to reproduce this crash: just select few lines of bytes of the file, so that the selection length is greater than first offset. Then copy the bytes and paste back with default dialog values.
At least it looks like the same crash. I'm inspecting this with debugger...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tested this few times with Frhed 1.4.2 and 1.5.2 and didn't see the crash. Does it crash for you with every file you try to do the paste, or perhaps with only some file(s)?
Always with the same file. Both files have nearly 4MB.
But now I have a repro that crashes always.
Copy 4096 from File 1 from Byte 00x0, replace first 512 Bytes in File 2 (select from byte 0x0 next 0x200 and paste the 0x1000 Bytes).
Crash.
Thanks for details, now I got the crash too. Looking at it...
I found another (simpler) way to reproduce this crash: just select few lines of bytes of the file, so that the selection length is greater than first offset. Then copy the bytes and paste back with default dialog values.
At least it looks like the same crash. I'm inspecting this with debugger...
Patch also good for 1.4 branch
The bug was that code copying bytes in new place when creating a space for new bytes didn't calculate amount of bytes to copy correctly.
Attached a patch (Fix_crash_copying_bytes.patch) that is good for the 1.4 stable branch also.
Committed the fix to SVN trunk:
Completed: At revision: 621
Will be in next alpha release.
Closing as fixed. I'm planning to do next stable release (1.6.0) in few weeks so I won't add this patch to 1.4 branch.